我有這個簡單的 logstash 配置,我想將 api-token auth 添加到 http 輸入。我知道如何為彈性搜索的輸出做到這一點,但不知道是否可以提供類似于 http 輸入
input {
http {
host => "0.0.0.0"
port => 8080 # default: 8080
ssl => false
}
}
output {
stdout {
}
elasticsearch {
hosts => "elasticsearch:9200"
api_key => "my_api_key"
index => "my-local-index"
}
}
理想的要求就像
curl -d '{"message": "my log"}' -H 'Content-Type: application/json' -H 'Authorization: ApiKey my_api_key' http://localhost:8080
uj5u.com熱心網友回復:
http 輸入創建一個 http 服務器套接字。這可以支持使用輸入的用戶和密碼選項的基本授權。它不支持使用 elasticsearch API 密鑰。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/516202.html
標籤:弹性搜索日志存储logstash-配置弹性搜索-x-pack
下一篇:串列中的哪個專案-Python
