Hi all,
first of all, I must say i am new in this elastic world. I hace a setup with rsyslog-logstash-Kibana (and also Grafana)
the problem I could not be able to solve is this.
my application is sending a Json message in my logs. I was able to cut out the not-json part of the log and correctly parse the Json with grok.
now the problem is that I have 2 data fields sent by application in the epoch millisecond format, but kibana is dynamically interpreting that as a number. I'd prefer not to disable dynamic indexing. So I've tried to use a mapping template:
(my data fields contain "date" in the name)
now if I run a get_all I correctly see my datafield as "date" but, when I go to discover the field is still considered as a number (#icon on the left of the page with logs). What Am I missing?
did you update the mapping after you already created your index-pattern in Kibana? The default date-field needs to be explicitly set for the index-pattern, otherwise Kibana will not pick up on it.
Can you try the following?
recreate the index pattern to configure your index pattern with a default time field
Go to 'Management > Index patterns' and delete the index pattern. Then create a new one (this can use the same name as the one you just related). The wizard will ask you to select the default time-field. Select your date field. A default time field is useful because Kibana will take it automatically into account and filter on it properly on the Discover, dashboard and Visualize pages.
refresh the index pattern to get Kibana detect the new mapping.
Go to 'Management > Index patterns' and press the refresh button (top right). This will make Kibana detect the new mapping. I don't think it will reconfigure the index-pattern with a default-date, so the time-picker date-range won't be automatically applied. So my hunch is you probably want to stick with (1), as this is what most people actually need.
yes, I think the template is good. Note that this is applied to all mappings (*), so if you would have mappings with fields that end with *Date, but are not date-fields, those will get updated too.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.