我正在尝试使用logstash http_poller
插件从Zabbix“rest”端点提取数据。我收到以下错误:
错误:#< Hash:0x370283f5>
的未定义方法`encoding'
这是我的配置:
input {
http_poller {
interval => 15
codec => "json"
urls => {
zab => {
url => "http://my_zabbbix_server/zabbix/api_jsonrpc.php"
method => post
headers => {
"content-type" => "application/json"
}
body => {
jsonrpc => "2.0"
method => "user.login"
params => {
user => "myusername"
password => "ermagerd"
}
id => 1
}
#auth => null
}
}
}
}
output {
stdout { codec => rubydebug }
}
}
如果有人能够对我的配置中不正确或缺失的内容有所了解,那就太棒了。是啊。