# Monitor TomCat Logs

**URL:** <https://discuss.elastic.co/t/monitor-tomcat-logs/168693>\
**Category:** Logstash\
**Created:** [February 16, 2019, 3:13pm UTC](https://discuss.elastic.co/t/monitor-tomcat-logs/168693 "2019-02-16T15:13:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfoley84](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dfoley84/32/38973_2.png) [@dfoley84](https://discuss.elastic.co/u/dfoley84)\
**Post date:** [February 16, 2019, 3:13pm UTC](https://discuss.elastic.co/t/monitor-tomcat-logs/168693/1 "2019-02-16T15:13:05Z")

</div>

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#

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 16, 2019, 3:38pm UTC](https://discuss.elastic.co/t/monitor-tomcat-logs/168693/2 "2019-02-16T15:38:07Z")

</div>

> [@dfoley84](#):
>
> application/x-www-form-urlencoded

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

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

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 16, 2019, 3:52pm UTC](https://discuss.elastic.co/t/monitor-tomcat-logs/168693/3 "2019-03-16T15:52:20Z")

</div>

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