Hola a todos, desde hace algún tiempo estoy intentando configurar zabbix para que reciba los traps de mis routers (juniper y cisco). He conseguido, configurando un "Default_Trapper" que reciba todos los traps independientemente del equipo que los envía y los muestra a por web. El caso es que ahora intento separarlo con el mapfile y nada de nada, no recibe nada. Os muestro un poco cómo lo tengo configurado a ver si podemos encontrar una solucion:
- La versión de zabbix es la 1.6.6
- El script de perl que tienen colgado en la wiki de zabbix lo tengo configurado de la siguiente manera:
$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";
Por lo demás el script es como está en la web (aunque he añadido logs para intentar enterarme de algo).
El mapfile tiene el siguiente contenido:
192.168.2.2:router4-map
192.168.2.3:router5-map
Espero que podáis echarme una mano.
El log que tengo puesto me dice lo siguiente:
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] Fuerzo a que sea mapfile_ip
[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 ...
Si os fijáis me da este error y me parece bastante raro.
[Wed Jun 9 12:37:43 2010] ERROR: Failed to send item to host (). Sending it to wildcard host instead.
Si necesitais que haga alguna comprobación, por favor no dudéis en pedimela
Un saludo a todos
- La versión de zabbix es la 1.6.6
- El script de perl que tienen colgado en la wiki de zabbix lo tengo configurado de la siguiente manera:
$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";
Por lo demás el script es como está en la web (aunque he añadido logs para intentar enterarme de algo).
El mapfile tiene el siguiente contenido:
192.168.2.2:router4-map
192.168.2.3:router5-map
Espero que podáis echarme una mano.
El log que tengo puesto me dice lo siguiente:
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] Fuerzo a que sea mapfile_ip
[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 ...
Si os fijáis me da este error y me parece bastante raro.
[Wed Jun 9 12:37:43 2010] ERROR: Failed to send item to host (). Sending it to wildcard host instead.
Si necesitais que haga alguna comprobación, por favor no dudéis en pedimela
Un saludo a todos
Comment