Ad Widget

Collapse

Preprocessing SNMP using mulitiple Value Mappings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GarrettCO
    Member
    • Jan 2024
    • 44

    #1

    Preprocessing SNMP using mulitiple Value Mappings

    Just want to make sure I am thinking of this right. When an SNMP trap is received, i want to be able to translate a few VARBINDS to the value referenced by the MIB so that's it's formatted with all readable data. But when I select Value Mapping I can only select one item regardless of the multiple regular expressions in Preprocessing. Is Zabbix not able to perform multiple value mappings? The other option I thought of is using "Replace" function in preprocessing but that seems inefficient.

    Sample:
    VARBINDS:
    DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=91798530
    SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.2879.2.10.1.1.1.0.73
    SNMPv2-SMI::enterprises.2879.2.8.1.1.1.1.1.0 type=66 value=Gauge32: 3969647467
    SNMPv2-SMI::enterprises.2879.2.8.1.1.1.1.2.0 type=2 value=INTEGER: 3.
    <<<<<<< VALUE MAP or REPLACE FUNCTION
    SNMPv2-SMI::enterprises.2879.2.8.1.1.1.1.3.0 type=66 value=Gauge32: 2199311
    SNMPv2-SMI::enterprises.2879.2.8.1.1.1.1.4.0 type=4 value=Hex-STRING: 07 E8 09 10 13 2D 18 00 [.. ..-..]
    SNMPv2-SMI::enterprises.2879.2.8.1.1.1.1.5.0 type=4 value=STRING: "ARS: Endpoint IP address: port:5060 zone:3 sigport:4 owner slot:1 zoneName:CORE_ZONE RECOVERED."
    SNMPv2-SMI::enterprises.2879.2.10.1.1.1.1.5.0 type=64 value=IpAddress: 169.152.186.42
    SNMPv2-SMI::enterprises.2879.2.10.1.1.1.1.6.0 type=2 value=INTEGER: 5060
    SNMPv2-SMI::enterprises.2879.2.10.1.1.1.1.4.0 type=66 value=Gauge32: 3
    <<<<<<< VALUE MAP or REPLACE FUNCTION
    SNMPv2-SMI::enterprises.2879.2.10.1.1.1.1.7.0 type=66 value=Gauge32: 4 <<<<<<< VALUE MAP or REPLACE FUNCTION
    SNMPv2-SMI::enterprises.2879.2.10.1.1.1.1.8.0 type=66 value=Gauge32: 1
    SNMPv2-SMI::enterprises.2879.2.10.1.1.1.1.63.0 type=4 value=STRING: "CORE_ZONE"


  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Value mapping is used when displaying data, not during saving data to DB... Whatever you want to do to your data before saving it, do it in preprocessig.

    snmptt is the tool that should translate your incoming traps if required.. But even that one cannot do it, if that mapping is not present in MIBs...

    Comment

    Working...