Zabbix Documentation 2.0

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

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 [2014/09/25 14:41]
sasha Page moved from 2.0:manual:config:items:itemtypes:snmptrap to manual:config:items:itemtypes:snmptrap
manual:config:items:itemtypes:snmptrap [2015/11/02 13:52] (current)
richlv zabbix uses 'regexp' almost everywhere, change a few exceptions
Line 18: Line 18:
   - Zabbix SNMP trapper reads and parses the trap file   - Zabbix SNMP trapper reads and parses the trap file
   - For each trap Zabbix finds all "SNMP trapper"​ items with host interfaces matching the received trap address. Note that only the selected "​IP"​ or "​DNS"​ in host interface is used during the matching.   - For each trap Zabbix finds all "SNMP trapper"​ items with host interfaces matching the received trap address. Note that only the selected "​IP"​ or "​DNS"​ in host interface is used during the matching.
-  - For each found item, the trap is compared to regex in "​snmptrap[regex]". The trap is set as the value of **all** matched items. If no matching item is found and there is an "​snmptrap.fallback"​ item, the trap is set as the value of that.+  - For each found item, the trap is compared to regexp ​in "​snmptrap[regexp]". The trap is set as the value of **all** matched items. If no matching item is found and there is an "​snmptrap.fallback"​ item, the trap is set as the value of that.
   - If the trap was not set as the value of any item, Zabbix by default logs the unmatched trap. (This is configured by "Log unmatched SNMP traps" in Administration -> General -> Other.)   - If the trap was not set as the value of any item, Zabbix by default logs the unmatched trap. (This is configured by "Log unmatched SNMP traps" in Administration -> General -> Other.)
  
Line 36: Line 36:
 ^  Description ​ ^  Return value  ^  Comments ​ ^ ^  Description ​ ^  Return value  ^  Comments ​ ^
 | ||| | |||
-^snmptrap[regex] ||| +^snmptrap[regexp] ||| 
-| Catches all SNMP traps from a corresponding address that match **regex** | SNMP trap | This item can be set only for SNMP interfaces.\\ **This item is supported starting from version 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 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 starting from version 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 starting from version 2.0.0.** ​ | | 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 starting from version 2.0.0.** ​ |
  
-<​note>​Multi-line ​regex matching is not supported at this time.</​note>​+<​note>​Multi-line ​regexp ​matching is not supported at this time.</​note>​
  
 Set the **Type of information** to be '​Log'​ for the timestamps to be parsed. Note that other formats such as '​Numeric'​ are also acceptable but might require a custom trap handler. Set the **Type of information** to be '​Log'​ for the timestamps to be parsed. Note that other formats such as '​Numeric'​ are also acceptable but might require a custom trap handler.
Line 52: Line 52:
 == Configuring Zabbix server/​proxy == == Configuring Zabbix server/​proxy ==
  
-To read the traps, Zabbix server or proxy must be configured to start the SNMP trapper process and point to the trap file that is being written by SNMPTT or a perl trap receiver. To do that, edit the configuration file ([[:2.0/manual/appendix/config/zabbix_server|zabbix_server.conf]] or [[:2.0/manual/appendix/config/zabbix_proxy|zabbix_proxy.conf]]):​+To read the traps, Zabbix server or proxy must be configured to start the SNMP trapper process and point to the trap file that is being written by SNMPTT or a perl trap receiver. To do that, edit the configuration file ([[manual:appendix:config:zabbix_server|zabbix_server.conf]] or [[manual:appendix:config:zabbix_proxy|zabbix_proxy.conf]]):​
   - StartSNMPTrapper=1   - StartSNMPTrapper=1
   - SNMPTrapperFile=[TRAP FILE]   - SNMPTrapperFile=[TRAP FILE]
  
 +<note warning>​If systemd parameter **[[http://​www.freedesktop.org/​software/​systemd/​man/​systemd.exec.html#​PrivateTmp=|PrivateTmp]]** is used, this file is unlikely to work in ///​tmp//​.</​note>​
 == Configuring SNMPTT == == Configuring SNMPTT ==
  
Line 111: Line 112:
   - 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 ==