Hi, So i moved the json command to the filter.
I have a little more debug information but its still not liking it, any ideas?
input {
# udp {
# port => 5141
#type => 'hsl'
# }
tcp {
port => 5141
id => "TCP_INPUT"
type => "TCP_INPUT"
}
}
filter {
if [type] == "TCP_INPUT" {
json {
source => "message"
}
}
}
type or paste code here
Logstash-plain.log shows this
t
[2022-01-18T16:50:05,892][WARN ][logstash.filters.json ][main][e929e8c178d8ddd954aa9f2eeb0726d914d7f7df9e7c9f8d2b7020fe33d277a0] Error parsing json {:source=>"message", :raw=>"other mcp_obj_delete (tag=15299) messages", :exception=>#<LogStash::Json::ParserError: Unrecognized token 'other': was expecting ('true', 'false' or 'null')
ype or paste code here
And the output to file shows something like this
{"tags":["_jsonparsefailure"],"port":25326,"@timestamp":"2022-01-18T16:50:05.779Z","message":"[NAT] end_transaction ignored","@version":"1","type":"TCP_INPUT","host":"192.168.221.12"}
{"tags":["_jsonparsefailure"],"port":25326,"@timestamp":"2022-01-18T16:50:05.779Z","message":"end_transaction -> running 1 ig_commit 1 od_compile 0 od_deploy 0","@version":"1","type":"TCP_INPUT","host":"192.168.221.12"}
{"tags":["_jsonparsefailure"],"port":25326,"@timestamp":"2022-01-18T16:50:05.779Z","message":"end_transaction calls device_actions()","@version":"1","type":"TCP_INPUT","host":"192.168.221.12"}
{"tags":["_jsonparsefailure"],"port":25326,"@timestamp":"2022-01-18T16:50:05.779Z","message":"device_actions: on demand feature is not enabled.","@version":"1","type":"TCP_INPUT","host":"192.168.221.12"}
{"tags":["_jsonparsefailure"],"port":25326,"@timestamp":"2022-01-18T16:50:05.779Z","message":"[NAT] end_transaction -> ig_commit 1","@version":"1","type":"TCP_INPUT","host":"192.168.221.12"}type or paste code here
and the raw file before the Json config was added looked like this
{"message":"[NAT] end_transaction -> ig_commit 1","@version":"1","port":25243,"@timestamp":"2022-01-18T10:37:39.719Z","host":"192.168.221.12"}
{"message":"[NAT] end_transaction ignored","@version":"1","port":25243,"@timestamp":"2022-01-18T10:37:39.719Z","host":"192.168.221.12"}
type or paste code here