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 prometheus label "raft_cluster" to non-QQ raft metrics #12148

Merged
merged 1 commit into from
Sep 4, 2024

Commits on Aug 30, 2024

  1. Add prometheus tags for raft_cluster to non-QQ raft metrics

    By default Ra will use the cluster name as the metrics key. Currently
    atom values are ignored by the prometheus plugin's tag rendering
    functions, so if you have a QQ and Khepri running and request the
    `/metrics/per-object` or `/metrics/detailed` endpoints you'll see values
    that don't have labels set for the `ra_metrics` metrics:
    
        # TYPE rabbitmq_raft_term_total counter
        # HELP rabbitmq_raft_term_total Current Raft term number
        rabbitmq_raft_term_total{vhost="/",queue="qq"} 9
        rabbitmq_raft_term_total 10
    
    With this change we map the name of the Ra cluster to a "raft_cluster"
    tag, so instead an example metric might be:
    
        # TYPE rabbitmq_raft_term_total counter
        # HELP rabbitmq_raft_term_total Current Raft term number
        rabbitmq_raft_term_total{vhost="/",queue="qq"} 9
        rabbitmq_raft_term_total{raft_cluster="rabbitmq_metadata"} 10
    
    This affects metrics for Khepri and the stream coordinator.
    the-mikedavis committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    512f883 View commit details
    Browse the repository at this point in the history