Ad Widget

Collapse

zabbix 1.6 snmp_get_index

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gedp
    Member
    • May 2006
    • 47

    #1

    zabbix 1.6 snmp_get_index

    Compiling quits on file checks_snmp.c:

    if (NULL != CONFIG_SOURCE_IP)
    session.localname = CONFIG_SOURCE_IP;

    Could find the structure definition in /usr/include/net-snmp/library/snmp_api.h, but
    there is no variable localname.

    make[3]: Entering directory `/home/zabbix/zabbix-1.6/src/zabbix_server/poller'
    if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -g -O2 -I/usr/include/mysql -march=i586 -mcpu=i686 -fmessage-length=0 -DPIC -fPIC -fno-strict-aliasing -I/usr/include/rpm -I. -I/usr/include -MT checks_agent.o -MD -MP -MF ".deps/checks_agent.Tpo" -c -o checks_agent.o checks_agent.c; \
    then mv -f ".deps/checks_agent.Tpo" ".deps/checks_agent.Po"; else rm -f ".deps/checks_agent.Tpo"; exit 1; fi
    if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -g -O2 -I/usr/include/mysql -march=i586 -mcpu=i686 -fmessage-length=0 -DPIC -fPIC -fno-strict-aliasing -I/usr/include/rpm -I. -I/usr/include -MT checks_internal.o -MD -MP -MF ".deps/checks_internal.Tpo" -c -o checks_internal.o checks_internal.c; \
    then mv -f ".deps/checks_internal.Tpo" ".deps/checks_internal.Po"; else rm -f ".deps/checks_internal.Tpo"; exit 1; fi
    if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -g -O2 -I/usr/include/mysql -march=i586 -mcpu=i686 -fmessage-length=0 -DPIC -fPIC -fno-strict-aliasing -I/usr/include/rpm -I. -I/usr/include -MT checks_simple.o -MD -MP -MF ".deps/checks_simple.Tpo" -c -o checks_simple.o checks_simple.c; \
    then mv -f ".deps/checks_simple.Tpo" ".deps/checks_simple.Po"; else rm -f ".deps/checks_simple.Tpo"; exit 1; fi
    if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -g -O2 -I/usr/include/mysql -march=i586 -mcpu=i686 -fmessage-length=0 -DPIC -fPIC -fno-strict-aliasing -I/usr/include/rpm -I. -I/usr/include -MT checks_snmp.o -MD -MP -MF ".deps/checks_snmp.Tpo" -c -o checks_snmp.o checks_snmp.c; \
    then mv -f ".deps/checks_snmp.Tpo" ".deps/checks_snmp.Po"; else rm -f ".deps/checks_snmp.Tpo"; exit 1; fi
    checks_snmp.c: In function `snmp_get_index':
    checks_snmp.c:213: error: structure has no member named `localname'
    checks_snmp.c: In function `get_snmp':
    checks_snmp.c:556: error: structure has no member named `localname'
    make[3]: *** [checks_snmp.o] Error 1
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    As a quick workaround you may comment these two lines. Alternatively a newer version of net-snmp may help.

    This will be fixed in future releases.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • nelsonab
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2006
      • 1233

      #3
      It's still there in the latest nightly build.

      Dangit.... this is a big bump in our 1.6 upgrade plans...


      # rpm -qa | grep snmp
      net-snmp-5.1.2-11.EL4.7
      net-snmp-libs-5.1.2-11.EL4.10.0.1
      net-snmp-5.1.2-11.EL4.10.0.1
      net-snmp-utils-5.1.2-11.EL4.10.0.1
      php-snmp-5.1.2-r1
      net-snmp-libs-5.1.2-11.EL4.7
      net-snmp-devel-5.1.2-11.EL4.7
      net-snmp-utils-5.1.2-11.EL4.7
      net-snmp-devel-5.1.2-11.EL4.10.0.1
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment

      • NOB
        Senior Member
        Zabbix Certified Specialist
        • Mar 2007
        • 469

        #4
        Hi

        if you need SOURCEIP (sp?) configured, you'll have to update Net-SNMP
        to use it. This feature was added in a later version then 5.1.2 !
        Version 5.3.0.1 works.

        Otherwise Alexei is right: uncomment those two lines and it'll compile.

        Regards

        Norbert.

        Comment

        • skullone
          Member
          • Mar 2007
          • 46

          #5
          Can confirm this still exists. On systems where the vendor still ships very old Net-SNMP like OpenSolaris, you need to either comment out those lines or replace localname with peername and it will compile correctly, and seemingly works fine.

          Comment

          Working...