On Sun, 17 May 2020 at 03:08, Daniel Lo Nigro <[email protected]> wrote: > I've noticed that for some metrics, Prometheus node_exporter will use one > metric name and separate labels. For example, CPU usage has a "mode" label: > > node_cpu_seconds_total{cpu="0",mode="idle"} 320045.23 > node_cpu_seconds_total{cpu="0",mode="steal"} 0 > node_cpu_seconds_total{cpu="0",mode="system"} 3703.1 > node_cpu_seconds_total{cpu="0",mode="user"} 4713.87 > > Whereas for other metrics, it uses separate metric names. For example, > memory usage: > > node_memory_MemAvailable_bytes 1.00470784e+08 > node_memory_MemFree_bytes 5.3211136e+07 > node_memory_MemTotal_bytes 2.68435456e+08 > > Both are bounded (there's a fixed number of CPU modes, and a fixed number > of memory fields) so I'm not sure why the implementation differs between > the two. > > Is this intentional? If so, is there a guideline or best practice as to > when to do the former vs when to do the latter? >
See https://prometheus.io/docs/practices/instrumentation/#things-to-watch-out-for Brian > > Thanks! > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/8722a500-e5c9-443e-8183-6bdb76699509%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/8722a500-e5c9-443e-8183-6bdb76699509%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Brian Brazil www.robustperception.io -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAHJKeLrSCwA6k69Xga7QuoZTxeJZT5EktSJXhHH0Wt3phemboQ%40mail.gmail.com.

