Ad Widget

Collapse

traps whith zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • villadegoyo
    Junior Member
    • Jul 2008
    • 7

    #1

    traps whith zabbix

    Hi everybody, I'm configuring zabbix to recieve snmp traps from some routers (juniper and cisco). I have got by configuring a "default_trapper" to recieve the traps independently the host who sends the traps and zabbix's web show that traps (a half of that traps). The traps in the log is like that:

    "DISMAN-EVENT-MIB::sysUpTimeInstance: 25:14:22:27.40
    SNMPv2-MIB::snmpTrapOID.0: SNMPv2-SMI::enterprises.2636.4.5.0.1
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.2.270: 25:14:22:27.41
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.3.270: \\\\"07 DA 05 04 01 00 33 00 2B 00 00 \\\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.4.270: 2
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.5.270: \\"greg\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.6.270: \"\"

    But zabbix web shows:

    DISMAN-EVENT-MIB::sysUpTimeInstance: 25:13:49:54.17
    SNMPv2-MIB::snmpTrapOID.0: SNMPv2-SMI::enterprises.2636.4.5.0.1
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.2.239: 25:13:49:54.17
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.3.239: \\07

    Zabbix version is 1.6.6 and I'm using the perl script from zabbix web. The script looks like that:

    $onlyinteresting = TRUE; # Only send interesting trap informations
    # (the host's uptime, the trap's oid, community and SMI-information)

    # Zabbix-Server

    $zabbix_server = "localhost"; # Hostname/IP-Address of zabbix-server
    $zabbix_port = 10051; # Port of zabbix-server (Default: 10051)
    $item = "snmptraps"; # Item to save snmptraps to

    # Wildcard-Host

    $wildcard_host = "Default_Trapper"; # Hostname or IP-Adress of wildcard-host within zabbix
    $alltowildcard = FALSE; # Send all traps to wildcard host

    $mapping_method = "mapfile_ip";
    $mapping_option = "/home/zabbix/mapfile";

    # Zabbix-Programs

    $path_to_zabbix = "/usr/share/zabbix"; # Path to your zabbix-installation
    $zabbix_sender = "/usr/sbin/zabbix_sender"; # Zabbix-Sender-prog
    $log = "/var/log/snmptraper.log";


    The rest of the script is like the web (I have add some lines to get some log information)

    The mapfile:


    192.168.2.2:router4-map
    192.168.2.3:router5-map


    The log of the perl script:

    snmptraphandler for Zabbix (Wed Jun 9 12:37:43 2010)
    [Wed Jun 9 12:37:43 2010] zabbix_host=
    [Wed Jun 9 12:37:43 2010] IP= 192.168.2.2
    [Wed Jun 9 12:37:43 2010] OID: DISMAN-EVENT-MIB::sysUpTimeInstance
    [Wed Jun 9 12:37:43 2010] OID: SNMPv2-MIB::snmpTrapOID.0
    [Wed Jun 9 12:37:43 2010] OID: SNMPv2-SMI::enterprises.2636.3.18.1.7.1.2.270
    [Wed Jun 9 12:37:43 2010] OID: SNMPv2-SMI::enterprises.2636.3.18.1.7.1.3.270
    [Wed Jun 9 12:37:43 2010] OID: SNMPv2-SMI::enterprises.2636.3.18.1.7.1.4.270
    [Wed Jun 9 12:37:43 2010] OID: SNMPv2-SMI::enterprises.2636.3.18.1.7.1.5.270
    [Wed Jun 9 12:37:43 2010] OID: SNMPv2-SMI::enterprises.2636.3.18.1.7.1.6.270
    [Wed Jun 9 12:37:43 2010] OID: SNMPv2-MIB::snmpTrapEnterprise.0
    [Wed Jun 9 12:37:43 2010] str= DISMAN-EVENT-MIB::sysUpTimeInstance: 25:14:22:27.40
    SNMPv2-MIB::snmpTrapOID.0: SNMPv2-SMI::enterprises.2636.4.5.0.1
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.2.270: 25:14:22:27.41
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.3.270: \\\\"07 DA 05 04 01 00 33 00 2B 00 00 \\\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.4.270: 2
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.5.270: \\"greg\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.6.270: \"\"

    [Wed Jun 9 12:37:43 2010] command= /usr/sbin/zabbix_sender --zabbix-server localhost --port 10051
    [Wed Jun 9 12:37:43 2010] ERROR: Failed to send item to host (). Sending it to wildcard host instead.
    [Wed Jun 9 12:37:43 2010] ERROR: Failed to send item (192.168.2.2, 192.168.2.2) DISMAN-EVENT-MIB::sysUpTimeInstance: 25:14:22:27.40
    SNMPv2-MIB::snmpTrapOID.0: SNMPv2-SMI::enterprises.2636.4.5.0.1
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.2.270: 25:14:22:27.41
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.3.270: \\\\"07 DA 05 04 01 00 33 00 2B 00 00 \\\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.4.270: 2
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.5.270: \\"greg\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.6.270: \"\"
    using command /usr/sbin/zabbix_sender --zabbix-server localhost --port 10051 --host Default_Trapper --key snmptraps --value "(192.168.2.2, 192.168.2.2) DISMAN-EVENT-MIB::sysUpTimeInstance: 25:14:22:27.40
    SNMPv2-MIB::snmpTrapOID.0: SNMPv2-SMI::enterprises.2636.4.5.0.1
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.2.270: 25:14:22:27.41
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.3.270: \\\\"07 DA 05 04 01 00 33 00 2B 00 00 \\\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.4.270: 2
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.5.270: \\"greg\\"
    SNMPv2-SMI::enterprises.2636.3.18.1.7.1.6.270: \"\"
    "
    [Wed Jun 9 12:37:43 2010] Exiting ...

    I get the next error and it's look so rare:

    [Wed Jun 9 12:37:43 2010] ERROR: Failed to send item to host (). Sending it to wildcard host instead.

    If you need I make some proofs you only have to propose that

    Thanks a lot
  • villadegoyo
    Junior Member
    • Jul 2008
    • 7

    #2
    somebody can help me??

    Comment

    • MrKen
      Senior Member
      • Oct 2008
      • 652

      #3
      Hi,

      The script that you are using was written by a zabbix forum contributor, perhaps you can read the original thread to see if your problem has already been addressed. Otherwise, posting to that thread might help you to get a useful response.

      Here: http://www.zabbix.com/forum/showthre...light=snmptrap

      MrKen
      Disclaimer: All of the above is pure speculation.

      Comment

      Working...