Zabbix Documentation 3.4

3.04.04.45.0 (current)| In development:5.2 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


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
manual:config:items:itemtypes:snmptrap [2015/11/02 13:46]
richlv zabbix uses 'regexp' almost everywhere, change a few exceptions
manual:config:items:itemtypes:snmptrap [2017/08/25 06:51] (current)
martins-v removing auto numbering
Line 1: Line 1:
-==== - #3 SNMP traps ====+==== 3 SNMP traps ====
  
 === Overview === === Overview ===
Line 37: Line 37:
 | ||| | |||
 ^snmptrap[regexp] ||| ^snmptrap[regexp] |||
-| Catches all SNMP traps from a corresponding address ​that match the [[:​manual/​regular_expressions|regular expression]] specified in **regexp** | SNMP trap | This item can be set only for SNMP interfaces. \\ This item is supported since Zabbix **2.0.0.**\\ //Note//: Starting with Zabbix 2.0.5, user macros and global regular expressions are supported in the parameter of this item key.  |+| Catches all SNMP traps that match the [[:​manual/​regular_expressions|regular expression]] specified in **regexp**. If regexp is unspecified,​ catches any trap. | SNMP trap | This item can be set only for SNMP interfaces. \\ This item is supported since Zabbix **2.0.0.**\\ //Note//: Starting with Zabbix 2.0.5, user macros and global regular expressions are supported in the parameter of this item key.  |
 | ||| | |||
 ^snmptrap.fallback ||| ^snmptrap.fallback |||
-| Catches all SNMP traps from a corresponding address ​that were not caught by any of the snmptrap[] items for that interface | SNMP trap | This item can be set only for SNMP interfaces.\\ This item is supported since Zabbix **2.0.0.** ​ |+| Catches all SNMP traps that were not caught by any of the snmptrap[] items for that interface| SNMP trap | This item can be set only for SNMP interfaces.\\ This item is supported since Zabbix **2.0.0.** ​ |
  
 <​note>​Multi-line regexp matching is not supported at this time.</​note>​ <​note>​Multi-line regexp matching is not supported at this time.</​note>​
Line 90: Line 90:
  
 === - System requirements === === - System requirements ===
 +
 +== Large file support ==
 +
 +Zabbix has "Large file support"​ for SNMP trapper files. The maximum file size that Zabbix can read is 2^63 (8 EiB). Note that the filesystem may impose a lower limit on the file size.
  
 == Log rotation == == Log rotation ==
Line 98: Line 102:
   - The new data are parsed. If this was the rotated file, the file is closed and goes back to step 2.   - The new data are parsed. If this was the rotated file, the file is closed and goes back to step 2.
   - If there was no new data, Zabbix sleeps for 1 second and goes back to step 2.   - If there was no new data, Zabbix sleeps for 1 second and goes back to step 2.
- 
-<note important>​The maximum log file size supported by Zabbix is 2 gigabytes. The log file must be rotated before reaching this limit.</​note>​ 
  
 == File system == == File system ==
Line 112: Line 114:
   - 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
 This results in: This results in:
-  - Command used to send a trap:\\ snmptrap -v 1 -c public 127.0.0.1 '​.1.3.6.1.6.3.1.1.5.3'​ '​0.0.0.0'​ 6 33 '​55'​ .1.3.6.1.6.3.1.1.5.3 ​ s "​teststring000"​+  - Command used to send a trap:\\ snmptrap -v 1 -c public 127.0.0.1 '​.1.3.6.1.6.3.1.1.5.3'​ '​0.0.0.0'​ 6 33 '​55'​ .1.3.6.1.6.3.1.1.5.3 ​ s <​nowiki>​"​teststring000"​</​nowiki>​
   - The received trap:\\ 15:48:18 2011/07/26 .1.3.6.1.6.3.1.1.5.3.0.33 Normal %%"​General event"​%% localhost - ZBXTRAP 127.0.0.1 127.0.0.1   - The received trap:\\ 15:48:18 2011/07/26 .1.3.6.1.6.3.1.1.5.3.0.33 Normal %%"​General event"​%% localhost - ZBXTRAP 127.0.0.1 127.0.0.1
   - Value for item TEST:\\ 15:48:18 2011/07/26 .1.3.6.1.6.3.1.1.5.3.0.33 Normal %%"​General event"​%% localhost - 127.0.0.1   - Value for item TEST:\\ 15:48:18 2011/07/26 .1.3.6.1.6.3.1.1.5.3.0.33 Normal %%"​General event"​%% localhost - 127.0.0.1
 <note tip>This simple example uses SNMPTT as **traphandle**. For better performance on production systems, use embedded Perl to pass traps from snmptrapd to SNMPTT or directly to Zabbix.</​note>​ <note tip>This simple example uses SNMPTT as **traphandle**. For better performance on production systems, use embedded Perl to pass traps from snmptrapd to SNMPTT or directly to Zabbix.</​note>​
  
 +=== - See also ===
 +
 +  * [[https://​www.zabbix.org/​wiki/​Start_with_SNMP_traps_in_Zabbix|CentOS based SNMP trap tutorial on zabbix.org]]