Zabbix Documentation 4.2

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:config:items:item

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:item [2019/07/11 08:29]
martins-v the first item poll may occur earlier than the value configured here
manual:config:items:item [2019/09/10 08:31] (current)
martins-v more details on throttling
Line 91: Line 91:
 ^Structured data  ^^^ ^Structured data  ^^^
 |   ​|//​XML XPath// ​ |Extract value or fragment from XML data using XPath functionality.\\ For this option to work, Zabbix server must be compiled with libxml support.\\ Examples:\\ ''​number(/​document/​item/​value)''​ will extract ''​10''​ from ''<​document><​item><​value>​10</​value></​item></​document>''​\\ ''​number(/​document/​item/​@attribute)''​ will extract ''​10''​ from ''<​nowiki><​document><​item attribute="​10"></​item></​document></​nowiki>''​\\ ''/​document/​item''​ will extract ''<​item><​value>​10</​value></​item>''​ from ''<​document><​item><​value>​10</​value></​item></​document>''​\\ Note that namespaces are not supported.\\ Supported since 3.4.0.\\ If you mark the //Custom on fail// checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message. ​ | |   ​|//​XML XPath// ​ |Extract value or fragment from XML data using XPath functionality.\\ For this option to work, Zabbix server must be compiled with libxml support.\\ Examples:\\ ''​number(/​document/​item/​value)''​ will extract ''​10''​ from ''<​document><​item><​value>​10</​value></​item></​document>''​\\ ''​number(/​document/​item/​@attribute)''​ will extract ''​10''​ from ''<​nowiki><​document><​item attribute="​10"></​item></​document></​nowiki>''​\\ ''/​document/​item''​ will extract ''<​item><​value>​10</​value></​item>''​ from ''<​document><​item><​value>​10</​value></​item></​document>''​\\ Note that namespaces are not supported.\\ Supported since 3.4.0.\\ If you mark the //Custom on fail// checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message. ​ |
-|:::|//JSON Path// ​ |Extract value or fragment from JSON data using a simple subset of JSONPath functionality.\\ JSONPath can be specified using the dot notation:\\ ''​$.document.item.value''​\\ or the bracket notation:\\ ''​$['​document'​]['​item'​]['​value'​]''​\\ The former, dot notation, can be used only if object names consist of alphanumeric + underscore characters:\\ ''​$.document.item_0.value''​\\ If object name contains other characters, e. g. blanks, dashes, you must use the bracket notation:\\ ''​$['​document'​]['item 0']['​value-0'​]''​\\ Both notations can be mixed:\\ ''​$.document['​item'​].value''​\\ For both notations ​only direct paths to single objects are supported.\\ Using unquoted number in brackets refers to an array index:\\ ''​$.document[2].value''​\\ If object name is number it must be referred either by dot notation or in quotes using bracket notation.\\ Extracting multiple values ​is not supported.\\ More examples:\\ ''​$.document.item.value''​ will extract ''​10''​ from ''<​nowiki>​{"​document":​{"​item":​{"​value":​ 10}}}</​nowiki>''​\\ ''​$.document.item''​ will extract ''<​nowiki>​{"​value":​ 10}</​nowiki>''​ from ''<​nowiki>​{"​document":​{"​item":​{"​value":​ 10}}}</​nowiki>''​\\ ''​$['​a document'​].item.value''​ will extract ''​10''​ from ''<​nowiki>​{"​a document":​{"​item":​{"​value":​ 10}}}</​nowiki>''​\\ ''​$.document.items[1].value''​ will extract ''​20''​ from ''<​nowiki>​{"​document":​{"​items":​[{"​value":​ 10}, {"​value":​ 20}]}}</​nowiki>''​\\ ''​$["​8"​].items[2].value''​ or ''​$.8.items[2].value''​ will extract ''​30''​ from ''<​nowiki>​{"​8":​{"​items":​[{"​value":​ 10},​{"​value":​ 20},​{"​value":​ 30}]}}</​nowiki>''​\\ Supported since 3.4.0.\\ If you mark the //Custom on fail// checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message. ​ |+|:::|//JSON Path// ​ |Extract value or fragment from JSON data using [[:manual/​appendix/​items/​jsonpath|JSONPath functionality]].\\ (//Note// that only a simple subset of JSONPath functionality ​is supported ​in Zabbix 4.2.0-4.2.4.)\\ If you mark the //Custom on fail// checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message. ​ |
 ^Arithmetic ​ ^^^ ^Arithmetic ​ ^^^
 |   ​|//​Custom multiplier// ​ |Multiply the value by the specified integer or floating-point value.\\ Use this option to convert values received in KB, MBps, etc into B, Bps. Otherwise Zabbix cannot correctly set [[:​manual/​appendix/​suffixes|prefixes]] (K, M, G etc).\\ //Note// that if the item type of information is //Numeric (unsigned)//,​ incoming values with a fractional part will be trimmed (i.e. '​0.9'​ will become '​0'​) before the custom multiplier is applied.\\ Starting with Zabbix 2.2, using scientific notation is also supported. E.g. 1e+70.\\ If you mark the //Custom on fail// checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message. ​ | |   ​|//​Custom multiplier// ​ |Multiply the value by the specified integer or floating-point value.\\ Use this option to convert values received in KB, MBps, etc into B, Bps. Otherwise Zabbix cannot correctly set [[:​manual/​appendix/​suffixes|prefixes]] (K, M, G etc).\\ //Note// that if the item type of information is //Numeric (unsigned)//,​ incoming values with a fractional part will be trimmed (i.e. '​0.9'​ will become '​0'​) before the custom multiplier is applied.\\ Starting with Zabbix 2.2, using scientific notation is also supported. E.g. 1e+70.\\ If you mark the //Custom on fail// checkbox, the item will not become unsupported in case of failed preprocessing step and it is possible to specify custom error handling options: either to discard the value, set a specified value or set a specified error message. ​ |
Line 111: Line 111:
 |:::​|//​Check for error using a regular expression// ​ |Check for an application-level error message using a regular expression. Stop processing if succeeded and message is not empty; otherwise continue processing with the value that was before this preprocessing step. Note that these external service errors are reported to user as is, without adding preprocessing step information.\\ Parameters:​\\ **pattern** - regular expression\\ **output** - output formatting template. An \N (where N=1…9) escape sequence is replaced with the Nth matched group. A \0 escape sequence is replaced with the matched text.  | |:::​|//​Check for error using a regular expression// ​ |Check for an application-level error message using a regular expression. Stop processing if succeeded and message is not empty; otherwise continue processing with the value that was before this preprocessing step. Note that these external service errors are reported to user as is, without adding preprocessing step information.\\ Parameters:​\\ **pattern** - regular expression\\ **output** - output formatting template. An \N (where N=1…9) escape sequence is replaced with the Nth matched group. A \0 escape sequence is replaced with the matched text.  |
 ^Throttling ​ ^^^ ^Throttling ​ ^^^
-|   ​|//​Discard unchanged// ​ |Discard a value if it has not changed.\\ Only one throttling option can be specified for an item.  | +|   ​|//​Discard unchanged// ​ |Discard a value if it has not changed.\\ If a value is discarded, it is not saved in the database and Zabbix server has no knowledge that this value was received. No trigger expressions will be evaluated, as a result, no problems for related triggers will be created/​resolved. Trigger functions will work only based on data that is actually saved in database. As trends are built based on data in the database, if there is no value saved for an hour then there will also be no trends data for that hour.\\ Only one throttling option can be specified for an item.  | 
-|:::​|//​Discard unchanged with heartbeat// ​ |Discard a value if it has not changed within the defined time period (in seconds).\\ Positive integer values are supported to specify the seconds (minimum - 1 second). Time suffixes can be used in this field (e.g. 30s, 1m, 2h, 1d). User macros and low-level discovery macros can be used in this field.\\ Only one throttling option can be specified for an item.  |+|:::​|//​Discard unchanged with heartbeat// ​ |Discard a value if it has not changed within the defined time period (in seconds).\\ Positive integer values are supported to specify the seconds (minimum - 1 second). Time suffixes can be used in this field (e.g. 30s, 1m, 2h, 1d). User macros and low-level discovery macros can be used in this field.\\ If a value is discarded, it is not saved in the database and Zabbix server has no knowledge that this value was received. No trigger expressions will be evaluated, as a result, no problems for related triggers will be created/​resolved. Trigger functions will work only based on data that is actually saved in database. As trends are built based on data in the database, if there is no value saved for an hour then there will also be no trends data for that hour.\\ Only one throttling option can be specified for an item.  |
 ^Prometheus ​ ^^^ ^Prometheus ​ ^^^
 |   ​|//​Prometheus pattern// ​ |Use the following query to extract required data from Prometheus metrics.\\ See [[:​manual/​config/​items/​itemtypes/​prometheus|Prometheus checks]] for more details. ​ | |   ​|//​Prometheus pattern// ​ |Use the following query to extract required data from Prometheus metrics.\\ See [[:​manual/​config/​items/​itemtypes/​prometheus|Prometheus checks]] for more details. ​ |