Ad Widget

Collapse

Zabbix SNMP connection timeout to MIKROTIK router

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rpavlyuk
    Junior Member
    • Jan 2016
    • 1

    #1

    Zabbix SNMP connection timeout to MIKROTIK router

    Here's the problem I have. Recently, I've switched from old Linksys router to new MIKROTIK RB1100AHx2

    Zabbix was monitoring my previous router via SNMP with no problems at all but once I've added a new MIKROTIK device, it refuses to connect to it saying that connection has timed out: Timeout while connecting to "192.168.1.1:161"

    Here's what log file is saying:
    Code:
    $ sudo cat /var/log/zabbixsrv/zabbix_server.log | grep 192.168.1.1
       964:20160125:134519.003 error reason for "RV082:ifInOctets1" changed: Timeout while connecting to "192.168.1.1:161".
       968:20160125:134524.044 error reason for "RV082:ifDescr1" changed: Timeout while connecting to "192.168.1.1:161".
       937:20160125:141201.602 SNMP agent item "ifInOctets.3" on host "192.168.1.1" failed: first network error, wait for 15 seconds
       964:20160125:141202.517 item "192.168.1.1:ifOutOctets.2" became not supported: Timeout while connecting to "192.168.1.1:161".
       964:20160125:141202.517 item "192.168.1.1:ifOutOctets.3" became not supported: Timeout while connecting to "192.168.1.1:161".
       943:20160125:141222.705 SNMP agent item "mikrotik.uptime" on host "192.168.1.1" failed: another network error, wait for 15 seconds
       943:20160125:141243.923 SNMP agent item "ifOutOctets.9" on host "192.168.1.1" failed: another network error, wait for 15 seconds
       943:20160125:141308.119 temporarily disabling SNMP agent checks on host "192.168.1.1": host unavailable
       995:20160126:182113.905 SNMP agent item "ifOutOctets.2" on host "192.168.1.1" failed: first network error, wait for 15 seconds
      1016:20160126:182113.921 item "192.168.1.1:ifInOctets.3" became not supported: Timeout while connecting to "192.168.1.1:161".
      1016:20160126:182113.921 item "192.168.1.1:ifOutOctets.3" became not supported: Timeout while connecting to "192.168.1.1:161".
       996:20160126:182134.402 SNMP agent item "mikrotik.cpu.load" on host "192.168.1.1" failed: another network error, wait for 15 seconds
       996:20160126:182155.444 SNMP agent item "ifOutOctets.16" on host "192.168.1.1" failed: another network error, wait for 15 seconds
       996:20160126:182216.822 temporarily disabling SNMP agent checks on host "192.168.1.1": host unavailable
    Definitely, host is available:
    Code:
    $ ping 192.168.1.1
    PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
    64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.210 ms
    64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.174 ms
    ...
    More over, snmpwalk work fine when trying to get values from the host:
    Code:
    $ snmpwalk -v 2c -c public 192.168.1.1 1.3 | head -20
    SNMPv2-MIB::sysDescr.0 = STRING: RouterOS RB1100AHx2
    SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.14988.1
    DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (498000900) 57 days, 15:20:09.00
    SNMPv2-MIB::sysContact.0 = STRING: RPAV
    SNMPv2-MIB::sysName.0 = STRING: MikroTik
    SNMPv2-MIB::sysLocation.0 = STRING: HOME-RACK-01
    SNMPv2-MIB::sysServices.0 = INTEGER: 78
    IF-MIB::ifNumber.0 = INTEGER: 15
    IF-MIB::ifIndex.1 = INTEGER: 1
    IF-MIB::ifIndex.2 = INTEGER: 2
    IF-MIB::ifIndex.3 = INTEGER: 3
    IF-MIB::ifIndex.4 = INTEGER: 4
    IF-MIB::ifIndex.5 = INTEGER: 5
    IF-MIB::ifIndex.6 = INTEGER: 6
    IF-MIB::ifIndex.7 = INTEGER: 7
    IF-MIB::ifIndex.8 = INTEGER: 8
    IF-MIB::ifIndex.9 = INTEGER: 9
    IF-MIB::ifIndex.10 = INTEGER: 10
    IF-MIB::ifIndex.11 = INTEGER: 11
    IF-MIB::ifIndex.12 = INTEGER: 12
    ...
    This means that SNMP is enable on the router and SNMP port is not "firewalled".

    Additional information
    OS: Linux Fedora 23 x86_64
    Software:
    Code:
    $ dnf list installed httpd zabbix* php* *snmp* mariadb*
    Last metadata expiration check performed 0:01:29 ago on Thu Jan 28 14:17:05 2016.
    Installed Packages
    httpd.x86_64                                                                             2.4.18-1.fc23                                                                  @@commandline
    mariadb.x86_64                                                                           1:10.0.21-1.fc23                                                               @@commandline
    mariadb-common.x86_64                                                                    1:10.0.21-1.fc23                                                               @@commandline
    mariadb-config.x86_64                                                                    1:10.0.21-1.fc23                                                               @@commandline
    mariadb-errmsg.x86_64                                                                    1:10.0.21-1.fc23                                                               @@commandline
    mariadb-libs.x86_64                                                                      1:10.0.21-1.fc23                                                               @@commandline
    mariadb-server.x86_64                                                                    1:10.0.21-1.fc23                                                               @@commandline
    net-snmp.x86_64                                                                          1:5.7.3-7.fc23                                                                 @fedora      
    net-snmp-agent-libs.x86_64                                                               1:5.7.3-7.fc23                                                                 @fedora      
    net-snmp-libs.x86_64                                                                     1:5.7.3-7.fc23                                                                 @@commandline
    net-snmp-utils.x86_64                                                                    1:5.7.3-7.fc23                                                                 @fedora      
    perl-Net-SNMP.noarch                                                                     6.0.1-14.fc23                                                                  @fedora      
    php.x86_64                                                                               5.6.17-1.fc23                                                                  @@commandline
    php-bcmath.x86_64                                                                        5.6.17-1.fc23                                                                  @@commandline
    php-cli.x86_64                                                                           5.6.17-1.fc23                                                                  @@commandline
    php-common.x86_64                                                                        5.6.17-1.fc23                                                                  @@commandline
    php-gd.x86_64                                                                            5.6.17-1.fc23                                                                  @@commandline
    php-ldap.x86_64                                                                          5.6.17-1.fc23                                                                  @@commandline
    php-mbstring.x86_64                                                                      5.6.17-1.fc23                                                                  @@commandline
    php-mysqlnd.x86_64                                                                       5.6.17-1.fc23                                                                  @@commandline
    php-pdo.x86_64                                                                           5.6.17-1.fc23                                                                  @@commandline
    php-pecl-jsonc.x86_64                                                                    1.3.9-1.fc23                                                                   @@commandline
    php-snmp.x86_64                                                                          5.6.17-1.fc23                                                                  @updates     
    php-snmp.x86_64                                                                          5.6.17-1.fc23                                                                  @updates     
    php-xml.x86_64                                                                           5.6.17-1.fc23                                                                  @@commandline
    zabbix.x86_64                                                                            2.4.7-1.fc23                                                                   @@commandline
    zabbix-agent.x86_64                                                                      2.4.7-1.fc23                                                                   @@commandline
    zabbix-dbfiles-mysql.noarch                                                              2.4.7-1.fc23                                                                   @@commandline
    zabbix-server.noarch                                                                     2.4.7-1.fc23                                                                   @@commandline
    zabbix-server-mysql.x86_64                                                               2.4.7-1.fc23                                                                   @@commandline
    zabbix-web.noarch                                                                        2.4.7-1.fc23                                                                   @@commandline
    zabbix-web-mysql.noarch                                                                  2.4.7-1.fc23                                                                   @@commandline
    I have other hosts in my network that I monitor using SNMP from the same Zabbix Server and they work fine. The problem is just with MIKROTIK.

    Any ideas why I'm getting this issue with connection timeout?
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome to Zabbix forums!

    Code:
    Timeout while connecting to "192.168.1.1:161"
    Try increasing the Timeout= setting in zabbix_server.conf
    Restart Zabbix server and see if that helps.

    Best Regards,
    Ingus

    Comment

    • xs-
      Senior Member
      Zabbix Certified Specialist
      • Dec 2007
      • 393

      #3
      If you haven't tried already, disable 'use bulk requests' in the host's SNMP agent configuration.

      It's possible the template you use for your Mikrotik device tries to query something the device doesn't support. Simpler MT devices don't have sensors for things like voltage, fan speed, temperature, etc.

      When using bulk requests, it seems that a failure on one item applies to all. Not sure if this is something fixable in Zabbix or normal SNMP behaviour.

      Comment

      • victorhugopa
        Member
        Zabbix Certified Specialist
        • Apr 2010
        • 66

        #4
        Hello rpavlyuk, it's ok for you now?
        I'm having the same problem here in mikrotik devices.

        Zabbix 3.0.1 / Debian 8.4

        Comment

        • delisogoua
          Junior Member
          • Apr 2016
          • 2

          #5
          configuration items imprimante brother

          bonjour a tous
          j'ai un probleme avec la configuration des items zabbix pour mon imprimante Brother L2360DW
          aidez moi a le surveiller
          en creant les :
          -items snmp
          -triggers
          -actions
          -conditions
          -opérations
          pour avoir des messages(alertes dans mon courriel) merci


          Zabbix 3.0.1 / ubuntu 14.04 appliance

          Comment

          • acatic1
            Member
            • Oct 2019
            • 38

            #6
            I'm having the same issue with an Asus RT wireless router - snmpwalk is fine, but says snmp 'timed out'. I've unchecked 'use bulk requests', no help.
            --------never mind; I just had to add the snmp community as a macro - {$SNMP_COMMUNITY} => [community name]. then go to 'configuration', 'hosts', click 'discovery' for the host, select it, and click 'check now'.
            Last edited by acatic1; 29-10-2019, 04:03.

            Comment

            Working...