Ad Widget

Collapse

SNMP index regexp problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jean
    Member
    • Apr 2006
    • 85

    #1

    SNMP index regexp problem

    Hello,

    I use a lot the SNMP index functionality and for the most of the time, this works well, but not always. Sometimes nothing is return and the items status change to "Not Supported", but the string is present when I look for it with snmpwalk.

    This is an example where this doesn't works :
    items key : .1.3.6.1.2.1.2.2.1.7[index,.1.3.6.1.2.1.2.2.1.2,Nortel Networks Ethernet Switch 325-24T Module - Port 10].

    I found a workaround for this, but I don't know if my solution is clean. I had modify the file zabbix-1.8.1/src/zabbix_server/poller/checks_snmp.c, line 469.

    Before :
    if (0 == strcmp(value, strval))

    After :
    int length = strlen(value);
    if (strncmp (value, strval, length) == 0)

    This workaround works for the Zabbix branch 1.8 and 1.6.

    Could someone check this and tell me if this a good solution or not... Maybe my item syntax is wrong.

    Thanks in advance.
    Last edited by jean; 01-03-2010, 07:45.
Working...