Monitor TomCat Logs


(Dfoley84) #1

I am trying to Monitor our Tomcat logs with Elastic Search / LogStash

when i try and create a mapping:

curl -XPUT "http://:9200/logs/" -d '{ "mappings" : { "tomcat_access":{ "discover":".*"}}}'

I am getting the following Error:

{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}root@ip-10-239-48-161:/etc/logstash/conf.d#


#2

That is default content type for a curl PUT. You should use:

curl -X PUT "localhost:9200/[...]" -H 'Content-Type: application/json' -d'[...]'

(system) closed #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.