wazuh-prometheus-exporter
wazuh-prometheus-exporter copied to clipboard
[bug] there should be 1 metric `nodes_healthcheck_info` per 1 Wazuh node
We have a Wazuh cluster made of 2 nodes (master & worker). Right now metric nodes_healthcheck_info
is pretty much useless, since we don't know which label value corresponds to which node.
root@wazuh-server1:/var/ossec/logs# curl -s localhost:5000/metrics | grep nodes_healthcheck_info
# HELP nodes_healthcheck_info Wazuh nodes healthcheck
# TYPE nodes_healthcheck_info gauge
nodes_healthcheck_info{name="wazuh-server1"} 1.0
nodes_healthcheck_info{type="master"} 1.0
nodes_healthcheck_info{version="4.7.3"} 1.0
nodes_healthcheck_info{ip="10.0.0.1"} 1.0
nodes_healthcheck_info{n_active_agents="40"} 1.0
nodes_healthcheck_info{name="wazuh-server2"} 1.0
nodes_healthcheck_info{type="worker"} 1.0
nodes_healthcheck_info{version="4.7.3"} 1.0
nodes_healthcheck_info{ip="10.0.0.2"} 1.0
nodes_healthcheck_info{n_active_agents="0"} 1.0
Instead, it should return
nodes_healthcheck_info{name="wazuh-server1", type="master", version="4.7.3", ip="10.0.0.1", n_active_agents="40"} 1.0
nodes_healthcheck_info{name="wazuh-server2", type="worker", version="4.7.3", ip="10.0.0.2", n_active_agents="0"} 1.0