I'm trying to diagnose why my Infrastructure UI is empty. The waffle map is empty, but the metrics explorer is populated. I can search the metricbeat-* index without any problems. The problem arose when upgrading metricbeat to 7.x.
Kibana + Elastissearch versions: 7.3.1
Everything goes straight to Elasticsearch.
The Infrastructure UI configruration option is using "host.name" to identify hosts. And here is the mapping.
by looking at the mapping you're already on the right track. The fact that there is a sub-field called host.name.keyword indicates that the metricbeat index template is not applied correctly.
Unfortunately I've already tried setting the host field to host.name.keyword. I tried again and I'm getting the same results.
I actually removed the template and removed the index to see if this was the problem, and nothing.
For the sake of completeness, I've restarted an agent to create the template and removed the metricbeat-* index and I'm still experiencing the same thing. Once again, I'm still getting nothing in the waffle map and plenty of data in the metrics view.
Here's the template (I couldn't post it here due to length):
Unfortunately I've already tried setting the host field to host.name.keyword.
Yes, it's not as easy as that because the metric calculations rely on other fields as well. I was just using this one field as an indicator that the mapping is incorrect in general. So from the index template you posted we can see that it matches indices with names like metricbeat-7.3.1-*. From your initial post I learned that your index is called metricbeat-7.3.1, which does not match that wildcard string. The template is therefore not applied and Elasticsearch's incorrect dynamic mapping kicks in. By default the beat indices are partitioned by day or using a increasing counter (e.g. metricbeat-7.3.1-2019.09.04 or metricbeat-7.3.1-1) to enable easy management of retention times and to increase query performance. I would recommend to stick with that, which should also lead to the correct index template being applied.
Well, that would make sense. But I am allowing metricbeat to create the default index, which is metricbeat-7.3.1. I'm not specifying an index in output.elasticsearch. It's simply not tagging them by default with a date or a sequential number. I can add it to our fleet of metricbeat agents via config management, but it just doesn't feel like I should have to.
The default setting should indeed produce compatible index names. Would it be possible to provide the filebeat configuration (without credentials, of course)?
If ILM was used metricbeat-7.3.1 should be an alias with the actual index being something like metricbeat-7.3.1-2019.09.04-000001. Can you check that the ILM policy referred to in the index template is installed?
someone or something created an index metricbeat-7.3.1, which doesn't get the correct mapping because it doesn't match any index template
when starting metricbeat it can't correctly set up the metricbeat-7.3.1 rollover alias and just uses the existing index (which doesn't have the mapping)
To confirm, can you check that on startup metricbeat prints something like
INFO [index-management] idxmgmt/std.go:298 Write alias exists already
Sep 4 20:46:29 vgas1607 metricbeat[17620]: 2019-09-04T20:46:29.394+0200#011INFO#011[index-management]#011idxmgmt/std.go:298#011Write alias exists already
Since you're on the money, how do I resolve this? We have a few nodes writing to that index constantly? So even if I remove this index, all the nodes hit that index immediately, not allowing me to the restart the node fast enough to create the alias and the respective indices.
I actually resolved it by stopping all of our agents, restarting one, and then restarting everything up. Not ideal, but it got everything going. Thanks a lot for your time.
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.