Zabbix Documentation 3.4

3.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.22.43.23.4

User Tools

Site Tools


manual:config:items:itemtypes:snmp

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:snmp [2014/11/06 09:58]
wiper [Step 2] added 2.4.3 version requirement for ASN_OBJECT_ID support
manual:config:items:itemtypes:snmp [2018/06/11 09:44] (current)
natalja.cernohajeva Corrections (note warning)
Line 1: Line 1:
-==== - #2 SNMP agent ====+==== 2 SNMP agent ====
  
 === Overview === === Overview ===
Line 5: Line 5:
 You may want to use SNMP monitoring on devices such as printers, network switches, routers or UPS that usually are SNMP-enabled and on which it would be impractical to attempt setting up complete operating systems and Zabbix agents. You may want to use SNMP monitoring on devices such as printers, network switches, routers or UPS that usually are SNMP-enabled and on which it would be impractical to attempt setting up complete operating systems and Zabbix agents.
  
-To be able to retrieve data provided by SNMP agents on these devices, Zabbix server must be [[manual:​installation:​install?&#​configure_the_sources|initially configured]] with SNMP support.+To be able to retrieve data provided by SNMP agents on these devices, Zabbix server must be [[manual:​installation:​install#​configure_the_sources|initially configured]] with SNMP support.
  
 SNMP checks are performed over the UDP protocol only.  SNMP checks are performed over the UDP protocol only. 
Line 12: Line 12:
 bulk requests"​ setting for each interface that allows to disable bulk requests for devices that cannot handle them properly. bulk requests"​ setting for each interface that allows to disable bulk requests for devices that cannot handle them properly.
  
-Since Zabbix 2.2.7 Zabbix server and proxy daemons log lines similar to the following if they receive an incorrect SNMP response:<​code>​SNMP response from host "​gateway"​ does not contain all of the requested variable bindings</​code>​While they do not cover all the problematic cases, they are useful for identifying individual SNMP devices for which bulk requests should be disabled.+Since Zabbix 2.2.7 and Zabbix 2.4.2 Zabbix server and proxy daemons log lines similar to the following if they receive an incorrect SNMP response:<​code>​SNMP response from host "​gateway"​ does not contain all of the requested variable bindings</​code>​While they do not cover all the problematic cases, they are useful for identifying individual SNMP devices for which bulk requests should be disabled.
  
 Since Zabbix 2.2 Zabbix server and proxy daemons correctly use the Timeout configuration parameter when performing SNMP checks. Additionally the daemons do not perform retries after a single unsuccessful SNMP request (timeout/​wrong credentials). Previously the SNMP library default timeout and retry values (1 second and 5 retries respectively) were actually used. Since Zabbix 2.2 Zabbix server and proxy daemons correctly use the Timeout configuration parameter when performing SNMP checks. Additionally the daemons do not perform retries after a single unsuccessful SNMP request (timeout/​wrong credentials). Previously the SNMP library default timeout and retry values (1 second and 5 retries respectively) were actually used.
  
-Since Zabbix 2.2.8 Zabbix server and proxy daemons will always retry at least one time: either through the SNMP library'​s retrying mechanism or through the [[#​internal_workings_of_bulk_processing|internal bulk processing mechanism]].+Since Zabbix 2.2.8 and Zabbix 2.4.2 Zabbix server and proxy daemons will always retry at least one time: either through the SNMP library'​s retrying mechanism or through the [[#​internal_workings_of_bulk_processing|internal bulk processing mechanism]].
  
 <note warning>​If monitoring SNMPv3 devices, make sure that msgAuthoritativeEngineID (also known as snmpEngineID or "​Engine ID") is never shared by two devices. According to [[http://​www.ietf.org/​rfc/​rfc2571.txt|RFC 2571]] (section 3.1.1.1) it must be unique for each device.</​note>​ <note warning>​If monitoring SNMPv3 devices, make sure that msgAuthoritativeEngineID (also known as snmpEngineID or "​Engine ID") is never shared by two devices. According to [[http://​www.ietf.org/​rfc/​rfc2571.txt|RFC 2571]] (section 3.1.1.1) it must be unique for each device.</​note>​
Line 28: Line 28:
 [[manual:​config:​hosts:​host|Create a host]] for the device with an SNMP interface. [[manual:​config:​hosts:​host|Create a host]] for the device with an SNMP interface.
  
-Enter the IP address. Set the host status to NOT MONITORED. You can use one of the provided SNMP templates (//Template SNMP Device// and others) that will automatically add a set of items. However, the template may not be compatible with the host.+Enter the IP address. You can use one of the provided SNMP templates (//Template SNMP Device// and others) that will automatically add a set of items. However, the template may not be compatible with the host. Click on //Add// to save the host.
  
 <note tip>SNMP checks do not use //Agent port//, it is ignored.</​note>​ <note tip>SNMP checks do not use //Agent port//, it is ignored.</​note>​
Line 68: Line 68:
 Create an item for monitoring. Create an item for monitoring.
  
-So, now go back to Zabbix and click on Items, selecting ​the SNMP host you created earlier. Depending on whether you used a template or not when creating your host, you will have either a list of SNMP items associated with your host or just a new item box. We will work on the assumption that you are going to create the item yourself using the information you have just gathered using snmpwalk and snmpget, so enter a plain English description in the 'Description' ​field of the new item box. Make sure the '​Host'​ field has your switch/​router in it and change the '​Type'​ field to "​SNMPv* agent"​. Enter the community (usually public) and enter the textual or numeric OID that you retrieved earlier into the 'SNMP OID' field, for example: .1.3.6.1.2.1.2.2.1.10.3+So, now go back to Zabbix and click on //Items// for the SNMP host you created earlier. Depending on whether you used a template or not when creating your host, you will have either a list of SNMP items associated with your host or just an empty list. We will work on the assumption that you are going to create the item yourself using the information you have just gathered using snmpwalk and snmpget, so click on //Create item//. In the new item form, enter the item 'Name'. Make sure the '​Host ​interface' field has your switch/​router in it and change the '​Type'​ field to "​SNMPv* agent"​. Enter the community (usually public) and enter the textual or numeric OID that you retrieved earlier into the 'SNMP OID' field, for example: .1.3.6.1.2.1.2.2.1.10.3
  
-Enter the 'SNMP port' as 161 and the '​Key'​ as something meaningful, e.g. SNMP-InOctets-Bps. Choose a Multiplier if you want one and enter an '​update interval'​ and 'keep history'​ if you want it to be different from the default. Set the '​Status'​ to Monitored, ​the 'Type of information'​ to //Numeric (float)// and the 'Store value' to DELTA (important otherwise you will get cumulative values from the SNMP device instead of the latest change).+Enter the SNMP 'Port' as 161 and the '​Key'​ as something meaningful, e.g. SNMP-InOctets-Bps. Set the 'Type of information'​ to //Numeric (float)// and the preprocessing step as //Change per second// ​(importantotherwise you will get cumulative values from the SNMP device instead of the latest change). Choose a custom multiplier if you want one and enter an '​Update interval'​ and '​History storage period'​ if you want them to be different from the default.
  
-Now save the item and go back to the hosts area of ZabbixFrom here change the SNMP device status to '​Monitored'​ and check in //Latest data// for your SNMP data!+{{:​manual:​config:​items:​itemtypes:​snmpv3_item.png|}}
  
-<note>Since Zabbix 2.2, SHA and AES protocols are supported for SNMPv3 authentication ​and privacy, in addition ​to MD5 and DES supported before that.</​note>​+Now save the item and go to //​Monitoring//​ -//Latest data// for your SNMP data! 
 + 
 +Take note of specific options available for SNMPv3 items: 
 + 
 +^Parameter^Description^ 
 +|//Context name// ​ |Enter context name to identify item on SNMP subnet.\\ //Context name// is supported for SNMPv3 items since Zabbix 2.2.\\ User macros are resolved in this field. ​ |   
 +|//Security name// ​ |Enter security name.\\ User macros are resolved in this field. ​ |  
 +|//Security level// |Select security level:\\ **noAuthNoPriv** - no authentication nor privacy protocols are used\\ **AuthNoPriv** - authentication protocol is usedprivacy protocol is not\\ **AuthPriv** - both authentication ​and privacy ​protocols are used  |  
 +|//​Authentication protocol// ​ |Select authentication protocol - //MD5// or //​SHA//​. ​ |  
 +|//​Authentication passphrase// ​ |Enter authentication passphrase.\\ User macros are resolved in this field. ​ |  
 +|//Privacy protocol// ​ |Select privacy protocol - //DES// or //​AES//​. ​ |  
 +|//Privacy passphrase// ​ |Enter privacy passphrase.\\ User macros are resolved in this field. ​ |  
 + 
 +In case of wrong SNMPv3 ​credentials (security name, authentication ​protocol/​passphrase, ​privacy ​protocol) Zabbix receives an ERROR from net-snmpexcept for wrong //Privacy passphrase// ​in which case Zabbix receives a TIMEOUT error from net-snmp. 
 + 
 +<note warning>​Server/​proxy restart is required for changes in //​Authentication protocol//, //​Authentication passphrase//,​ //Privacy protocol// or //Privacy passphrase// ​to take effect.</​note>​
  
 == Example 1 == == Example 1 ==
Line 107: Line 122:
  
   * regular SNMP items;   * regular SNMP items;
-  * [[manual:config:items:itemtypes:snmp:dynamicindex|SNMP items with dynamic indexes]];​ +  * [[:manual/config/items/itemtypes/snmp/dynamicindex|SNMP items with dynamic indexes]];​ 
-  * [[manual:discovery:low_level_discovery#​discovery_of_snmp_oids|SNMP low-level discovery rules]].+  * [[:manual/discovery/low_level_discovery/snmp_oids|SNMP low-level discovery rules]].
  
 All SNMP items on a single interface with identical parameters are scheduled to be queried at the same time. The first two types of items are taken by pollers in batches of at most 128 items, whereas low-level discovery rules are processed individually,​ as before. All SNMP items on a single interface with identical parameters are scheduled to be queried at the same time. The first two types of items are taken by pollers in batches of at most 128 items, whereas low-level discovery rules are processed individually,​ as before.