Hi, I am trying to use Kibana to display the same field in multiple index documents at once. I have a few database log indices (e.g. prod1-db.log-*, prod2-db.log-*, prod3-db.log-*), each of which has the same document structure as for example,
Now, I want to show/display message fields from all the indices at once in the dashboard, but couldn't find a suitable visualization to present each message, so what's the best way to do that?
Thanks for your questions. There seem to be multiple things there:
So you want to display a single visualization that aggregates stats across those 3 indexes? Right now, a visualization is tied to a single index. Could you merge them into a single index?
Or did you ask what type of visualization would work for the "message" field? It's quite a dense text field, with a lot of information embedded in it. What are you interested in to see from it particularly?
Hi, firstly, I want to display an index in one visualization, which means 3 indices 3 visualizations.
Second, I am wondering what type of visualization could work for the message field. I like to see it entirely if possible, since it will make the semantics complete.
If I understand the message field correctly, it looks like it is unique (?) per document. It will be difficult to do something meaningful with it with the charts. Line charts, bar charts, ... all need to be able to aggregate on a value.
If you just want to see present each message entirely, the "Data Table" visualization may work for you.
In the "Metrics" section, select the "count" aggregation.
For your "Buckets", select a "Terms"-aggregation on the "message" field.
HI, I couldn't find an option/item for message.keyword in the Field drop down box and I couldn't edit any item in the drop down box, and I am using Kibana 4.5.
tl;dr. You're right. The .keyword is a special case. I created the example with the 5.0 alpha versions of ES and Kibana. For older versions, you will to explicitly configure the field-mapping in the index correctly using 'not_analyzed' index-type.
There's been a change in the way ES handles new indices by default. From 5.0, it generates the .keyword field for string-fields, which allow you to aggregate on the entire field (More details can be found here: (https://github.com/elastic/elasticsearch/issues/12394)
In older versions, you can also achieve the same effect. To do this, you need to set the mapping properties of the field correctly. Specifically, you will need to set the index-property of the field to 'not_analyzed' when indexing the data.
So you may have to reindex your data to achieve this.
For an example configuration in 4.5, look at the default logstash-* index created by makelogs. It creates an extra ".raw" field, with a "index: not_analyzed" for every string-field.
I have tried the following XPUT request, while trying to add a new mapping (to make message field not_analyzed) for the existing index (coredev-core.*) like this,
Could you share a few representative sample documents with a message field (the raw version, not the indexed one)? I can try and reproduce here on my end.
Hi, the IllegalArgumentException has been solved by using template.json in logstash, that makes message field not_analyzed. The message is displayed as a whole string now after a bit delay in ELK.
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.