How to see multiple different metrics in one window

2,068 views
Skip to first unread message

vikas....@gmail.com

unread,
Jul 18, 2018, 10:34:24 AM7/18/18
to Prometheus Users
I want below metrics in one graph, can some suggest single query please,

1. node_memory_MemFree{instance="ins1",job="system"}
2. node_memory_MemTotal{instance="ins1",job="system"}
3. node_memory_MemAvailable{instance="ins1",job="system"}

Ben Kochie

unread,
Jul 18, 2018, 10:49:31 AM7/18/18
to vikas....@gmail.com, Prometheus Users
This is not supported by the current UI. I would recommend using Grafana, which can overlay multiple query results in the same graph.


--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/6b47c3c8-d105-458d-bce3-a5edf267317f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alin Sînpălean

unread,
Jul 19, 2018, 3:55:45 AM7/19/18
to Prometheus Users
I would also recommend Grafana for any graphing/dashboards, but for the record, you can overlay multiple metrics on a graph in Prometheus. One solution (specifically for your case) is

      node_memory_MemFree{instance="ins1",job="system"}
    or
      node_memory_MemTotal{instance="ins1",job="system"}
    or
      node_memory_MemAvailable{instance="ins1",job="system"}

The other option is

    {__name__=~"node_memory_MemFree|node_memory_MemTotal|node_memory_MemAvailable",instance="ins1",job="system"}

But, getting back to the specifics of your case, the MemFreeMemTotal and MemAvailable should be labels, not part of the metric name, to begin with. Then you would not have this problem (and loads of similar ones) to begin with.

Cheers,
Alin.

Ben Kochie

unread,
Jul 19, 2018, 4:05:14 AM7/19/18
to Alin Sînpălean, Prometheus Users
On Thu, Jul 19, 2018 at 9:55 AM Alin Sînpălean <alin.si...@gmail.com> wrote:
I would also recommend Grafana for any graphing/dashboards, but for the record, you can overlay multiple metrics on a graph in Prometheus. One solution (specifically for your case) is

      node_memory_MemFree{instance="ins1",job="system"}
    or
      node_memory_MemTotal{instance="ins1",job="system"}
    or
      node_memory_MemAvailable{instance="ins1",job="system"}

The other option is

    {__name__=~"node_memory_MemFree|node_memory_MemTotal|node_memory_MemAvailable",instance="ins1",job="system"}

But, getting back to the specifics of your case, the MemFreeMemTotal and MemAvailable should be labels, not part of the metric name, to begin with. Then you would not have this problem (and loads of similar ones) to begin with.

No, these are standard node_exporter metrics, we have discussed several times about what to do with these metrics, and have decided that labels would be inappropriate due to the somewhat opaque nature of the kernel data, and the somewhat random differences in the data between kernel versions.  For example, MemAvailable doesn't exist on all kernel versions.
 

Cheers,
Alin.

On Wednesday, July 18, 2018 at 4:49:31 PM UTC+2, Ben Kochie wrote:
This is not supported by the current UI. I would recommend using Grafana, which can overlay multiple query results in the same graph.


On Wed, Jul 18, 2018 at 4:34 PM <vikas....@gmail.com> wrote:
I want below metrics in one graph, can some suggest single query please,

1. node_memory_MemFree{instance="ins1",job="system"}
2. node_memory_MemTotal{instance="ins1",job="system"}
3. node_memory_MemAvailable{instance="ins1",job="system"}

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/6b47c3c8-d105-458d-bce3-a5edf267317f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.

Alin Sînpălean

unread,
Jul 19, 2018, 4:54:30 AM7/19/18
to Ben Kochie, Prometheus Users
Oh, I see. Thanks for the clarification.

It very likely makes sense for node_exporter as a whole, but I as a user would still relabel those on ingestion. (Partly based on the assumption that the machines I'm managing are more or less homogeneous and therefore the metrics will all be there and have a clearly defined meaning in my particular case.)

Cheers,
Alin.

Ben Kochie

unread,
Jul 19, 2018, 9:27:33 AM7/19/18
to Alin Sînpălean, Prometheus Users
Yes, we do some recording rules to normalize the node memory metrics.

Reply all
Reply to author
Forward
0 new messages