Ad Widget

Collapse

SNMP OID with regex

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acrimson
    Junior Member
    • Mar 2020
    • 4

    #1

    SNMP OID with regex



    Currently I have defined an item for the apache service status with the following SNMP OID expression and it works correctly

    SNMP OID: HOST-RESOURCES-MIB::hrSWRunStatus["index","HOST-RESOURCES-MIB::hrSWRunParameters", "-Djava.util.logging.config.file=/usr/share/apache-tomcat-8.5.6//conf/logging.properties -Djava.util.logging.manager=org.apache.j"]






    I would like to modify the SNMP OID to contemplate another possible string

    "-Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLo ader"


    I have modified SNMP OID with the following line but I get the error "Cannot find index of "^(-Djava)*$"

    HOST-RESOURCES-MIB::hrSWRunStatus["index","HOST-RESOURCES-MIB::hrSWRunParameters", ^(-Djava)*$]



    Last edited by acrimson; 01-09-2021, 13:59.
  • Noobz
    Senior Member
    • Jun 2020
    • 105

    #2
    I'm not really sure what you're trying to do here - try filters or perhaps dynamic OID to find what you need?

    Comment

    • acrimson
      Junior Member
      • Mar 2020
      • 4

      #3
      Thans Noobz for your response. Finally i solved it creating two additional items for the host that to monitoring the different posibble strings and triiggering another item with is associated finally to my dashboard.

      Comment

      • Noobz
        Senior Member
        • Jun 2020
        • 105

        #4
        Ah I see now - The documentation states that dynamic OID only works for an exact match, so yes, as you have found, making two separate items would be the solutions.

        Comment

        Working...