ibm-messaging / mq-metric-samples

IBM® MQ metric gathering client samples
Apache License 2.0
59 stars 70 forks source link

RFE: Prioritise the retrieved metrics data to first display the queue and qmgr names #308

Closed abudavis closed 2 months ago

abudavis commented 3 months ago

We are using the latest mq-metrics-sample (v5.6.0) that is compiled to extract metrics from an MQ QMGR on v9.3 running on a RHEL v8 VM.

We send the prometheus metrics to Grafana SaaS Cloud instance.

On the Grafana Cloud dashboard we setup to view mq enqueue rate, the retrieved data line is too long (please see below) and its not possible to see the most important metric which (other than the value of number of messages enqueue) is the qmgr and queue name. We had to painfully copy the entire retrieved string below which you can see when you hover mouse over the graph.

So in a way this is an RFE.

How it is today:

ibmmq_queue_mqput_mqput1_count{description="-", endpoint="metrics", instance="10.131.0.244:9157", job="mq-metric-service-qmgr04", namespace="mq", platform="UNIX", pod="mq-metric-qmgr04-f549b4684-wghww", prometheus="openshift-user-workload-monitoring/user-workload", prometheus_replica="prometheus-user-workload-1", qmgr="QMGR04", queue="TIP230.HEALTHCHECK", service="mq-metric-service-qmgr04", usage="NORMAL"}

How it should be: ibmmq_queue_mqput_mqput1_count{qmgr="QMGR04", queue="TIP230.HEALTHCHECK", description="-", endpoint="metrics", instance="10.131.0.244:9157", job="mq-metric-service-qmgr04", namespace="mq", platform="UNIX", pod="mq-metric-qmgr04-f549b4684-wghww", prometheus="openshift-user-workload-monitoring/user-workload", prometheus_replica="prometheus-user-workload-1", service="mq-metric-service-qmgr04", usage="NORMAL"}

ibmmqmet commented 3 months ago

I don't think that's possible. The display ordering is however Prometheus (or Grafana) decides to format/sort a map: it appears to be alphabetic. But it's certainly not the same order in which the labels were added.

See, for example, here

abudavis commented 2 months ago

Raised as a bug in Grafana cloud