Skip to content

Consuming same OID by multiple metrics #1058

Closed Answered by freeyssu
freeyssu asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, I think I can use regex multiple times :)
Use this as a reference somebody who want to create multiple metrics by one OID

  metrics:
    - name: pdu_system
      oid: 1.3.6.1.4.1.1718.4.1.2.3.1.1.1
      type: float
      regex_extracts:
        _alert:
          - regex: '0'
            value: '0'
          - regex: '[^0][0-9]?'
            value: '1'
        _status:
          - regex: (.*)
            value: $1
      enum_values:
        0 : normal
        1 : disabled
        2 : purged
        5 : reading

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@freeyssu
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by freeyssu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants