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:appendix:triggers:functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
manual:appendix:triggers:functions [2017/08/30 12:35]
martins-v adding example of 'count' function with a string value; some reordering
manual:appendix:triggers:functions [2017/09/13 12:13] (current)
sasha removed double quotes in the function parameters to increase readability
Line 15: Line 15:
 ^ |||| ^ ||||
 |**count** (sec<​nowiki>​|</​nowiki>#​num,<​pattern>,<​operator>,<​time_shift>​) ​ ^^^^ |**count** (sec<​nowiki>​|</​nowiki>#​num,<​pattern>,<​operator>,<​time_shift>​) ​ ^^^^
-^ |Number of values within the defined evaluation period. ​ |**sec** or **#num** - evaluation period in seconds or in latest collected values (preceded by a hash mark)\\ **pattern** (optional) - required pattern\\ \\ **operator** (optional)\\ \\ Supported ''​operators'':​\\ //eq// - equal\\ //ne// - not equal\\ //gt// - greater\\ //ge// - greater or equal\\ //lt// - less\\ //le// - less or equal\\ //like// - matches if contains pattern (case-sensitive)\\ \\ Note that:\\ //eq// (default), //ne//, //gt//, //ge//, //lt//, //le// are supported for integer items\\ //eq// (default), //ne//, //gt//, //ge//, //lt//, //le// are supported for float items\\ //like// (default), //eq//, //ne// are supported for string, text and log items\\ \\ **time_shift** (optional) - see avg()  |Supported value types: float, integer, string, text, log\\ Float items match with the precision of 0.000001.\\ \\ Examples:\\ => count(600) -> number of values for last 10 minutes\\ => %%count(10m,"​error",​"eq")%% -> number of values for last 10 minutes that equal '​error'​\\ => count(600,​12) -> number of values for last 10 minutes that equal '​12'​\\ => %%count(600,​12,​"gt")%% -> number of values for last 10 minutes that are over '​12'​\\ => %%count(#​10,​12,​"gt")%% -> number of values within last 10 values that are over '​12'​\\ => %%count(600,​12,​"gt",86400)%% -> number of values for preceding 10 minutes up to 24 hours ago that were over '​12'​\\ => count(600,,,​86400) -> number of values for preceding 10 minutes up to 24 hours ago\\ \\ The ''#​num''​ parameter is supported since Zabbix 1.6.1.\\ The ''​time_shift''​ parameter and string operators are supported since Zabbix 1.8.2. ​ |+^ |Number of values within the defined evaluation period. ​ |**sec** or **#num** - evaluation period in seconds or in latest collected values (preceded by a hash mark)\\ **pattern** (optional) - required pattern\\ \\ **operator** (optional)\\ \\ Supported ''​operators'':​\\ //eq// - equal\\ //ne// - not equal\\ //gt// - greater\\ //ge// - greater or equal\\ //lt// - less\\ //le// - less or equal\\ //like// - matches if contains pattern (case-sensitive)\\ \\ Note that:\\ //eq// (default), //ne//, //gt//, //ge//, //lt//, //le// are supported for integer items\\ //eq// (default), //ne//, //gt//, //ge//, //lt//, //le// are supported for float items\\ //like// (default), //eq//, //ne// are supported for string, text and log items\\ \\ **time_shift** (optional) - see avg()  |Supported value types: float, integer, string, text, log\\ Float items match with the precision of 0.000001.\\ \\ Examples:\\ => count(600) -> number of values for last 10 minutes\\ => %%count(10m,"​error",​eq)%% -> number of values for last 10 minutes that equal '​error'​\\ => count(600,​12) -> number of values for last 10 minutes that equal '​12'​\\ => %%count(600,​12,​gt)%% -> number of values for last 10 minutes that are over '​12'​\\ => %%count(#​10,​12,​gt)%% -> number of values within last 10 values that are over '​12'​\\ => %%count(600,​12,​gt,​86400)%% -> number of values for preceding 10 minutes up to 24 hours ago that were over '​12'​\\ => count(600,,,​86400) -> number of values for preceding 10 minutes up to 24 hours ago\\ \\ The ''#​num''​ parameter is supported since Zabbix 1.6.1.\\ The ''​time_shift''​ parameter and string operators are supported since Zabbix 1.8.2. ​ |
 ^ |||| ^ ||||
 |**date** ​ ^^^^ |**date** ​ ^^^^