Having _jsonparsefailure, and json parser says messsage is good json.
I have this configuration file:
input {
http_poller {
urls => {
url => "https://urlhost:443/remote/core.executeQuery?queryId=###&:output=json"
}
cacert => "/etc/logstash/conf.d/ssl/trust.pem"
truststore => "/etc/logstash/conf.d/ssl/trust.jks"
user => "user"
password => "xxxxxx"
truststore_password => "xxxxxxx"
schedule => { cron => "*/1 * * * *"}
codec => "json"
}
}
filter {
mutate {
gsub => [
"message", "^OK:\r\n", ""
]
}
json {
source => "message"
}
}
output{
elasticsearch {
manage_template => false
hosts => "localhost:9200"
index => "indexepo-%{+YYYY.MM.dd}"
}
stdout{}
}
Message:
OK:
[ { "EPOLeafNode.LastUpdate" : null, "EPOLeafNode.NodeName" : "x.x.x.x", "EPOComputerProperties.IPV6" : null, "EPOComputerProperties.IsPortable" : -1, "EPOComputerProperties.OSVersion" : "", "EPOComputerProperties.UserName" : "" }, { "EPOLeafNode.LastUpdate" : null, "EPOLeafNode.NodeName" : "x.x.x.x", "EPOComputerProperties.IPV6" : null, "EPOComputerProperties.IsPortable" : -1, "EPOComputerProperties.OSVersion" : "", "EPOComputerProperties.UserName" : "" }, { "EPOLeafNode.LastUpdate" : null, "EPOLeafNode.NodeName" : "pc1", "EPOComputerProperties.IPV6" : null, "EPOComputerProperties.IsPortable" : -1, "EPOComputerProperties.OSVersion" : "", "EPOComputerProperties.UserName" : "" }, { "EPOLeafNode.LastUpdate" : "2019-04-03T07:55:31-04:00", "EPOLeafNode.NodeName" : "pc2", "EPOComputerProperties.IPV6" : "0:0:0:0:0:xxx:xxxx", "EPOComputerProperties.IsPortable" : 0, "EPOComputerProperties.OSVersion" : "6.1", "EPOComputerProperties.UserName" : "User3" }, { "EPOLeafNode.LastUpdate" : "2019-04-03T07:55:31-04:00", "EPOLeafNode.NodeName" : "PC5", "EPOComputerProperties.IPV6" : "0:0:0:0:0:Fxxxxxx", "EPOComputerProperties.IsPortable" : 0, "EPOComputerProperties.OSVersion" : "6.1", "EPOComputerProperties.UserName" : "User7" } ]
Kibana discovery Error:
April 4th 2019, 11:43:03.522
@timestamp: April 4th 2019, 11:43:03.522
tags: _jsonparsefailure
@version:1
message: The above message