Skip to content

Conversation

@y-ken
Copy link
Owner

@y-ken y-ken commented Apr 22, 2014


Note: quoted from: mickm#3

$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.

y-ken added a commit that referenced this pull request Apr 22, 2014
Allow override $host,$port with env.{host,port} and Fix values calculation
@y-ken y-ken merged commit cac07f7 into y-ken:master Apr 22, 2014
@y-ken y-ken self-assigned this Jan 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant