Ad Widget

Collapse

SNMP doesnt work (v1.9.3)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MADxHAWK
    Member
    • Apr 2011
    • 41

    #1

    SNMP doesnt work (v1.9.3)

    Hi,

    i just installed zabbix 1.9.3 on a Debian Lenny x86 System and tried to monitor my homeserver and linux router (fli4l with OPT_SNMP) but ran into some problems.

    I created a host for the Server:
    Name: Lan Server
    Group: Lan Server

    Interfaces:
    ip: 127.0.0.1
    DNS Name: localhost
    Connect: IP
    Port: 161
    Type: SNMP

    Monitored by Proxy: (no Proxy)
    Status: Monitored

    First i try to add a Item by clicking on ITEMS.
    Host: Lan Server
    Host Interface: 127.0.0.1:161
    Description: Incoming Traffic on eth0
    Type: SNMPv2 Agent
    SNMP OID: interfaces.ifTable.ifEntry.ifInOctets.1
    SNMP Community: public
    Port: 161
    Key: lan_server.ifInOctets.1
    Type of Information: Nummeric (Unsigned)
    Data Type: Decimal
    Units: bps
    Use Custom multiplier: deactivated
    Update interval: 30 sec.
    Flexible interval: no flexible intervals
    Keep history (in days): 7
    keep trend (in days): 30
    Status: Active
    Store Value: Delta (speed per sec.)
    Show Value: as is

    After a few seconds SNMP Button of the host turns red saying
    "Timeout while connecting to 127.0.0.1:161"

    I've deleted the host completly, added a new one with same hostdata but this time i added the SNMPv2_Device tamplate to the host. But i got same result: Timeout while connecting to 127.0.0.1:161

    I have tried it with DNS name localhost and also with the Network ip (192.168.6.30) but never got any SNMP data.

    Since SNMPwalk works fine:
    snmpwalk -v 2c -Ofn -c public 127.0.0.1:161 ifInOctets.1
    .1.3.6.1.2.1.2.2.1.10.1 = Counter32: 288226569

    snmpwalk -v 2c -Ofn -c public localhost:161 ifInOctets.1
    .1.3.6.1.2.1.2.2.1.10.1 = Counter32: 288228105

    snmpwalk -v 2c -Ofn -c public 192.168.6.30:161 ifInOctets.1
    .1.3.6.1.2.1.2.2.1.10.1 = Counter32: 288228406
    i have no idea whats going wrong here.

    Any help would be aprecciated.

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

    #2
    in host properties, is that interface set to be of type "snmp" ?

    edit : well, duh, you specified that it was...

    not many ideas then - but you could try setting debuglevel to 4 and checking the logfile (but you will also have to increase max logfile size otherwise interesting information might get rotated away)
    Last edited by richlv; 24-04-2011, 05:00.
    Zabbix 3.0 Network Monitoring book

    Comment

    • MADxHAWK
      Member
      • Apr 2011
      • 41

      #3
      Hi,

      heres the logfile, maybe someone could tell me what im doing wrong.

      [...]
      3500:20110424:134846.775 In get_values()
      3500:20110424:134846.775 In DCconfig_get_poller_items() poller_type:1
      3500:20110424:134846.775 End of DCconfig_get_poller_items():1
      3500:20110424:134846.775 In DCinit_nextchecks()
      3500:20110424:134846.775 End of DCinit_nextchecks()
      3500:20110424:134846.775 In substitute_simple_macros() data:'server.interfaces.ifTable.ifEntry.ifInOctets .2'
      3500:20110424:134846.775 In substitute_simple_macros() data:'127.0.0.1'
      3500:20110424:134846.775 In substitute_simple_macros() data:'161'
      3500:20110424:134846.775 In substitute_simple_macros() data:'public'
      3500:20110424:134846.775 In substitute_simple_macros() data:'.1.3.6.1.2.1.2.2.1.10.2'
      3500:20110424:134846.775 In get_value() key:'server.interfaces.ifTable.ifEntry.ifInOctets. 2'
      3500:20110424:134846.775 In get_value_snmp() key:'server.interfaces.ifTable.ifEntry.ifInOctets. 2' oid:'.1.3.6.1.2.1.2.2.1.10.2'
      3500:20110424:134846.775 In snmp_open_session()
      3500:20110424:134846.775 SNMP [[email protected]:161]
      3500:20110424:134846.776 End of snmp_open_session()
      3500:20110424:134846.776 Standard processing
      3500:20110424:134846.776 In snmp_normalize(oid:.1.3.6.1.2.1.2.2.1.10.2)
      3500:20110424:134846.776 End of snmp_normalize():.1.3.6.1.2.1.2.2.1.10.2
      3500:20110424:134846.776 In get_snmp(oid:.1.3.6.1.2.1.2.2.1.10.2)
      [...]
      3500:20110424:134852.800 Status send [2]
      3500:20110424:134852.800 End of get_snmp():NETWORK_ERROR
      3500:20110424:134852.800 In snmp_close_session()
      3500:20110424:134852.800 End of snmp_close_session()
      3500:20110424:134852.800 End of get_value_snmp():NETWORK_ERROR
      3500:20110424:134852.800 Item [Lan Server:server.interfaces.ifTable.ifEntry.ifInOctet s.2] error: Timeout while connecting to [127.0.0.1:161]
      3500:20110424:134852.800 In zabbix_log()
      3500:20110424:134852.800 In DCconfig_get_items() hostid:0 key:'zabbix[log]'
      3500:20110424:134852.800 End of DCconfig_get_items():0
      3500:20110424:134852.800 End of zabbix_log()
      3500:20110424:134852.800 End of get_value():NETWORK_ERROR
      3500:20110424:134852.801 Query [txnlev:1] [begin;]
      3500:20110424:134852.801 Query [txnlev:1] [update hosts set snmp_error='Timeout while connecting to [127.0.0.1:161]',snmp_disable_until=1303645792 where hostid=10047]
      3500:20110424:134852.801 Query [txnlev:1] [commit;]
      3500:20110424:134852.806 In DCflush_nextchecks()
      3500:20110424:134852.806 End of get_values():1
      3500:20110424:134852.806 unreachable poller #1 spent 6.031316 seconds while updating 1 values
      3500:20110424:134852.806 In DCconfig_get_poller_nextcheck() poller_type:1
      3500:20110424:134852.806 End of DCconfig_get_poller_nextcheck():1303645792
      3500:20110424:134852.806 sleeping for 5 seconds

      Comment

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

        #4
        that smpwalk... where are you running it ?
        Zabbix 3.0 Network Monitoring book

        Comment

        • MADxHAWK
          Member
          • Apr 2011
          • 41

          #5
          Hi,

          on same server running zabbix. I've tried dns localhost, ip 127.0.0.1 and eth0 ip 192.168.6.30

          I also get the same error when i try to monitor my fli4l router with zabbix.
          Here also the snmpwalk works fine from the servershell
          ( snmpwalk -v 2c -Ofn -c public 192.168.6.1 ifInOctets.1 )

          so i think its not a network error.


          -greetz MAD
          Last edited by MADxHAWK; 25-04-2011, 17:21.

          Comment

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

            #6
            well, it's quite clearly reporting timeout... i'd suggest checking what is sent by zabbix server & by snmpwalk and what the differences are.

            edit : check with tcpdump, of course.

            this might depend on the version of net-snmp library - it works just fine for me on trunk, compiled against net-snmp 5.6
            Last edited by richlv; 25-04-2011, 18:11.
            Zabbix 3.0 Network Monitoring book

            Comment

            • MADxHAWK
              Member
              • Apr 2011
              • 41

              #7
              ATM here is running NET-SNMP version: 5.4.1

              will try to check with tcpdump

              greetz
              MAD

              EDIT: Looks like snmp sends a responce:

              Zabbiz Server Log:
              27992:20110425:184434.099 In get_values()
              27992:20110425:184434.099 In DCconfig_get_poller_items() poller_type:1
              27992:20110425:184434.099 End of DCconfig_get_poller_items():1
              27992:20110425:184434.099 In DCinit_nextchecks()
              27992:20110425:184434.099 End of DCinit_nextchecks()
              27992:20110425:184434.099 In substitute_simple_macros() data:'ifInOctets.2'
              27992:20110425:184434.099 In substitute_simple_macros() data:'127.0.0.1'
              27992:20110425:184434.099 In substitute_simple_macros() data:'161'
              27992:20110425:184434.099 In substitute_simple_macros() data:'public'
              27992:20110425:184434.099 In substitute_simple_macros() data:'.1.3.6.1.2.1.2.2.1.10.2'
              27992:20110425:184434.099 In get_value() key:'ifInOctets.2'
              27992:20110425:184434.099 In get_value_snmp() key:'ifInOctets.2' oid:'.1.3.6.1.2.1.2.2.1.10.2'
              27992:20110425:184434.099 In snmp_open_session()
              27992:20110425:184434.099 SNMP [[email protected]:161]
              27992:20110425:184434.100 End of snmp_open_session()
              27992:20110425:184434.100 Standard processing
              27992:20110425:184434.100 In snmp_normalize(oid:.1.3.6.1.2.1.2.2.1.10.2)
              27992:20110425:184434.100 End of snmp_normalize():.1.3.6.1.2.1.2.2.1.10.2
              27992:20110425:184434.100 In get_snmp(oid:.1.3.6.1.2.1.2.2.1.10.2)
              [...]
              27992:20110425:184440.120 Status send [2]
              27992:20110425:184440.120 End of get_snmp():NETWORK_ERROR
              27992:20110425:184440.120 In snmp_close_session()
              27992:20110425:184440.121 End of snmp_close_session()
              27992:20110425:184440.121 End of get_value_snmp():NETWORK_ERROR
              27992:20110425:184440.121 Item [Lan Server:ifInOctets.2] error: Timeout while connecting to [127.0.0.1:161]
              27992:20110425:184440.121 In zabbix_log()
              27992:20110425:184440.121 In DCconfig_get_items() hostid:0 key:'zabbix[log]'
              27992:20110425:184440.121 End of DCconfig_get_items():0
              27992:20110425:184440.121 End of zabbix_log()
              27992:20110425:184440.121 End of get_value():NETWORK_ERROR
              tcpdump -i lo port 161
              18:44:34.100286 IP localhost.43395 > localhost.snmp: GetRequest(30) interfaces.ifTable.ifEntry.ifInOctets.2
              18:44:34.101014 IP localhost.snmp > localhost.43395: GetResponse(35) interfaces.ifTable.ifEntry.ifInOctets.2=2554541303
              18:44:35.104386 IP localhost.43395 > localhost.snmp: GetRequest(30) interfaces.ifTable.ifEntry.ifInOctets.2
              18:44:35.104769 IP localhost.snmp > localhost.43395: GetResponse(35) interfaces.ifTable.ifEntry.ifInOctets.2=2554541303
              18:44:36.108407 IP localhost.43395 > localhost.snmp: GetRequest(30) interfaces.ifTable.ifEntry.ifInOctets.2
              18:44:36.108809 IP localhost.snmp > localhost.43395: GetResponse(35) interfaces.ifTable.ifEntry.ifInOctets.2=2554541303
              18:44:37.112358 IP localhost.43395 > localhost.snmp: GetRequest(30) interfaces.ifTable.ifEntry.ifInOctets.2


              When i do snmpwalk:

              snmpwalk -v 2c -Ofn -c public 127.0.0.1:161 .1.3.6.1.2.1.2.2.1.10.2
              .1.3.6.1.2.1.2.2.1.10.2 = Counter32: 2555127263
              tcpdump -i lo port 161
              19:04:37.567493 IP localhost.56205 > localhost.snmp: GetNextRequest(30) interfaces.ifTable.ifEntry.ifInOctets.2
              19:04:37.567946 IP localhost.snmp > localhost.56205: GetResponse(33) interfaces.ifTable.ifEntry.ifInUcastPkts.1=5134254
              19:04:37.568878 IP localhost.56205 > localhost.snmp: GetRequest(30) interfaces.ifTable.ifEntry.ifInOctets.2
              19:04:37.569249 IP localhost.snmp > localhost.56205: GetResponse(35) interfaces.ifTable.ifEntry.ifInOctets.2=2555127263
              Last edited by MADxHAWK; 25-04-2011, 18:55.

              Comment

              • MADxHAWK
                Member
                • Apr 2011
                • 41

                #8
                Hi

                i have upgraded my homeserver to debian squeeze with net-snmp v 5.4.3 and a new compiled zabbix v1.9.3 but it still doesnt work.

                snmpwalkt works fine:
                snmpwalk -v 2c -On -c public localhost icmpOutTimeExcds
                .1.3.6.1.2.1.5.17.0 = Counter32: 0
                but zabbis now throws a new error:
                8862:20110426:023855.638 In get_values()
                8862:20110426:023855.638 In DCconfig_get_poller_items() poller_type:0
                8862:20110426:023855.638 End of DCconfig_get_poller_items():1
                8862:20110426:023855.638 In DCinit_nextchecks()
                8862:20110426:023855.638 End of DCinit_nextchecks()
                8862:20110426:023855.638 In substitute_simple_macros() data:'icmpOutTimeExcds'
                8862:20110426:023855.638 In substitute_simple_macros() data:'127.0.0.1'
                8862:20110426:023855.638 In substitute_simple_macros() data:'161'
                8862:20110426:023855.639 In substitute_simple_macros() data:'public'
                8862:20110426:023855.639 In substitute_simple_macros() data:'1.3.6.1.2.1.5.17.0'
                8862:20110426:023855.639 In get_value() key:'icmpOutTimeExcds'
                8862:20110426:023855.639 In get_value_snmp() key:'icmpOutTimeExcds' oid:'1.3.6.1.2.1.5.17.0'
                8862:20110426:023855.639 In snmp_open_session()
                8862:20110426:023855.639 SNMP [[email protected]:161]
                8862:20110426:023855.639 End of snmp_open_session()
                8862:20110426:023855.639 End of get_value_snmp():NOTSUPPORTED
                8862:20110426:023855.639 Item [Lan Server:icmpOutTimeExcds] error: Error doing snmp_open()
                8862:20110426:023855.639 In zabbix_log()
                8862:20110426:023855.639 In DCconfig_get_items() hostid:0 key:'zabbix[log]'
                8862:20110426:023855.639 End of DCconfig_get_items():0
                8862:20110426:023855.639 End of zabbix_log()
                And tcpdump doesnt even notice a connection try to port 161
                Same happens if i try to monitor my productionserver on internet. With the stable version everything worked fine, so it looks like i have to downgrade back to 1.8.5

                Last thing i could try is to recompile ans add path to net-snmp-config to the parameters.

                EDIT:
                completly deletet zabbix and recompiled 1.9.3 and now it works. Well i dont know if its just because of the new snmp version or if anything badly went wrong during the first compiling.
                Anyway my homserver now running a new system
                Last edited by MADxHAWK; 27-04-2011, 22:17.

                Comment

                Working...