Trigger
Concept
- The "Monitoring item" is only responsible for collecting data, and usually the purpose of collecting data is to send a warning message to the relevant person when the data corresponding to the indicator exceeds the reasonable range, "trigger" official English defines thresholds for the data collected by the monitoring items
- Each trigger can have only one monitoring item associated with it, but a single monitor item can use multiple triggers. (multiple trigger with different thresholds, can achieve different levels of alarm function)
- A trigger consists of an expression that defines the threshold for the data taken by the monitoring item
- Once the collected data exceeds the threshold defined by this trigger, the trigger state is converted to "problem", and when the collected data is returned to a reasonable extent, its status will return to "OK" again.
Expressions for triggers
<server>:<key>.<function> (<parameter>)}<operator><constant> Server : Host name key: The key function of the corresponding monitoring entry for the relationship on the host: The functions that are not key, which are supported by the function trigger when the trigger does some kind of operation : Avg,count,change,date,dayofweek , delta,diff,iregexp,last,max,min,nodate,now,sum parameter: function arguments, most numeric functions can accept seconds as their arguments, and if used before a numeric parameter " #" as a prefix, it is represented as the last number of values, such as SUM (300) for all values in 300 seconds, and sum (#10) represents the last 10 times the sum of the values In addition, Avg,count,last,min and Max also support the use of the second parameter, which is used to complete the time qualification, for example: Max (1h,7d) returns the maximum value of a week ago
Example of a trigger expression
172.16.1.200:{system.cpu.load[all,avg1].last (0)} >3 represents the host 172. The last value of the average load over the last 1 minutes of all CPUs on 16.1.200 will trigger the state transformation
Add Trigger
Web management interface----------------trigger triggers
The Zabbix of the Linux learning series