Prometheus is perfectly suited for these string values. The semi-static
boolean 0/1 values compress very well, making it very efficient to store in
the TSDB.

There are three ways to handle this in the snmp_exporter. Default
DisplayString as you have it, EnumAsInfo, and EnumAsStateSet.

EnumAsInfo is useful for strings that you don't expect to change often / at
all.

EnumAsStateSet is useful for metrics where you are expecting the state to
change. I'm guessing for your use case you want to use this one.

Once you have this, you will get 8 series, but they will have a 0 or 1 for
which the ENUM is set. Then you can graph 'cp850BitstreamFormat == 1' to
view which is active.

It would help if you posted a link to the MIB, as it would help to
understand the underlying data.

On Wed, Aug 16, 2023 at 7:06 AM 'Elliott Balsley' via Prometheus Users <
[email protected]> wrote:

> As I'm evaluating Prometheus for SNMP monitoring, it seems like it's not
> well suited for tracking string values.  Is that correct, or can anyone
> share how it's working for them?
> As an example, I'm monitoring a Dolby CP850 and one of the metrics is
> returned like this:
>
> cp850BitstreamFormat{cp850BitstreamFormat="dolbyAtmos"} 1
>
> There are 8 possible string values for that one.  This OID type is
> OctetString, and I am overriding to be DisplayString.  So this becomes 8
> separate time series, which is very hard to graph appropriately.  My goal
> is to track this (among other similar metrics) on a State Timeline in
> grafana, where the key on the Y axis is "Bitstream Format" and the values
> shows "dolbyAtmos", "pcm", "dolbyDigital", etc.
>
> I appreciate any ideas!
>
> --
> 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/CALajkdjJ_raGUTtfTmg9RGtBAWAcHuYoNz7CMm%3DfWuhBbEFocQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/prometheus-users/CALajkdjJ_raGUTtfTmg9RGtBAWAcHuYoNz7CMm%3DfWuhBbEFocQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CABbyFmrUy%3D0VLBCUvdLYS8pVUe679Ui3zYEA3PcemiQBntN%3DjQ%40mail.gmail.com.

Reply via email to