Uptime version 7.0 Graphql error

After the update to version 7.0 the uptime is giving me this error

Any help is appreciated...

Hi @Luis_Pereira1- this is an issue we've run into a few times as well, it looks like the proper mappings for the Heartbeat index are not available. The monitor.id field should be of type keyword but in this case it seems like it is a string type, which is what Elasticsearch would choose as default.

You might try having Heartbeat overwrite the existing template. Feel free to keep us apprised of your progress.


We are also experiencing the same issue.
I tried using heartbeat setup, and the templates are indeed added to our Kibana dashboard under the name heartbeat-7.0.0, but I think the problem lies here:

The index used by Heartbeat for ElasticSearch is called heartbeat-7.0.0, without any daily dates in front, whereas the template has the following property:

index_patterns" : [

Which doesn't match the original heartbeat-7.0.0, and so, again, Elasticsearch ignores this template.

I can't find the solution to this issue. The same happens for Metricbeat as well after upgrading to 7.0.0. We would very much appreciate a solution for this issue.

Here is the output of heartbeat setup:

2019-04-15T08:44:52.793Z        INFO    [index-management]      idxmgmt/std.go:165    Set output.elasticsearch.index to 'heartbeat-7.0.0' as ILM is enabled.
2019-04-15T08:44:52.794Z        INFO    elasticsearch/client.go:165     Elasticsearch url: XXXXXXX
2019-04-15T08:44:52.794Z        INFO    [publisher]     pipeline/module.go:97   Beat name: XXXX-heartbeat-zv4kh
2019-04-15T08:44:52.794Z        INFO    elasticsearch/client.go:165     Elasticsearch url: XXXXXXX
2019-04-15T08:44:52.799Z        INFO    add_cloud_metadata/add_cloud_metadata.go:345  add_cloud_metadata: hosting provider type detected as gce, metadata={"availability_zone":"us-central1-a","instance":{"id":"XXXXX","name":"gke-k8s-XXXXXX"},"machine":{"type":"n1-standard-4"},"project":{"id":"XXXXXX"},"provider":"gce"}
2019-04-15T08:44:52.847Z        INFO    elasticsearch/client.go:734     Attempting to connect to Elasticsearch version 7.0.0
2019-04-15T08:44:52.856Z        INFO    [index-management]      idxmgmt/std.go:223    Auto ILM enable success.
2019-04-15T08:44:52.947Z        INFO    [index-management]      idxmgmt/std.go:238    ILM policy successfully loaded.
2019-04-15T08:44:52.947Z        INFO    [index-management]      idxmgmt/std.go:361    Set setup.template.name to '{heartbeat-7.0.0 {now/d}-000001}' as ILM is enabled.
2019-04-15T08:44:52.947Z        INFO    [index-management]      idxmgmt/std.go:366    Set setup.template.pattern to 'heartbeat-7.0.0-*' as ILM is enabled.
2019-04-15T08:44:52.947Z        INFO    [index-management]      idxmgmt/std.go:400    Set settings.index.lifecycle.rollover_alias in template to {heartbeat-7.0.0 {now/d}-000001} as ILM is enabled.
2019-04-15T08:44:52.948Z        INFO    [index-management]      idxmgmt/std.go:404    Set settings.index.lifecycle.name in template to {heartbeat-7.0.0 map[policy:{"phases":{"hot":{"actions":{"rollover":{"max_age":"30d","max_size":"50gb"}}}}}]} as ILM is enabled.
2019-04-15T08:44:52.952Z        INFO    template/load.go:82     Loading template for Elasticsearch version: 7.0.0
2019-04-15T08:44:52.952Z        INFO    template/load.go:84     Existing template will be overwritten, as overwrite is enabled.
2019-04-15T08:44:53.134Z        INFO    template/load.go:145    Elasticsearch template with name 'heartbeat-7.0.0' loaded
2019-04-15T08:44:53.135Z        INFO    [index-management]      idxmgmt/std.go:272    Loaded index template.
2019-04-15T08:44:53.149Z        INFO    [index-management]      idxmgmt/std.go:281    Write alias exists already
Index setup complete.
Loading dashboards (Kibana must be running and reachable)
2019-04-15T08:44:53.149Z        INFO    kibana/client.go:118    Kibana url: XXXXX
2019-04-15T08:44:53.383Z        INFO    kibana/client.go:118    Kibana url: XXXX
Skipping loading dashboards, No directory /usr/share/heartbeat/kibana/7

I tried manually updating the template and changing index_patterns to heartbeat-* instead of heartbeat-7.0.0-*, and it works indeed.

So, it seems starting from Heartbeat 7.0.0, Index Lifecycle Management is enabled by default, which means there are no more daily indices and there are automatic rollovers instead. In that case, why does ILM set setup.template.pattern = 'heartbeat-7.0.0-*? It should be heartbeat-7.0.0*. Please correct me if I'm wrong. @jkambic


@andrewvc do you have any thoughts on this? I've experienced this issue in development a few times as well, but the solution is much simpler in that case.

This appears to be a race affecting all beats. We're looking into the issue here: https://github.com/elastic/beats/issues/11940

I've updated the Github issue here https://github.com/elastic/beats/issues/11940 with the root cause and a workaround. Please track the issue for further updates.

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