Ad Widget

Collapse

Having some trouble with Regex in Zabbix

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ewinderickx
    Junior Member
    • Mar 2025
    • 2

    #1

    Having some trouble with Regex in Zabbix

    Hi!

    I'm using Zabbix for a while now and I'm almost ashamed of the issue that I seem to be having. Still having this fixed is better than the alternative. I have an SNMP trap which send the following data on a periodic schedule.
    Code:
    05:29:32 2025/03/22 VARBINDS:
      DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (20287194) 2 days, 8:21:11.94
      SNMPv2-MIB::snmpTrapOID.0      type=6  value=OID: SNMPv2-SMI::enterprises.231.2.49.2.0.10073
      SNMPv2-SMI::enterprises.231.2.49.2.1.1 type=4  value=STRING: "iRMC569B16"
      SNMPv2-SMI::enterprises.231.2.49.2.1.2 type=2  value=INTEGER: 1742617771
      SNMPv2-SMI::enterprises.231.2.49.2.1.3 type=4  value=STRING: "PRAID EP420i (0)"
      SNMPv2-MIB::snmpTrapEnterprise.0 type=6  value=OID: SNMPv2-SMI::enterprises.231.2.49.2
    I cleared it with the vendor, this is a non-issue and is just telling me some maintenance action was activated. I cannot disable this notification and so I must look to Zabbix to correctly handle this SNMP trap. Now to make sure that the failover SNMP trap item doesn't fire when I receive this trap, I've created an item. This item is however not working so my guess is, something is wrong with my regex. I tried reworking this a few times but this is were I'm at right now:
    Code:
    snmp.trap[.*PRAID EP420i.*]
    .

    Hopefully someone has had better experiences with filtering SNMP traps. Let me know if you'd need some additional information.

    Eli
  • Answer selected by ewinderickx at 08-10-2025, 08:31.
    ewinderickx
    Junior Member
    • Mar 2025
    • 2

    So it was hard troubleshooting because the trap didn't occur much. The solution was in the details: snmptrap[PRAID EP420i] did the trick. So being carefull with the item key and it should work.

    Comment

    • ewinderickx
      Junior Member
      • Mar 2025
      • 2

      #2
      So it was hard troubleshooting because the trap didn't occur much. The solution was in the details: snmptrap[PRAID EP420i] did the trick. So being carefull with the item key and it should work.

      Comment

      Working...