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

[elasticsearch] Fix host tagging for external clusters. #1282

Merged
merged 2 commits into from
Jan 14, 2015

Conversation

conorbranagan
Copy link
Contributor

When using an external Elasticsearch cluster, we should tag the
hostname by the node's given hostname in the stats output. Otherwise
we end up using only the last node's values because each subsequent
gauge metric will stomp on the one before it.

The test is updated to make sure the hostname given in the stats
(which should be the FQDN) matches what we output at the end.

Finally, this change also splits the cluster health metrics into a
seperate dict. This has two benefits: (a) it will clean up a lot of
debugging logging and extra work for _process_health_data and
(b) makes it easy to check against just the stats metrics for tests.

@LeoCavaille LeoCavaille changed the title Fix host tagging for external Elasticsearch clusters. [elasticsearch] Fix host tagging for external clusters. Jan 8, 2015
@LeoCavaille LeoCavaille added this to the 5.2.0 milestone Jan 8, 2015
@LeoCavaille
Copy link
Member

Looks good to me, only one thing to add maybe (but it is actually a "bug" coming from my refactoring) is to use _is_affirmative(instance.get('is_external', False)) to cast properly any text coming from the configuration.

conorbranagan and others added 2 commits January 14, 2015 20:09
When using an external Elasticsearch cluster, we should tag the
hostname by the node's given hostname in the stats output. Otherwise
we end up using only the last node's values because each subsequent
gauge metric will stomp on the one before it.

The test is updated to make sure the hostname given in the stats
(which should be the FQDN) matches what we output at the end.

Finally, this change also splits the cluster health metrics into a
seperate dict. This has two benefits: (a) it will clean up a lot of
debugging logging and extra work for `_process_health_data` and
(b) makes it easy to check against just the stats metrics for tests.
@LeoCavaille
Copy link
Member

Took care of the small comment above, merging.

LeoCavaille added a commit that referenced this pull request Jan 14, 2015
[elasticsearch] Fix host tagging for external clusters.
@LeoCavaille LeoCavaille merged commit 727d904 into master Jan 14, 2015
@LeoCavaille LeoCavaille deleted the conor/es-external branch January 14, 2015 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants