Advertising:
Instalacion SNMTP Traps para Zabbix 7.0
Configuracion de SNMP Traps en Zabbix
# dnf install -y net-snmp-utils net-snmp-perl net-snmp # curl -o /usr/bin/zabbix_trap_receiver.pl https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/misc/snmptrap/zabbix_trap_receiver.pl # chmod 755 /usr/bin/zabbix_trap_receiver.pl # vi /usr/bin/zabbix_trap_receiver.pl #$SNMPTrapperFile = '/tmp/zabbix_traps.tmp'; $SNMPTrapperFile = '/var/log/snmptrap/snmptrap.log';
# vi /etc/zabbix/zabbix_server.conf SNMPTrapperFile=/var/log/snmptrap/snmptrap.log StartSNMPTrapper=1
# mkdir -p /var/log/snmptrap # chmod 750 /var/log/snmptrap # chown zabbix:zabbix /var/log/snmptrap # vi /etc/snmp/snmptrapd.conf # SNMPv3 createUser -e 0x800000020109840301 monitoring SHA512 zabbix_trap AES256 %Password123% authUser execute monitoring # SNMPv 1,2 authCommunity execute zabbix # Zabbix SNMP trap receiver perl do "/usr/bin/zabbix_trap_receiver.pl"
# systemctl restart zabbix-server # systemctl enable --now snmptrapd # systemctl disable --now snmpd # systemctl status snmptrapd # vi /etc/logrotate.d/zabbix_traps /var/log/snmptrap/snmptrap.log { weekly size 10M compress compresscmd /usr/bin/bzip2 compressoptions -9 notifempty dateext dateformat -%Y%m%d missingok maxage 365 rotate 10 }
# snmptrap -v 2c -c zabbix localhost SNMPv2-MIB::snmpMIB IF-MIB::linkDown s eth0
Referencias
https://www.zabbix-es.com.es/index.php/Configurar_SNMP_Traps https://www.initmax.com/wiki/how-to-set-up-snmp-trap-in-zabbix/