-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Allow for force gathering ES cluster stats #4345
Allow for force gathering ES cluster stats #4345
Conversation
I don't think the circleci error is due to my change. It's failing on dep ensure but I didn't changed anything on dependencies. I suspect a timeout while fetching dependencies. |
I'm thinking we'll update these lines to be |
We can always collect cluster_stats, and (with this PR) as soon as cluster_stats = True, they will be collected. |
Makes sense, do you think it is possible for us to know which host is the one we connected to when using |
CHANGELOG.md
Outdated
@@ -12,6 +12,7 @@ | |||
|
|||
### Features | |||
|
|||
- [#4345](https://github.com/influxdata/telegraf/pull/4345): Allow to force gathering Elasticsearch cluster stats on non-master node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only suggestion is to remove update to the changelog to prevent merge conflict
Sorry for the delay. I've removed the changelog entry to avoid merge conflict. About @danielnelson query: the behavior (the PR didn't change this) is:
We could do an additional query on /_node/_local to known the current node ID, and the query /_nodes/stats, but that means one additional query at each gather. |
Signed-off-by: Pierre Fersing <[email protected]>
Signed-off-by: Pierre Fersing <[email protected]>
536bb43
to
2aa3d78
Compare
Do you want me to do the additional query on each gather to simplify configuration ? Or is it anything else missing to merge this PR ? |
Let's go with this for now. I wonder if we should consider dropping local=false mode completely though, I feel like the flexibility of this plugin is complicating things and it might be better to just have one clear way to monitor the cluster. |
Add option to gather Elasticsearch cluster stats from all node (default is old behavior, stats are only gathered from master).
Also documented the fact that gathering only from master node only works if local = true.
Slightly changed behavior when local=false and cluster_stats=true. Previous behavior was undetermined (it gather cluster stats only if the last node is the master node. The order was based on the order of a map which is probably not fixed). New behavior is the documented one: if local = false, we gather from all node.