Monitoring of Opensearch with Elasticsearch plugin

CMK version: 2.0.0p33.cre
OS version: Debian Buster

When trying to monitor newer versions of OpenSearch with the ElasticSearch plugin, parsing crashes with a KeyError when it encounters discovered_master. This additional new key needs to be accounted for in lib/python3/cmk/gui/plugins/wato/check_parameters/elasticsearch_cluster_health.py and share/check_mk/checks/elasticsearch_cluster_health

While changes are being made, it appears that this key is being superseded with discovered_cluster_manager, so it should be added as well.

Something like

2.0.0p33.cre/share/check_mk/checks/elasticsearch_cluster_health
27d26
<     'discovered_master': 'Node Manager Discovered',
85,86d83
<             yield 0, "%s: %s" % (infotext, value)
<         elif info == "discovered_master":


2.0.0p33.cre/lib/python3/cmk/gui/plugins/wato/check_parameters/elasticsearch_cluster_health.py
54c54
<         optional_keys=["number_of_nodes", "number_of_data_nodes", "green", "yellow", "red", "discovered_master"],
---
>         optional_keys=["number_of_nodes", "number_of_data_nodes", "green", "yellow", "red"],

In general, does the ELK Checks work for Opensearch?

With the changes I mention above, yes. Until then it crashes with a KeyError error message during discovery.

With the changes above, the plugin works with ELK and OpenSearch.

1 Like

For opensearch 2.6.0 also the field discovered_cluster_manager is needed to make the integration work.
Is there interest from side of tribe29 to integrate this into checkmk? Fixing this manually is annoying…

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.