Ad Widget

Collapse

problem: trap and trigger's recovery expression

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alescri
    Member
    • May 2019
    • 32

    #1

    problem: trap and trigger's recovery expression

    Good morning,
    I have a problem with the zabbix configuration and snmp traps.
    a device sends me this trap

    SNMPv2-MIB :: snmpTrapOID.0 type = 6 value = OID: US-HIQ-TRAP-MIB :: hiQNmProcessInitCompleteTrap
    FSC-RTP-MIB-EVENT-MGMT :: rtpEvtSequenceNumberIndex type = 66 value = Gauge32: 1096086

    the value 1096086 changes every trap and is the identifier that will also be used to close the problem.
    I don't understand how I can create a trigger, which refers to that value.
    could someone help me?

    thanks
  • alescri
    Member
    • May 2019
    • 32

    #2
    i created this tag ID {{ITEM.VALUE}.regsub("FSC-RTP-MIB-EVENT-MGMT::rtpEvtCurrId\stype=66\svalue=Gauge32:\s(.*)\ s","\1")} this tag contain the ID of the allarm
    is possible to create a trigger to compare this tag to another ?
    like } ?
    {{ITEM.VALUE}.regsub("FSC-RTP-MIB-EVENT-MGMT::rtpEvtCurrId\stype=66\svalue=Gauge32:\s(.*)\ s","\1")} = {FSC-RTP-MIB-ALARM-MGMT::rtpArmCiCorrIDs.0\stype=4 \svalue=STRING:\s(.*)\s","\1")})}?

    Comment

    • tfineberg
      Junior Member
      • Sep 2021
      • 7

      #3
      Hi, Were you able to solve this issue? I would have the same issue.

      Comment

      • alescri
        Member
        • May 2019
        • 32

        #4
        Originally posted by tfineberg
        Hi, Were you able to solve this issue? I would have the same issue.
        Nope, sorry

        Comment

        • tfineberg
          Junior Member
          • Sep 2021
          • 7

          #5
          HI ,

          I have worked it out. I uase a regexes to extract the ID for example Tag Name =TrigerID and Value = {{ITEM.VALUE}.regsub("1201\.5\.1\.18\.0\stype=65\s value=Counter32:\s(.*)"," \1")}.

          Then in the trigger I look for both the trap OID and the statement that that says it is active for example expression = find(/SOLID-DMS1200REL6-MIB/snmptrap[iso.3.6.1.4.1.35043.1.1.1201.5.4.16])=1 and find(/SOLID-DMS1200REL6-MIB/snmptrap[iso.3.6.1.4.1.35043.1.1.1201.5.4.16],,,"iso.3.6.1.4.1.35043.1.1.1201.5.1.11.0 type=2 value=INTEGER: 1")=1
          Th
          iso.3.6.1.4.1.35043.1.1.1201.5.4.16],,,"iso.3.6.1.4.1.35043.1.1.1201.5.1.11.0 type=2 value=INTEGER: 1 is what i am looking for to say that it is active when it recvoers it is iso.3.6.1.4.1.35043.1.1.1201.5.4.16],,,"iso.3.6.1.4.1.35043.1.1.1201.5.1.11.0 type=2 value=INTEGER: 0 .

          Now if you set it to
          OK event generation = Expression
          Ok evernt close = All problems if tage valuse match
          Tag for matching = TrigerID

          It will fire when it gets 1 and resolve if it gets a 0


          I also add a bunch of regexes to name the event from data from the trap here is what i use in the Event name:

          {{ITEM.VALUE}.regsub("1201\.5\.1\.10\.0\stype=4\s\ svalue=STRING:\s\x22(.*)\x22", "\1")} #: {{ITEM.VALUE}.regsub("1201\.5\.1\.18\.0\stype=65\s value=Counter32:\s(.*)"," \1")} - {{ITEM.VALUE}.regsub("1201\.5\.1\.2\.0\stype=4\s\s value=STRING:\s\x22(.*)", "\1")} - {{ITEM.VALUE}.regsub("1201\.5\.1\.4\.0\stype=4\s\s value=STRING:\s\x22(.*)\x22"," \1")} - {{ITEM.VALUE}.regsub("1201\.5\.1\.3\.0\stype=4\s\s value=STRING:\s\x22(.*)\x22", "\1")} - {{ITEM.VALUE}.regsub("1201\.5\.1\.9\.0\stype=4\s\s value=STRING:\s\x22(.*)\x22"," \1")}


          Here are the screenshots.

          Reach out if you need further help
          BTW this is on ver 5.4


          Click image for larger version

Name:	2.PNG
Views:	511
Size:	9.6 KB
ID:	433323


          Click image for larger version

Name:	1.PNG
Views:	567
Size:	65.1 KB
ID:	433322



          Comment

          Working...