Hi
when i try to send data with logstash to influxdb return this error:
[ERROR] 2023-07-17 09:21:36.133 [[main]>worker1] http - Encountered non-2xx HTTP code 400 {:response_code=>400, :url=>"http://192.168.1.2:8086/api/v2/write?bucket=mybucket&precision=s&org=myorg", :event=>#<LogStash::Event:0x397c42fa>}
Here is my logstash config that need to send simple message like this to influxdb oss2.
logstash config:
input {
stdin {
codec => plain {
charset => "UTF-8"
}
}
}
filter {
grok {
match => { "message" => "%{TIME:time} %{GREEDYDATA:message}" }
}
}
output {
http {
url => "http://192.168.1.1:8086/api/v2/write?bucket=mybucket&precision=s&org=myorg"
http_method => "post"
headers => [
'Authorization', 'Token mytoken'
]
}
}
FYI: because i'm using influxdb oss2, this plugins-outputs-influxdb not work anymore so i use this one instead plugins-outputs-http.
Any idea?