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

Add global_labels environment configuration #91

Merged
merged 1 commit into from Apr 30, 2019

Conversation

essen
Copy link
Collaborator

@essen essen commented Apr 30, 2019

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!

This allows configuring labels that will be added to ALL metrics
without exception.
@gerhard
Copy link
Collaborator

gerhard commented Apr 30, 2019

Works locally as expected. Producing a Docker image for QA-ing the feature in the context of the entire stack - RabbitMQ, Prometheus & Grafana.

@deadtrickster deadtrickster merged commit eb656fc into deadtrickster:master Apr 30, 2019
@deadtrickster
Copy link
Owner

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
Copy link
Collaborator

gerhard commented May 1, 2019

pivotalrabbitmq/rabbitmq-prometheus:3.8.0-alpha.637-2019.05.01 sweetness:

# TYPE erlang_mnesia_held_locks gauge
# HELP erlang_mnesia_held_locks Number of held locks.
erlang_mnesia_held_locks{node="rabbit@rabbitmq1",cluster="rabbit@rabbitmq1"} 0
...
# HELP rabbitmq_node_io_read_total Read operations since node start.
rabbitmq_node_io_read_total{node="rabbit@rabbitmq1",cluster="rabbit@rabbitmq1"} 1
...
erlang_vm_allocators{node="rabbit@rabbitmq1",cluster="rabbit@rabbitmq1",alloc="driver_alloc",instance_no="10",kind="sbcs",usage="carriers_size"} 0

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
@deadtrickster
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants