elasticsearch-munin
elasticsearch-munin copied to clipboard
Allow override $host,$port with env.{host,port} and Fix values calculation
$host and $port variables are hardcoded to 'localhost' and 9200
This commit allow to override these values.
# cat /etc/munin/plugin-conf.d/elasticsearch
[elasticsearch_*]
env.host x.x.x.x
env.port 9300
Values are wrong when having multi nodes. The last one is used.
"cluster_name": "elasticsearch",
"nodes": {
"1pZgzWkNTUqJsPfYcxH6qA": {
(...)
"docs": {
"count": 1221827,
"deleted": 0
},
(...)
"XU_9yAt0R-C6vyaK_iRVpw": {
(...)
"docs": {
"count": 0,
"deleted": 0
},
Plugin return 0 instead of 1221827 + 0 = 1221827
Values in hash %out are not initialize to zero.