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 [2020/12/10 06:56]
marinagen [ZBX-18219] custom multiplier supports macros
manual:config:items:item [2021/01/27 19:24] (current)
Line 62: Line 62:
 |//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. ​ | |//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. ​ |
 |//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 before Zabbix 4.0.11.) ​ | |//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 before Zabbix 4.0.11.) ​ |
-|//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.\\ ​Scientific ​notation ​(e.g. 1e+70) is supported ​since Zabbix ​2.2. \\ User macros and LLD macros ​are supported ​since Zabbix ​4.0.28 (must resolve as an integer or a floating-point number).\\ Examples:''​1e+10''​''​1e+{$MACRO}''​, ''​{#​MACRO}e+10'',​ ''​{$MACRO1}e+{$MACRO2}''​. |+|//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.\\ ​Supported: scientific ​notation, for example, ''​1e+70''​ (since version ​2.2); user macros and LLD macros ​(since version ​4.0.0); strings that include macrosfor example, ''​{#​MACRO}e+10'',​ ''​{$MACRO1}e+{$MACRO2}''​(since version 4.0.28) \\ The macros must resolve to an integer or a floating-point number. |
 |//Simple change// ​ |Calculate difference between the current and previous value.\\ Evaluated as **value**-**prev_value**,​ where\\ //value// - current value; //​prev_value//​ - previously received value\\ This setting can be useful to measure a constantly growing value. If the current value is smaller than the previous value, Zabbix discards that difference (stores nothing) and waits for another value.\\ Only one change operation per item is allowed. ​ | |//Simple change// ​ |Calculate difference between the current and previous value.\\ Evaluated as **value**-**prev_value**,​ where\\ //value// - current value; //​prev_value//​ - previously received value\\ This setting can be useful to measure a constantly growing value. If the current value is smaller than the previous value, Zabbix discards that difference (stores nothing) and waits for another value.\\ Only one change operation per item is allowed. ​ |
 |//Change per second// ​ |Calculate the value change (difference between the current and previous value) speed per second.\\ Evaluated as (**value**-**prev_value**)/​(**time**-**prev_time**),​ where\\ //value// - current value; //​prev_value//​ - previously received value; //time// - current timestamp; //​prev_time//​ - timestamp of previous value.\\ This setting is extremely useful to get speed per second for a constantly growing value. If the current value is smaller than the previous value, Zabbix discards that difference (stores nothing) and waits for another value. This helps to work correctly with, for instance, a wrapping (overflow) of 32-bit SNMP counters.\\ //Note//: As this calculation may produce floating point numbers, it is recommended to set the 'Type of information'​ to //Numeric (float)//, even if the incoming raw values are integers. This is especially relevant for small numbers where the decimal part matters. If the floating point values are large and may exceed the '​float'​ field length in which case the entire value may be lost, it is actually suggested to use //Numeric (unsigned)//​ and thus trim only the decimal part.\\ Only one change operation per item is allowed. ​ | |//Change per second// ​ |Calculate the value change (difference between the current and previous value) speed per second.\\ Evaluated as (**value**-**prev_value**)/​(**time**-**prev_time**),​ where\\ //value// - current value; //​prev_value//​ - previously received value; //time// - current timestamp; //​prev_time//​ - timestamp of previous value.\\ This setting is extremely useful to get speed per second for a constantly growing value. If the current value is smaller than the previous value, Zabbix discards that difference (stores nothing) and waits for another value. This helps to work correctly with, for instance, a wrapping (overflow) of 32-bit SNMP counters.\\ //Note//: As this calculation may produce floating point numbers, it is recommended to set the 'Type of information'​ to //Numeric (float)//, even if the incoming raw values are integers. This is especially relevant for small numbers where the decimal part matters. If the floating point values are large and may exceed the '​float'​ field length in which case the entire value may be lost, it is actually suggested to use //Numeric (unsigned)//​ and thus trim only the decimal part.\\ Only one change operation per item is allowed. ​ |