-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix Prometheus node/cluster labels #839
base: main
Are you sure you want to change the base?
Conversation
* lavinmq_node should be the hostname to differentiate nodes in cluster * lavinmq_cluster should be a common cluster name for all nodes, this will allow Prometheus grouping by cluster Cluster name must be set on all nodes, to the same value, via the `clustering_name` variable.
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Happy to discuss other implementations, and if ok I can look at docs. |
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.
looks good :)
Minor: is cluster_name
better than clustering_name
?
Definitely more aesthetically pleasing but ... 🙂 |
Ah.. makes sense, oh well! |
Co-authored-by: Carl Hörberg <carl@84codes.com>
How can you group on it unless you add the label to all metrics? Doing some kind of transformation somewhere? If that's case, isn't it possible to deduct the (CloudAMQP) cluster name by just dropping the last 3 chars from the node name? |
Exactly, you "join" the time series, example:
Not sure that's possible in PromQL if I understand correctly, i.e. group by part of a label. Relevant questions here:
|
Yeah, nothing comes to mind now how we could use this for anything else, hence my hesitation. The label makes sense, but |
WHAT is this pull request doing?
Cluster name must be set on all nodes, to the same value, via the
clustering_name
variable.HOW can this pull request be tested?
Start LavinMQ with
--clustering-name=my-cluster-name
, scrapemetrics
.Example from Prometheus TSDB: