Skip to content
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

wrong url in elastic.py can.connect monitor used for version > 0.90.10 #1402

Closed
flutist599 opened this issue Feb 27, 2015 · 2 comments · Fixed by #1487
Closed

wrong url in elastic.py can.connect monitor used for version > 0.90.10 #1402

flutist599 opened this issue Feb 27, 2015 · 2 comments · Fixed by #1487
Milestone

Comments

@flutist599
Copy link

The new URLS are /_nodes/stats?all=true

But the datadog uses sometimes the old one: /_cluster/nodes/stats?all=true

elastic.py

Old version: (only interesting parts)
/opt/datadog-agent/agent/checks.d/elastic.py

if version >= [0,90,10]:
            if is_external:
                self.STATS_URL = "/_nodes/stats?all=true"
            else:
                self.STATS_URL = "/_nodes/_local/stats?all=true"
else:
            self.STATS_URL = "/_cluster/nodes/stats?all=true"
            self.NODES_URL = "/_cluster/nodes?network=true"```

fixed version should be: (only interesting parts)
/opt/datadog-agent/agent/checks.d/elastic.py

if version >= [0,90,10]:
            if is_external:
                self.STATS_URL = "/_nodes/stats?all=true"
            else:
                self.STATS_URL = "/_nodes/_local/stats?all=true"
else:
            if is_external:
                self.STATS_URL = "/_nodes/stats?all=true"
            else:
                self.STATS_URL = "/_nodes/_local/stats?all=true"
@remh remh added this to the 5.3.0 milestone Feb 27, 2015
@remh
Copy link

remh commented Feb 27, 2015

Thanks a lot for the feedback @flutist599 we will investigate.

@pbuchner
Copy link

pbuchner commented Mar 2, 2015

This bug only occurs if there is a problem while getting the metrics.
Per Default the "version" variable is set to [0,0,0] ... and this is smaller then [0,90,10].
But the script should raise an error if it is not possible to get the metrics ... the current version goes ahead and uses therefore the wrong STATS_URL because the version is still at its default value of [0,0,0]

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 a pull request may close this issue.

3 participants