manual:config:items:itemtypes:snmptrap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
manual:config:items:itemtypes:snmptrap [2020/02/20 08:06]
martins-v adding explicitly the name - snmptt.ini
manual:config:items:itemtypes:snmptrap [2020/02/20 08:43]
martins-v linking to zabbix blog article on SNMP traps
Line 63: Line 63:
 <note tip>For the best performance,​ SNMPTT should be configured as a daemon using **snmptthandler-embedded** to pass the traps to it. See instructions for configuring SNMPTT in its homepage:\\ [[http://​snmptt.sourceforge.net/​docs/​snmptt.shtml]]</​note>​ <note tip>For the best performance,​ SNMPTT should be configured as a daemon using **snmptthandler-embedded** to pass the traps to it. See instructions for configuring SNMPTT in its homepage:\\ [[http://​snmptt.sourceforge.net/​docs/​snmptt.shtml]]</​note>​
  
-When SNMPTT is configured to receive the traps, configure ​SNMPTT (snmptt.ini) to log the traps:+When SNMPTT is configured to receive the traps, configure ​''​snmptt.ini''​:
   - enable the use of the Perl module from the NET-SNMP package:\\ net_snmp_perl_enable = 1   - enable the use of the Perl module from the NET-SNMP package:\\ net_snmp_perl_enable = 1
   - log traps to the trap file which will be read by Zabbix:\\ log_enable = 1\\ log_file = [TRAP FILE]   - log traps to the trap file which will be read by Zabbix:\\ log_enable = 1\\ log_file = [TRAP FILE]
Line 113: Line 113:
   - **zabbix_server.conf** - configure Zabbix to start SNMP trapper and set the trap file:\\ StartSNMPTrapper=1\\ SNMPTrapperFile=/​tmp/​my_zabbix_traps.tmp   - **zabbix_server.conf** - configure Zabbix to start SNMP trapper and set the trap file:\\ StartSNMPTrapper=1\\ SNMPTrapperFile=/​tmp/​my_zabbix_traps.tmp
   - **snmptrapd.conf** - add SNMPTT as the trap handler:\\ traphandle default snmptt   - **snmptrapd.conf** - add SNMPTT as the trap handler:\\ traphandle default snmptt
-  - **snmptt.ini** - configure output file and time format:\\ log_file = /​tmp/​my_zabbix_traps.tmp\\ date_time_format = %H:%M:%S %Y/%m/%d+  - **snmptt.ini** -\\ enable the use of the Perl module from the NET-SNMP package:\\ net_snmp_perl_enable = 1\\ configure output file and time format:\\ log_file = /​tmp/​my_zabbix_traps.tmp\\ date_time_format = %H:%M:%S %Y/%m/%d
   - **snmptt.conf** - define a default trap format: \\ EVENT general .* %%"​General event"​%% Normal\\ FORMAT ZBXTRAP $aA $ar   - **snmptt.conf** - define a default trap format: \\ EVENT general .* %%"​General event"​%% Normal\\ FORMAT ZBXTRAP $aA $ar
   - Create an SNMP item TEST:\\ Host's SNMP interface IP: 127.0.0.1\\ Key: %%snmptrap["​General"​]%%\\ Log time format: hh:mm:ss yyyy/MM/dd   - Create an SNMP item TEST:\\ Host's SNMP interface IP: 127.0.0.1\\ Key: %%snmptrap["​General"​]%%\\ Log time format: hh:mm:ss yyyy/MM/dd
Line 124: Line 124:
 === - See also === === - See also ===
  
 +  * [[https://​blog.zabbix.com/​snmp-traps-in-zabbix|Zabbix blog article on SNMP traps]]
   * [[https://​www.zabbix.org/​wiki/​Start_with_SNMP_traps_in_Zabbix|CentOS based SNMP trap tutorial on zabbix.org]]   * [[https://​www.zabbix.org/​wiki/​Start_with_SNMP_traps_in_Zabbix|CentOS based SNMP trap tutorial on zabbix.org]]