Ad Widget

Collapse

SNMP Index contains TEXT. is it possible?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DaniloNC
    Junior Member
    • Oct 2011
    • 1

    #1

    SNMP Index contains TEXT. is it possible?

    Hi Guys!

    I'd like to create a indexed item that partial matches the index register for instance consider the following output.

    Code:
    # snmpwalk -v2c -cpublic  10.0.0.100.1.3.6.1.2.1.25.2.3.1
    HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 1
    HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 2
    HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3
    HOST-RESOURCES-MIB::hrStorageType.1 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
    HOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-TYPES::hrStorageVirtualMemory
    HOST-RESOURCES-MIB::hrStorageType.3 = OID: HOST-RESOURCES-TYPES::hrStorageRam
    HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: C:\ Label:  Serial Number 8ceefd29
    HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Virtual Memory
    HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Physical Memory
    HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 4096 Bytes
    HOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 65536 Bytes
    HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 65536 Bytes
    HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 35658239
    HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 524100
    HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 524129
    HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 8434727
    HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 79725
    HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 73384
    HOST-RESOURCES-MIB::hrStorageAllocationFailures.1 = Counter32: 0
    HOST-RESOURCES-MIB::hrStorageAllocationFailures.2 = Counter32: 0
    HOST-RESOURCES-MIB::hrStorageAllocationFailures.3 = Counter32: 0
    I want to get the HOST-RESOURCES-MIB::hrStorageAllocationUnits value from the register that contains in the description "C:\" i have tried to accomplished this in the following ways without sucess:

    The register that i want to match is:

    Code:
    HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: C:\ Label:  Serial Number 8ceefd29
    Code:
    HOST-RESOURCES-MIB::hrStorageAllocationUnits["index","HOST-RESOURCES-MIB::hrStorageDescr","C:\"] 
    
    HOST-RESOURCES-MIB::hrStorageAllocationUnits["index","HOST-RESOURCES-
    MIB::hrStorageDescr","C:\*"] 
    
    HOST-RESOURCES-MIB::hrStorageAllocationUnits["index","HOST-RESOURCES-
    MIB::hrStorageDescr","C:\%"]
    
    HOST-RESOURCES-MIB::hrStorageAllocationUnits["index","HOST-RESOURCES-
    MIB::hrStorageDescr","*C:\*"]
    is there a way that a can partial match using snmp index?

    Regards
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    i guess substring match might be considered as a part of https://support.zabbix.com/browse/ZBX-1609
    Zabbix 3.0 Network Monitoring book

    Comment

    Working...