Converting SNMP Octet String to usable data.

4,029 views
Skip to first unread message

cste...@gmail.com

unread,
Apr 24, 2018, 11:05:32 AM4/24/18
to Prometheus Users
I have snmp_exporter running and I am able to get data.  Issue I'm having is some of the data is coming as an Octet String

Object in MIB file

     fanSpeed    OBJECT-TYPE
                  SYNTAX  OCTET STRING 
                  ACCESS  read-only
                  STATUS  mandatory
                  DESCRIPTION
                  "Fan  speed expressed in percent(%) of maximum RPM. 
                  An octet string expressed as 'ddd% of maximum' where:
                  d is a decimal digit or blank space for a leading zero.
                  If the fan is determined not to be running or 
                  the fan speed cannot be determined, the string will
                  indicate 'Offline'."   
                  ::= { fanEntry 3 }

Data reported by snmp_exporter
# HELP fanSpeed Fan speed expressed in percent(%) of maximum RPM - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
# TYPE fanSpeed gauge
fanSpeed{fanIndex="1",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="2",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="3",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="4",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="5",fanSpeed="0x20333125206F66206D6178696D756D"} 1

How do I convert/extract the fan speed percentage?

Brian Brazil

unread,
Apr 24, 2018, 11:15:15 AM4/24/18
to cste...@gmail.com, Prometheus Users
What you want to do is hack the MIB for the syntax to be DisplayString instead as it sounds to be ASCII, and then use regex_extracts feature to pull out the number(s). 

--

Ben Kochie

unread,
Apr 24, 2018, 11:47:35 AM4/24/18
to Brian Brazil, cste...@gmail.com, Prometheus Users
Related, there's an issue open to make it easier to override.  I worked up a crappy patch, but it needs cleanup before we can merge it.


Once that's in, it'll be easier to deal with this mapping in the generator.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAHJKeLqcGPoLERNbY2rT4XAmmfiKG1W4DF4a-DmdBX5hwMabTA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Hossman12

unread,
Apr 24, 2018, 12:42:17 PM4/24/18
to Prometheus Users
Do you have an example?   I did run 0x20333225206F66206D6178696D756D thru a hex to text convert and get the result  32% of maximum
If I strip of the "0x" and "25206F66206D6178696D756D"  I'm left with "203332" which converts to 32 which is the reported fan speed %.  The other fan running at a different speed converted the same way.
Is there a way in prometheus or graphana to convert the hex into a usable number/string?

Ben Kochie

unread,
Apr 24, 2018, 1:38:35 PM4/24/18
to Hossman12, Prometheus Users
If you could share the snmp.yml config for that metric, we could point you in the right direction.

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.

artem.n...@gmail.com

unread,
Apr 24, 2018, 2:16:19 PM4/24/18
to Prometheus Users
I have a very similar issue with Arista BGP4-V2 MIB, IPv4 and IPv6 addresses are in HEX. Tried to change the "aristaBgp4V2PeerRemoteAddr" type to IpAddr or DisplayString, no luck. 

{alias="blah",aristaBgp4V2PeerDescription="bla-bla",aristaBgp4V2PeerInstance="1",aristaBgp4V2PeerRemoteAddr="0x0AFCA421",aristaBgp4V2PeerRemoteAddrType="1",instance="1.1.1.1",job="snmp-arista-generic"}


SNMP config:

  - name: aristaBgp4V2PeerAdminStatus
    oid: 1.3.6.1.4.1.30065.4.1.1.2.1.12
    type: gauge
    help: Whether or not the BGP FSM for this remote peer is halted or running - 1.3.6.1.4.1.30065.4.1.1.2.1.12
    indexes:
    - labelname: aristaBgp4V2PeerInstance
      type: gauge
    - labelname: aristaBgp4V2PeerRemoteAddrType
      type: gauge
    - labelname: aristaBgp4V2PeerRemoteAddr
      type: OctetString
  - name: aristaBgp4V2PeerState
    oid: 1.3.6.1.4.1.30065.4.1.1.2.1.13
    type: gauge
    help: The BGP peer connection state. - 1.3.6.1.4.1.30065.4.1.1.2.1.13
    indexes:
    - labelname: aristaBgp4V2PeerInstance
      type: gauge
    - labelname: aristaBgp4V2PeerRemoteAddrType
      type: gauge
    - labelname: aristaBgp4V2PeerRemoteAddr
      type: OctetString
  - name: aristaBgp4V2PeerDescription
    oid: 1.3.6.1.4.1.30065.4.1.1.2.1.14
    type: DisplayString
    help: A user configured description identifying this peer - 1.3.6.1.4.1.30065.4.1.1.2.1.14
    indexes:
    - labelname: aristaBgp4V2PeerInstance
      type: gauge
    - labelname: aristaBgp4V2PeerRemoteAddrType
      type: gauge
    - labelname: aristaBgp4V2PeerRemoteAddr
      type: OctetString

Brian Brazil

unread,
Apr 24, 2018, 2:30:44 PM4/24/18
to artem.n...@gmail.com, Prometheus Users
On 24 April 2018 at 19:16, <artem.n...@gmail.com> wrote:
I have a very similar issue with Arista BGP4-V2 MIB, IPv4 and IPv6 addresses are in HEX. Tried to change the "aristaBgp4V2PeerRemoteAddr" type to IpAddr or DisplayString, no luck. 

{alias="blah",aristaBgp4V2PeerDescription="bla-bla",aristaBgp4V2PeerInstance="1",aristaBgp4V2PeerRemoteAddr="0x0AFCA421",aristaBgp4V2PeerRemoteAddrType="1",instance="1.1.1.1",job="snmp-arista-generic"}

That is a different thing. Please make sure you're using the latest version of the generator and exporter.

Brian
 

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

artem.n...@gmail.com

unread,
Apr 24, 2018, 2:38:17 PM4/24/18
to Prometheus Users
I do use snmp_exporter-0.9.0.linux-amd64 and latest generator. 
Not sure how to represent the data in a human readable format. 
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.



--

Hossman12

unread,
Apr 24, 2018, 3:17:36 PM4/24/18
to Prometheus Users
I've attached the full yml but here is the specific metric that I'm referencing


  - name: fanSpeed
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
    type: OctetString
    help: Fan speed expressed in percent(%) of maximum RPM - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
    indexes:
    - labelname: fanIndex
      type: gauge

Here is the output from snmp_exporter

# HELP fanSpeed Fan speed expressed in percent(%) of maximum RPM - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
# TYPE fanSpeed gauge
fanSpeed{fanIndex="1",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="2",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="3",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="4",fanSpeed="0x20333225206F66206D6178696D756D"} 1
fanSpeed{fanIndex="5",fanSpeed="0x20333125206F66206D6178696D756D"} 1


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.
imm-snmp.yml

Ben Kochie

unread,
Apr 24, 2018, 4:35:00 PM4/24/18
to Hossman12, Prometheus Users
Try the config from here: https://github.com/SuperQ/tools/tree/master/snmp_exporter/ibm

I think that should do what you need.

Note, this is generated from a slightly patched generator.  It includes a labeling change[0], and an overrides change[1].

Neither of these two patches are official (yet).


To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/8daef8b4-d0af-438a-8fc1-68e9fd58c9ab%40googlegroups.com.

Hossman12

unread,
Apr 25, 2018, 8:24:56 AM4/25/18
to Prometheus Users
I tried the update snmp.yml this morning and no fan speeds were reported

# HELP fanCritLimitHigh The high critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.5
# TYPE fanCritLimitHigh gauge
fanCritLimitHigh{fanDescr="Fan 1 Tach",fanIndex="1"} 0
fanCritLimitHigh{fanDescr="Fan 2 Tach",fanIndex="2"} 0
fanCritLimitHigh{fanDescr="Fan 3 Tach",fanIndex="3"} 0
fanCritLimitHigh{fanDescr="Fan 4 Tach",fanIndex="4"} 0
fanCritLimitHigh{fanDescr="Fan 5 Tach",fanIndex="5"} 0
# HELP fanCritLimitLow The low critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.8
# TYPE fanCritLimitLow gauge
fanCritLimitLow{fanDescr="Fan 1 Tach",fanIndex="1"} 3500
fanCritLimitLow{fanDescr="Fan 2 Tach",fanIndex="2"} 3500
fanCritLimitLow{fanDescr="Fan 3 Tach",fanIndex="3"} 3500
fanCritLimitLow{fanDescr="Fan 4 Tach",fanIndex="4"} 3500
fanCritLimitLow{fanDescr="Fan 5 Tach",fanIndex="5"} 3500
# HELP fanDescr A description of the fan measurement channel. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
# TYPE fanDescr gauge
fanDescr{fanDescr="Fan 1 Tach",fanIndex="1"} 1
fanDescr{fanDescr="Fan 2 Tach",fanIndex="2"} 1
fanDescr{fanDescr="Fan 3 Tach",fanIndex="3"} 1
fanDescr{fanDescr="Fan 4 Tach",fanIndex="4"} 1
fanDescr{fanDescr="Fan 5 Tach",fanIndex="5"} 1
# HELP fanHealthStatus A description of the fan component status. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.10
# TYPE fanHealthStatus gauge
fanHealthStatus{fanDescr="Fan 1 Tach",fanHealthStatus="Normal",fanIndex="1"} 1
fanHealthStatus{fanDescr="Fan 2 Tach",fanHealthStatus="Normal",fanIndex="2"} 1
fanHealthStatus{fanDescr="Fan 3 Tach",fanHealthStatus="Normal",fanIndex="3"} 1
fanHealthStatus{fanDescr="Fan 4 Tach",fanHealthStatus="Normal",fanIndex="4"} 1
fanHealthStatus{fanDescr="Fan 5 Tach",fanHealthStatus="Normal",fanIndex="5"} 1
# HELP fanIndex This column is used to identify a particular fan. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.1
# TYPE fanIndex gauge
fanIndex{fanDescr="Fan 1 Tach",fanIndex="1"} 1
fanIndex{fanDescr="Fan 2 Tach",fanIndex="2"} 2
fanIndex{fanDescr="Fan 3 Tach",fanIndex="3"} 3
fanIndex{fanDescr="Fan 4 Tach",fanIndex="4"} 4
fanIndex{fanDescr="Fan 5 Tach",fanIndex="5"} 5
# HELP fanNonCritLimitHigh The high non-critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.6
# TYPE fanNonCritLimitHigh gauge
fanNonCritLimitHigh{fanDescr="Fan 1 Tach",fanIndex="1"} 0
fanNonCritLimitHigh{fanDescr="Fan 2 Tach",fanIndex="2"} 0
fanNonCritLimitHigh{fanDescr="Fan 3 Tach",fanIndex="3"} 0
fanNonCritLimitHigh{fanDescr="Fan 4 Tach",fanIndex="4"} 0
fanNonCritLimitHigh{fanDescr="Fan 5 Tach",fanIndex="5"} 0
# HELP fanNonCritLimitLow The low non-critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.9
# TYPE fanNonCritLimitLow gauge
fanNonCritLimitLow{fanDescr="Fan 1 Tach",fanIndex="1"} 0
fanNonCritLimitLow{fanDescr="Fan 2 Tach",fanIndex="2"} 0
fanNonCritLimitLow{fanDescr="Fan 3 Tach",fanIndex="3"} 0
fanNonCritLimitLow{fanDescr="Fan 4 Tach",fanIndex="4"} 0
fanNonCritLimitLow{fanDescr="Fan 5 Tach",fanIndex="5"} 0
# HELP fanNonRecovLimitHigh The high non-recoverable limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.4
# TYPE fanNonRecovLimitHigh gauge
fanNonRecovLimitHigh{fanDescr="Fan 1 Tach",fanIndex="1"} 0
fanNonRecovLimitHigh{fanDescr="Fan 2 Tach",fanIndex="2"} 0
fanNonRecovLimitHigh{fanDescr="Fan 3 Tach",fanIndex="3"} 0
fanNonRecovLimitHigh{fanDescr="Fan 4 Tach",fanIndex="4"} 0
fanNonRecovLimitHigh{fanDescr="Fan 5 Tach",fanIndex="5"} 0
# HELP fanNonRecovLimitLow The low non-recoverable limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.7
# TYPE fanNonRecovLimitLow gauge
fanNonRecovLimitLow{fanDescr="Fan 1 Tach",fanIndex="1"} 0
fanNonRecovLimitLow{fanDescr="Fan 2 Tach",fanIndex="2"} 0
fanNonRecovLimitLow{fanDescr="Fan 3 Tach",fanIndex="3"} 0
fanNonRecovLimitLow{fanDescr="Fan 4 Tach",fanIndex="4"} 0
fanNonRecovLimitLow{fanDescr="Fan 5 Tach",fanIndex="5"} 0
# HELP snmp_scrape_duration_seconds Total SNMP time scrape took (walk and processing).
# TYPE snmp_scrape_duration_seconds gauge
snmp_scrape_duration_seconds 1.622764093
# HELP snmp_scrape_pdus_returned PDUs returned from walk.
# TYPE snmp_scrape_pdus_returned gauge
snmp_scrape_pdus_returned 50
# HELP snmp_scrape_walk_duration_seconds Time SNMP walk/bulkwalk took.
# TYPE snmp_scrape_walk_duration_seconds gauge
snmp_scrape_walk_duration_seconds 1.622233176

Ben Kochie

unread,
Apr 25, 2018, 9:21:48 AM4/25/18
to Hossman12, Prometheus Users
I may have made a mistake in the regexp, not sure exactly.

To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ece9f518-aceb-40b5-8a41-0e7a769c489f%40googlegroups.com.

Hossman12

unread,
Apr 26, 2018, 4:05:55 PM4/26/18
to Prometheus Users
Is there a time frame for releasing the patched version of the generator?  

Hossman12

unread,
Aug 15, 2018, 2:45:51 PM8/15/18
to Prometheus Users
Coming back to re-visit this issue.  I have update to the latest snmp_exporter 0.12.0 and updated the generator.  I still have the issue with the octet string data.  Has there been any progress on how the information can be extracted?

Hossman12

unread,
Aug 15, 2018, 3:09:51 PM8/15/18
to Prometheus Users
Here is what my current configurations are
generator.yml
  ibm_imm:
    walk:
      -  1.3.6.1.4.1.2.3.51.3.1.3 # fans
    lookups:
      - old_index: fanIndex
        new_index: fanDescr

The generated snmp.yml
ibm_imm:
  walk:
  - 1.3.6.1.4.1.2.3.51.3.1.3
  metrics:
  - name: fanNumber
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.1
    type: gauge
    help: The present number of rows in the fan table. - 1.3.6.1.4.1.2.3.51.3.1.3.1
  - name: fanIndex
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.1
    type: gauge
    help: This column is used to identify a particular fan. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.1
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanDescr
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
    type: DisplayString
    help: A description of the fan measurement channel. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanSpeed
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
    type: OctetString
    help: Fan speed expressed in percent(%) of maximum RPM - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanNonRecovLimitHigh
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.4
    type: gauge
    help: The high non-recoverable limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.4
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanCritLimitHigh
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.5
    type: gauge
    help: The high critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.5
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanNonCritLimitHigh
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.6
    type: gauge
    help: The high non-critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.6
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanNonRecovLimitLow
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.7
    type: gauge
    help: The low non-recoverable limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.7
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanCritLimitLow
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.8
    type: gauge
    help: The low critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.8
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanNonCritLimitLow
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.9
    type: gauge
    help: The low non-critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.9
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString
  - name: fanHealthStatus
    oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.10
    type: DisplayString
    help: A description of the fan component status. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.10
    indexes:
    - labelname: fanDescr
      type: gauge
    lookups:
    - labels:
      - fanDescr
      labelname: fanDescr
      oid: 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
      type: DisplayString

Output from snmp_exporter
      
# HELP fanCritLimitHigh The high critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.5
# TYPE fanCritLimitHigh gauge
fanCritLimitHigh{fanDescr="Fan 1 Tach"} 0
fanCritLimitHigh{fanDescr="Fan 2 Tach"} 0
fanCritLimitHigh{fanDescr="Fan 3 Tach"} 0
fanCritLimitHigh{fanDescr="Fan 4 Tach"} 0
fanCritLimitHigh{fanDescr="Fan 5 Tach"} 0
# HELP fanCritLimitLow The low critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.8
# TYPE fanCritLimitLow gauge
fanCritLimitLow{fanDescr="Fan 1 Tach"} 3500
fanCritLimitLow{fanDescr="Fan 2 Tach"} 3500
fanCritLimitLow{fanDescr="Fan 3 Tach"} 3500
fanCritLimitLow{fanDescr="Fan 4 Tach"} 3500
fanCritLimitLow{fanDescr="Fan 5 Tach"} 3500
# HELP fanDescr A description of the fan measurement channel. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.2
# TYPE fanDescr gauge
fanDescr{fanDescr="Fan 1 Tach"} 1
fanDescr{fanDescr="Fan 2 Tach"} 1
fanDescr{fanDescr="Fan 3 Tach"} 1
fanDescr{fanDescr="Fan 4 Tach"} 1
fanDescr{fanDescr="Fan 5 Tach"} 1
# HELP fanHealthStatus A description of the fan component status. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.10
# TYPE fanHealthStatus gauge
fanHealthStatus{fanDescr="Fan 1 Tach",fanHealthStatus="Normal"} 1
fanHealthStatus{fanDescr="Fan 2 Tach",fanHealthStatus="Normal"} 1
fanHealthStatus{fanDescr="Fan 3 Tach",fanHealthStatus="Normal"} 1
fanHealthStatus{fanDescr="Fan 4 Tach",fanHealthStatus="Normal"} 1
fanHealthStatus{fanDescr="Fan 5 Tach",fanHealthStatus="Normal"} 1
# HELP fanIndex This column is used to identify a particular fan. - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.1
# TYPE fanIndex gauge
fanIndex{fanDescr="Fan 1 Tach"} 1
fanIndex{fanDescr="Fan 2 Tach"} 2
fanIndex{fanDescr="Fan 3 Tach"} 3
fanIndex{fanDescr="Fan 4 Tach"} 4
fanIndex{fanDescr="Fan 5 Tach"} 5
# HELP fanNonCritLimitHigh The high non-critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.6
# TYPE fanNonCritLimitHigh gauge
fanNonCritLimitHigh{fanDescr="Fan 1 Tach"} 0
fanNonCritLimitHigh{fanDescr="Fan 2 Tach"} 0
fanNonCritLimitHigh{fanDescr="Fan 3 Tach"} 0
fanNonCritLimitHigh{fanDescr="Fan 4 Tach"} 0
fanNonCritLimitHigh{fanDescr="Fan 5 Tach"} 0
# HELP fanNonCritLimitLow The low non-critical limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.9
# TYPE fanNonCritLimitLow gauge
fanNonCritLimitLow{fanDescr="Fan 1 Tach"} 0
fanNonCritLimitLow{fanDescr="Fan 2 Tach"} 0
fanNonCritLimitLow{fanDescr="Fan 3 Tach"} 0
fanNonCritLimitLow{fanDescr="Fan 4 Tach"} 0
fanNonCritLimitLow{fanDescr="Fan 5 Tach"} 0
# HELP fanNonRecovLimitHigh The high non-recoverable limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.4
# TYPE fanNonRecovLimitHigh gauge
fanNonRecovLimitHigh{fanDescr="Fan 1 Tach"} 0
fanNonRecovLimitHigh{fanDescr="Fan 2 Tach"} 0
fanNonRecovLimitHigh{fanDescr="Fan 3 Tach"} 0
fanNonRecovLimitHigh{fanDescr="Fan 4 Tach"} 0
fanNonRecovLimitHigh{fanDescr="Fan 5 Tach"} 0
# HELP fanNonRecovLimitLow The low non-recoverable limit for the measured fan - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.7
# TYPE fanNonRecovLimitLow gauge
fanNonRecovLimitLow{fanDescr="Fan 1 Tach"} 0
fanNonRecovLimitLow{fanDescr="Fan 2 Tach"} 0
fanNonRecovLimitLow{fanDescr="Fan 3 Tach"} 0
fanNonRecovLimitLow{fanDescr="Fan 4 Tach"} 0
fanNonRecovLimitLow{fanDescr="Fan 5 Tach"} 0
# HELP fanNumber The present number of rows in the fan table. - 1.3.6.1.4.1.2.3.51.3.1.3.1
# TYPE fanNumber gauge
fanNumber 5
# HELP fanSpeed Fan speed expressed in percent(%) of maximum RPM - 1.3.6.1.4.1.2.3.51.3.1.3.2.1.3
# TYPE fanSpeed gauge
fanSpeed{fanDescr="Fan 1 Tach",fanSpeed="0x20333725206F66206D6178696D756D"} 1
fanSpeed{fanDescr="Fan 2 Tach",fanSpeed="0x20333825206F66206D6178696D756D"} 1
fanSpeed{fanDescr="Fan 3 Tach",fanSpeed="0x20333725206F66206D6178696D756D"} 1
fanSpeed{fanDescr="Fan 4 Tach",fanSpeed="0x20333725206F66206D6178696D756D"} 1
fanSpeed{fanDescr="Fan 5 Tach",fanSpeed="0x20333825206F66206D6178696D756D"} 1
# HELP snmp_scrape_duration_seconds Total SNMP time scrape took (walk and processing).
# TYPE snmp_scrape_duration_seconds gauge
snmp_scrape_duration_seconds 0.992965109
# HELP snmp_scrape_pdus_returned PDUs returned from walk.
# TYPE snmp_scrape_pdus_returned gauge
snmp_scrape_pdus_returned 51
# HELP snmp_scrape_walk_duration_seconds Time SNMP walk/bulkwalk took.
# TYPE snmp_scrape_walk_duration_seconds gauge
snmp_scrape_walk_duration_seconds 0.992481498



On Tuesday, April 24, 2018 at 11:05:32 AM UTC-4, Hossman12 wrote:

alex....@nhs.net

unread,
Jun 6, 2019, 11:33:31 AM6/6/19
to Prometheus Users
Hey, did you ever find a solution to this?  I think I'm having the same issue.   The values I need are all in a label as OctetString in hex.   Using regex_extracts as suggested does not seem to help.

Ben Kochie

unread,
Jun 6, 2019, 11:50:15 AM6/6/19
to alex....@nhs.net, Prometheus Users
Is the MIB for this publicly accessible?

--
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.

alex....@nhs.net

unread,
Jun 6, 2019, 11:55:03 AM6/6/19
to Prometheus Users

Yeah I downloaded from here, http://www.techhelp24.net/download/brocade/FOS/MIB/v7.4.1d_all_mibs.tar.gz


Using FA-EXT-MIB



swSfpTemperature OBJECT-TYPE

                SYNTAX OCTET STRING (SIZE(8))

                UNITS  "centigrade"

                MAX-ACCESS read-only

                STATUS     current

                DESCRIPTION "This object identifies the temperature of SFP"

  ::= { swSfpStatEntry 1 }

 

  swSfpVoltage OBJECT-TYPE

                SYNTAX OCTET STRING (SIZE(8))

                UNITS  "milli voltage"

                MAX-ACCESS read-only

                STATUS     current

                DESCRIPTION "This object identifies the voltage of SFP."

  ::= { swSfpStatEntry 2 }                                                                                     

                                                                                                                            

  swSfpCurrent OBJECT-TYPE

                SYNTAX OCTET STRING (SIZE(8))

                UNITS  "milli amphere"

                MAX-ACCESS read-only

                STATUS current

                DESCRIPTION "This object identifies the current of SFP."

  ::= { swSfpStatEntry 3 }

                                                                                                                            

  swSfpRxPower  OBJECT-TYPE

                SYNTAX OCTET STRING (SIZE(8))

                UNITS           "dBm"

                MAX-ACCESS read-only

                STATUS current

                DESCRIPTION "This object identifies the Rx power consumption of SFP."

  ::= { swSfpStatEntry 4 }

 

  swSfpTxPower  OBJECT-TYPE

                SYNTAX OCTET STRING (SIZE(8))

                UNITS           "dBm"

                MAX-ACCESS read-only

                STATUS current

                DESCRIPTION "This object identifies the Tx power consumption of SFP."

  ::= { swSfpStatEntry 5 }     

To unsubscribe from this group and stop receiving emails from it, send an email to promethe...@googlegroups.com.

Ben Kochie

unread,
Jun 6, 2019, 12:15:04 PM6/6/19
to alex....@nhs.net, Prometheus Users
Can you provide a sample snmpwalk of this so I have a better idea on what the real data looks like?

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.

alex....@nhs.net

unread,
Jun 6, 2019, 1:29:19 PM6/6/19
to Prometheus Users
Don't worry, after finding the example here, I made a slight change to my regex:

^(?:(\d+).*)$

Which works beautifully!  

Thanks for your time.
Reply all
Reply to author
Forward
0 new messages