Skip to content

Allow override $host,$port with env.{host,port} and Fix values calculation #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dsavineau
Copy link

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

urg pushed a commit to PeerJ/elasticsearch-munin that referenced this pull request Dec 29, 2014
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