Ad Widget

Collapse

Problems with net-snmp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aklaus
    Junior Member
    • Aug 2006
    • 1

    #1

    Problems with net-snmp

    Hello.
    I installed zabbix for my website. All is like in manual, step by step, but configure without snmp. It worded perfect, but not show me statistic about network, cpu load and some other needed for me. Then I insalled net-snmp(NET-SNMP version: 5.2.1) and snmp-devel. Then, ./configure --with-mysql --with-net-snmp --enable-server && make && make install. Without any problems, great But.... /usr/local/bin/zabbix_server wrote to logs this:
    026729:20060731:183652 Starting zabbix_server. ZABBIX 1.1.1.
    026731:20060731:183652 server #1 started [Alerter]
    026733:20060731:183652 server #2 started [Timer]
    026735:20060731:183652 server #3 started [ICMP pinger]
    026740:20060731:183652 server #6 started [Trapper]
    026742:20060731:183652 server #7 started [Trapper]
    026744:20060731:183652 server #8 started [Trapper]
    026746:20060731:183652 server #9 started [Trapper]
    026748:20060731:183652 server #10 started [Trapper]
    026729:20060731:183652 server #0 started [Housekeeper]
    026729:20060731:183652 ZABBIX server is up.
    026729:20060731:183652 One server process died. Shutting down...
    026729:20060731:183652 ZABBIX server is down.

    I can't understand what need to do... Any ideas?

    PS.
    SuSE 10.1 x86_64

    cat /etc/snmp.conf

    ################################################## #########################
    #
    # snmpd.conf
    #
    # - created by the snmpconf configuration program
    #
    ################################################## #########################
    # SECTION: Access Control Setup
    #
    # This section defines who is allowed to talk to your running
    # snmp agent.

    # rouser: a SNMPv3 read-only user
    # arguments: user [noauth|auth|priv] [restriction_oid]

    rouser zabbix noauth

    # rocommunity: a SNMPv1/SNMPv2c read-only access community name
    # arguments: community [default|hostname|network/bits] [oid]

    rocommunity public 127.0.0.1
    #rocommunity 127.0.0.1

    # rwcommunity: a SNMPv1/SNMPv2c read-write access community name
    # arguments: community [default|hostname|network/bits] [oid]

    #rwcommunity public



    ################################################## #########################
    # SECTION: Trap Destinations
    #
    # Here we define who the agent will send traps to.

    # trapcommunity: Default trap sink community to use
    # arguments: community-string

    #trapcommunity zabbix_server

    # authtrapenable: Should we send traps when authentication failures occur
    # arguments: 1 | 2 (1 = yes, 2 = no)

    authtrapenable 2



    ################################################## #########################
    # SECTION: Monitor Various Aspects of the Running Host
    #
    # The following check up on various aspects of a host.

    # proc: Check for processes that should be running.
    # proc NAME [MAX=0] [MIN=0]
    #
    # NAME: the name of the process to check for. It must match
    # exactly (ie, http will not find httpd processes).
    # MAX: the maximum number allowed to be running. Defaults to 0.
    # MIN: the minimum number to be running. Defaults to 0.
    #
    # The results are reported in the prTable section of the UCD-SNMP-MIB tree
    # Special Case: When the min and max numbers are both 0, it assumes
    # you want a max of infinity and a min of 1.

    proc httpd 256 1

    # disk: Check for disk space usage of a partition.
    # The agent can check the amount of available disk space, and make
    # sure it is above a set limit.
    #
    # disk PATH [MIN=100000]
    #
    # PATH: mount path to the disk in question.
    # MIN: Disks with space below this value will have the Mib's errorFlag set.
    # Can be a raw byte value or a percentage followed by the %
    # symbol. Default value = 100000.
    #
    # The results are reported in the dskTable section of the UCD-SNMP-MIB tree

    disk / 200000

    # load: Check for unreasonable load average values.
    # Watch the load average levels on the machine.
    #
    # load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
    #
    # 1MAX: If the 1 minute load average is above this limit at query
    # time, the errorFlag will be set.
    # 5MAX: Similar, but for 5 min average.
    # 15MAX: Similar, but for 15 min average.
    #
    # The results are reported in the laTable section of the UCD-SNMP-MIB tree

    load 2 2 2






    ################################################## #########################
    # SECTION: System Information Setup
    #
    # This section defines some of the information reported in
    # the "system" mib group in the mibII tree.

    # syslocation: The [typically physical] location of the system.
    # Note that setting this value here means that when trying to
    # perform an snmp SET operation to the sysLocation.0 variable will make
    # the agent return the "notWritable" error code. IE, including
    # this token in the snmpd.conf file will disable write access to
    # the variable.
    # arguments: location_string

    syslocation Server Room
    #syslocation server Room1

    # syscontact: The contact information for the administrator
    # Note that setting this value here means that when trying to
    # perform an snmp SET operation to the sysContact.0 variable will make
    # the agent return the "notWritable" error code. IE, including
    # this token in the snmpd.conf file will disable write access to
    # the variable.
    # arguments: contact_string

    syscontact Sysadmin (root@localhost)

    snmpwalk -v 2c -c public -u zabbix 127.0.0.1 .1
    snmpwalk -v 2c -c public -u zabbix 127.0.0.1 .1
    /etc/snmp.conf: line 16: Warning: Unknown token: rouser.
    /etc/snmp.conf: line 21: Warning: Unknown token: rocommunity.
    /etc/snmp.conf: line 44: Warning: Unknown token: authtrapenable.
    /etc/snmp.conf: line 65: Warning: Unknown token: proc.
    /etc/snmp.conf: line 80: Warning: Unknown token: disk.
    /etc/snmp.conf: line 94: Warning: Unknown token: load.
    /etc/snmp.conf: line 115: Warning: Unknown token: syslocation.
    /etc/snmp.conf: line 127: Warning: Unknown token: syscontact.
    /usr/share/snmp/snmp.conf: line 16: Warning: Unknown token: rouser.
    /usr/share/snmp/snmp.conf: line 21: Warning: Unknown token: rocommunity.
    /usr/share/snmp/snmp.conf: line 44: Warning: Unknown token: authtrapenable.
    /usr/share/snmp/snmp.conf: line 65: Warning: Unknown token: proc.
    /usr/share/snmp/snmp.conf: line 80: Warning: Unknown token: disk.
    /usr/share/snmp/snmp.conf: line 94: Warning: Unknown token: load.
    /usr/share/snmp/snmp.conf: line 115: Warning: Unknown token: syslocation.
    /usr/share/snmp/snmp.conf: line 127: Warning: Unknown token: syscontact.
    SNMPv2-MIB::sysDescr.0 = STRING: Linux linux 2.6.13-15.10-smp #1 SMP Fri May 12 16:11:24 UTC 2006 x86_64
    SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
    DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (37870) 0:06:18

    ...
    many strings about network...

    Thanks for any help.
  • jrumpf
    Junior Member
    • Nov 2005
    • 9

    #2
    Just to confirm

    I'm on Centos 4.3 and just encountered the same problem with Zabbix 1.1.1:

    net-snmp-utils-5.1.2-11.EL4.6
    net-snmp-libs-5.1.2-11.EL4.6
    net-snmp-5.1.2-11.EL4.6
    net-snmp-devel-5.1.2-11.EL4.6


    Zabbix log (pid in server died message is custom by me for debugging):

    [root@db10-a zabbix_server]# 005105:20060801:151258 Starting zabbix_server. ZABBIX 1.1.1.
    005105:20060801:151258 Executing query:select refresh_unsupported from config
    005105:20060801:151258 In DBupdate_triggers_after_restart()
    005105:20060801:151258 SQL [select distinct t.triggerid,t.value from hosts h,items i,triggers t,functions f where f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and i.nextcheck+i.delay<1154459578 and i.key_<>'status' and h.status not in (4,3)]
    005105:20060801:151258 Executing query:select distinct t.triggerid,t.value from hosts h,items i,triggers t,functions f where f.triggerid=t.triggerid and f.itemid=i.itemid and h.hostid=i.hostid and i.nextcheck+i.delay<1154459578 and i.key_<>'status' and h.status not in (4,3)
    005105:20060801:151258 End of DBupdate_triggers_after_restart()
    005106:20060801:151258 server #1 started [Alerter]
    005106:20060801:151258 Executing query:select a.alertid,a.mediatypeid,a.sendto,a.subject,a.messa ge,a.status,a.retries,mt.mediatypeid,mt.type,mt.de scription,mt.smtp_server,mt.smtp_helo,mt.smtp_emai l,mt.exec_path,a.delay,mt.gsm_modem from alerts a,media_type mt where a.status=0 and a.retries<3 and (a.repeats<a.maxrepeats or a.maxrepeats=0) and a.nextcheck<=1154459578 and a.mediatypeid=mt.mediatypeid order by a.clock
    005107:20060801:151258 server #2 started [Timer]
    005107:20060801:151258 Executing query:select distinct i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.history,i.lastvalue,i.prevvalue,i.ho stid,h.status,i.value_type,h.errors_from,i.snmp_po rt,i.delta,i.prevorgvalue,i.lastclock,i.units,i.mu ltiplier,i.snmpv3_securityname,i.snmpv3_securityle vel,i.snmpv3_authpassphrase,i.snmpv3_privpassphras e,i.formula,h.available,i.status,i.trapper_hosts,i .logtimefmt,i.valuemapid from hosts h, items i, functions f where h.hostid=i.hostid and h.status=0 and i.status=0 and f.function in ('nodata','date','dayofweek','time','now') and i.itemid=f.itemid
    005108:20060801:151258 server #3 started [ICMP pinger]
    005108:20060801:151258 In create_host_file()
    005108:20060801:151258 Executing query:select distinct h.ip from hosts h,items i where i.hostid=h.hostid and (h.status=0 or (h.status=0 and h.available=2 and h.disable_until<=1154459578)) and (i.key_='icmpping' or i.key_='icmppingsec') and i.type=3 and i.status=0 and h.useip=1
    005109:20060801:151258 server #4 started [Poller for unreachable hosts. SNMP:ON]
    005110:20060801:151258 server #5 started [Poller. SNMP:ON]
    005111:20060801:151258 In child_main()
    005111:20060801:151258 server #6 started [Trapper]
    005111:20060801:151258 Before DBconnect()
    005108:20060801:151258 Executing query:select distinct h.host from hosts h,items i where i.hostid=h.hostid and (h.status=0 or (h.status=0 and h.available=2 and h.disable_until<=1154459578)) and (i.key_='icmpping' or i.key_='icmppingsec') and i.type=3 and i.status=0 and h.useip=0
    005112:20060801:151258 In child_main()
    005112:20060801:151258 server #7 started [Trapper]
    005112:20060801:151258 Before DBconnect()
    005108:20060801:151258 In do_ping()
    005113:20060801:151258 In child_main()
    005113:20060801:151258 server #8 started [Trapper]
    005113:20060801:151258 Before DBconnect()
    005113:20060801:151258 After DBconnect()
    005113:20060801:151258 Before accept()
    005115:20060801:151258 In child_main()
    005115:20060801:151258 server #9 started [Trapper]
    005115:20060801:151258 Before DBconnect()
    005115:20060801:151258 After DBconnect()
    005115:20060801:151258 Before accept()
    005116:20060801:151258 In child_main()
    005116:20060801:151258 server #10 started [Trapper]
    005116:20060801:151258 Before DBconnect()
    005116:20060801:151258 After DBconnect()
    005116:20060801:151258 Before accept()
    005105:20060801:151258 server #0 started [Housekeeper]
    005105:20060801:151258 0. PID=[5106]
    005105:20060801:151258 1. PID=[5107]
    005105:20060801:151258 2. PID=[5108]
    005105:20060801:151258 3. PID=[5109]
    005105:20060801:151258 4. PID=[5110]
    005105:20060801:151258 5. PID=[5111]
    005105:20060801:151258 6. PID=[5112]
    005105:20060801:151258 7. PID=[5113]
    005105:20060801:151258 8. PID=[5115]
    005105:20060801:151258 9. PID=[5116]
    005105:20060801:151258 ZABBIX server is up.
    005105:20060801:151258 In housekeeping_process_log()
    005105:20060801:151258 Executing query:select housekeeperid, tablename, field, value from housekeeper order by tablename
    005105:20060801:151258 In housekeeping_alarms(1154459578)
    005105:20060801:151258 Executing query:select alarm_history from config
    005105:20060801:151258 Executing query:select alarmid from alarms where clock<1068059578
    005105:20060801:151258 In housekeeping_alerts(1154459578)
    005105:20060801:151258 Executing query:select alert_history from config
    005105:20060801:151258 Executing query:delete from alerts where clock<1068059578
    005111:20060801:151258 After DBconnect()
    005111:20060801:151258 Before accept()
    005112:20060801:151258 After DBconnect()
    005112:20060801:151258 Before accept()
    005105:20060801:151258 Deleted [0] records from table [alerts]
    005105:20060801:151258 In housekeeping_sessions(1154459578)
    005105:20060801:151258 Executing query:delete from sessions where lastaccess<1154373178
    005105:20060801:151258 Deleted [0] records from table [sessions]
    005105:20060801:151258 Sleeping for 1 hours
    005105:20060801:151258 One server process died [5109]. Shutting down...
    005105:20060801:151258 0. Killing PID=[5106]
    005106:20060801:151258 Server [1]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005107:20060801:151258 Server [2]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005105:20060801:151258 1. Killing PID=[5107]
    005105:20060801:151258 2. Killing PID=[5108]
    005105:20060801:151258 Cannot kill process. PID=[5109] [No such process]
    005110:20060801:151258 Server [5]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005105:20060801:151258 4. Killing PID=[5110]
    005105:20060801:151258 5. Killing PID=[5111]
    005105:20060801:151258 6. Killing PID=[5112]
    005113:20060801:151258 Server [8]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005105:20060801:151258 7. Killing PID=[5113]
    005115:20060801:151258 Server [9]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005105:20060801:151258 8. Killing PID=[5115]
    005111:20060801:151258 Server [6]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005116:20060801:151258 Server [10]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005105:20060801:151258 9. Killing PID=[5116]
    005108:20060801:151258 Server [3]. Got QUIT or INT or TERM or PIPE signal. Exiting...
    005105:20060801:151258 ZABBIX server is down.
    005112:20060801:151258 Server [7]. Got QUIT or INT or TERM or PIPE signal. Exiting...

    Comment

    • jrumpf
      Junior Member
      • Nov 2005
      • 9

      #3
      Sigsegv

      Hmmm, so far looks to be an issue perhaps in net-snmp:

      Code:
      Program received signal SIGSEGV, Segmentation fault.
      0x4f497373 in ?? ()
      (gdb) bt
      #0  0x4f497373 in ?? ()
      #1  0x00d19f8c in EVP_DigestInit_ex () from /lib/libcrypto.so.4
      #2  0x00d1a0b4 in EVP_DigestInit () from /lib/libcrypto.so.4
      #3  0x00c3569b in sc_hash () from /usr/lib/libnetsnmp.so.5
      #4  0x00c341f9 in hash_engineID () from /usr/lib/libnetsnmp.so.5
      #5  0x00c342b4 in search_enginetime_list () from /usr/lib/libnetsnmp.so.5
      #6  0x00c34756 in set_enginetime () from /usr/lib/libnetsnmp.so.5
      #7  0x00c33b99 in init_snmpv3_post_config () from /usr/lib/libnetsnmp.so.5
      #8  0x00c3672e in snmp_call_callbacks () from /usr/lib/libnetsnmp.so.5
      #9  0x00c2d1b8 in read_configs () from /usr/lib/libnetsnmp.so.5
      #10 0x00c0ad75 in init_snmp () from /usr/lib/libnetsnmp.so.5
      #11 0x08058342 in main ()
      the man page snmp_agent_api states that init_agent() must be called before init_snmp().

      This was working in zabbix1.1beta9 (from which I'm upgrading).

      Thanks

      Comment

      • jrumpf
        Junior Member
        • Nov 2005
        • 9

        #4
        Red Herring...

        Ok, I finally figured it out. I was compiling zabbix against the precompiled mysql binaries as shipped from mysql.com. The mysql folks compile their libraries and binaries as statically as possible. There ended up being a lot of symbols in those static mysqlclient libraries that were conflicting with the shared libs imported for net-snmp to work properly.

        What I ended up doing was putting a set of self compiled shared mysql libraries and headers on the system and setting up /etc/ld.so.conf to use those as well as having the ./configure script pick them up with something like:

        export CC='gcc -L/usr/local/mysql/shared/lib'

        Zabbix with snmp support works as advertised now.

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          Originally posted by jrumpf
          Ok, I finally figured it out. I was compiling zabbix against the precompiled mysql binaries as shipped from mysql.com. The mysql folks compile their libraries and binaries as statically as possible. There ended up being a lot of symbols in those static mysqlclient libraries that were conflicting with the shared libs imported for net-snmp to work properly.
          As I mentioned already somewhere else, the problme applies to few distribution only (CentOS). Most of distributions have correct build of MySQL.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • jrumpf
            Junior Member
            • Nov 2005
            • 9

            #6
            Originally posted by Alexei
            As I mentioned already somewhere else, the problme applies to few distribution only (CentOS). Most of distributions have correct build of MySQL.
            Very true, I would imagine this would affect anyone who uninstalls the distribution (ie Centos) compiled mysql packages that have shared client libs and installs the newer static ones from mysql.com. This is probably pretty common practice to gain access to the newer mysql 5.x releases.

            If this becomes a big issue perhaps a sticky post would be in order so others can find the issue relatively easily. Otherwise hopefully this thread will help.

            Thanks,
            Jeremy

            Comment

            • H@rry
              Junior Member
              • Jul 2006
              • 24

              #7
              can we send this issue to the MySQL team?

              Maybe they are willing to help.

              Comment

              Working...