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

Control which instance exports cluster metrics #182

Open
Neraud opened this issue Jun 7, 2020 · 0 comments
Open

Control which instance exports cluster metrics #182

Neraud opened this issue Jun 7, 2020 · 0 comments

Comments

@Neraud
Copy link
Contributor

Neraud commented Jun 7, 2020

Currently, cluster metrics are only exported on the Leader node.

For a GD1 cluster, that's the peer with the maximum UUID (lexicographically) (https://github.com/gluster/gluster-prometheus/blob/master/pkg/glusterutils/exporterd.go#L23)

In my case, that happens to be a smaller machine than other peers, and running the exporter with all collectors enabled generates a visible load (and audible fan speed increase).
(TBH, my home cluster is using small hosts and that's most probably not a recommended sizing).

It would be great to be able to control on which host cluster metrics are exported.

For example, using a configuration flag : expose-cluster-metrics: [auto|true|false]
auto would be the default and would still use the current IsLeader test.
true and false would override the IsLeader test.

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

No branches or pull requests

1 participant