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
Add global_labels environment configuration #91
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows configuring labels that will be added to ALL metrics without exception.
Works locally as expected. Producing a Docker image for QA-ing the feature in the context of the entire stack - RabbitMQ, Prometheus & Grafana. |
Thank you |
gerhard
added a commit
to rabbitmq/rabbitmq-prometheus
that referenced
this pull request
May 1, 2019
This includes the global_labels feature introduced in deadtrickster/prometheus.erl#91 To test, run `docker-compose up` in docker dir, then navigate to localhost:15692/metrics & localhost:3000/dashboards (admin:admin) to see the Grafana RabbitMQ Overview dashboard.
|
gerhard
added a commit
to rabbitmq/rabbitmq-common
that referenced
this pull request
May 1, 2019
gerhard
added a commit
to rabbitmq/rabbitmq-public-umbrella
that referenced
this pull request
May 1, 2019
pushed hex package, heh |
gerhard
added a commit
to rabbitmq/rabbitmq-prometheus
that referenced
this pull request
Aug 15, 2019
This started in the context of prometheus/docs#1414, specifically prometheus/docs#1414 (comment) Rather than labelling all metrics with the same label, we are introducing 2 new metrics: rabbitmq_build_info & rabbitmq_identity_info. I suspect that we may want to revert deadtrickster/prometheus.erl#91 when we agree that the proposed alternative is better. We are yet to see through changes in Grafana dashboards. I am most interested in how the updated queries will look like and, more importantly, if we will have the same panels as we do now. More commits to follow shortly, wanted to get this out the door first. In summary, this commit changes: # TYPE erlang_mnesia_held_locks gauge # HELP erlang_mnesia_held_locks Number of held locks. erlang_mnesia_held_locks{node="rabbit@920f1e3272af",cluster="rabbit@920f1e3272af",rabbitmq_version="3.8.0-alpha.806",erlang_version="22.0.7"} 0 # TYPE erlang_mnesia_lock_queue gauge # HELP erlang_mnesia_lock_queue Number of transactions waiting for a lock. erlang_mnesia_lock_queue{node="rabbit@920f1e3272af",cluster="rabbit@920f1e3272af",rabbitmq_version="3.8.0-alpha.806",erlang_version="22.0.7"} 0 ... To this: # TYPE erlang_mnesia_held_locks gauge # HELP erlang_mnesia_held_locks Number of held locks. erlang_mnesia_held_locks 0 # TYPE erlang_mnesia_lock_queue gauge # HELP erlang_mnesia_lock_queue Number of transactions waiting for a lock. erlang_mnesia_lock_queue 0 ... # TYPE rabbitmq_build_info untyped # HELP rabbitmq_build_info RabbitMQ & Erlang/OTP version info rabbitmq_build_info{rabbitmq_version="3.8.0-alpha.809",prometheus_plugin_version="3.8.0-alpha.809-2019.08.15",prometheus_client_version="4.4.0",erlang_version="22.0.7"} 1 # TYPE rabbitmq_identity_info untyped # HELP rabbitmq_identity_info Node & cluster identity info rabbitmq_identity_info{node="rabbit@bc7aeb0c2564",cluster="rabbit@bc7aeb0c2564"} 1 ... [#167846096]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows configuring labels that will be added to ALL metrics
without exception.
#88
I have added tests for all types of metrics and built-in collectors. I don't know if @gerhard has tested it yet, maybe wait for his OK before merge. If you need some changes or additions you know where to find me!