• 幕客老师召集小伙伴
  • 运维高手36项修炼
  • python自动化运维项目实战
  • nginx从入门到实战
  • 阿里云与Centos7实战

zabbix监控系统-配置篇(触发器-triger)

一、什么是,作用

使用逻辑表达式来评估通过item获取到得数据是处于哪种状态

触发器表达式中我们可以定义哪些值范围是合理,哪些是不合理的,如果出现不合理的值,触发器会把状态改为PROBLEM

item每次获取到一个新值都会使用触发器表达式计算它的状态

描述
OK 触发器的正常状态.
PROBLEM 非正常状态

 

二、配置方式

Configuration -> Hosts

Triggers

点击新建或者编辑存在的Triggers

 

Parameter Description
Name

Trigger 名字
这个名字可以包含宏变量{HOST.HOST}, {HOST.NAME}, {HOST.CONN}, {HOST.DNS}, {HOST.IP}, {ITEM.VALUE}, {ITEM.LASTVALUE} and {$MACRO}.
$1, $2…$9  如这些可以用到关联表达式的位置变量
如名字设置为 “Processor load above $1 on {HOST.NAME}” 

 {New host:system.cpu.load[percpu,avg1].last()}>5

 “Processor load above 5 on New host” 

Severity 设置triger的安全级别按钮

 

Problem expression

设置对应这个级别的表达式

Expression constructor 用于构建负载的表达式

OK event generation

ok状态 事件生成

Expression - 基于exression表达式
Recovery expression - OK events are generated if the problem expression evaluates to FALSE and the recovery expression evaluates to TRUE;
None - in this case the trigger will never return to an OK state on its own.
Supported since Zabbix 3.2.0.

Recovery expression 从problem状态到ok状态,多重恢复的判断。
PROBLEM event generation mode Mode for generating problem events:
Single - 当一个事件的状态,第一次到problem状态
Multiple - 一个事件每一次到problem状态
OK event closes

默认,如果事件ok了,则状态关闭。

All problems - 等触发器所有的问题恢复
All problems if tag values match - 如果触发器的问题匹配event的tag数值

Tag for matching 输入Tag用于和事件关联
This field is displayed if 'All problems if tag values match' is selected for the OK event closes property and is mandatory in this case.
 
Tags 设置定义 tags 来标记 trigger 事件.
Event tags can be used for event correlation, in action conditions and will also be seen in Monitoring → Problems.
Tags are a pair of tag name and value. You can use only the name or pair it with a value.
Both tag names and tag values may include low-level discovery macros and macro functions{{ITEM.VALUE}.regsub(pattern, output)}, {{ITEM.VALUE}.iregsub(pattern, output)}. If the total length of expanded value exceeds 255, it will be cut to 255 characters.
User macros and user macro context is supported since Zabbix 3.2.2. Low-level discovery macros can be used inside user macro context.
Note that in Zabbix 3.2.0, 3.2.1 it is not allowed to use a forward slash in the tag name.
Event tags are supported since Zabbix 3.2.0.
Allow manual close

当我们知道ploblem事件是可以允许的时候,是否可以手动关闭。

手动关闭方式:
This field is available if event acknowledgement is activated in Administration → General
Supported since Zabbix 3.2.0.

URL If not empty, the URL entered here is available as a link when clicking on the trigger name in Monitoring → Triggers.
Macros may be used in the trigger URL field - {TRIGGER.ID}, several {HOST.*} macros (since Zabbix 3.0.0) and user macros (since Zabbix 3.0.0).
Description Text field used to provide more information about this trigger. May contain instructions for fixing specific problem, contact detail of responsible staff, etc.
Starting with Zabbix 2.2, the description may contain the same set of macros as trigger name.
Enabled Unchecking this box will disable the trigger if required.

三、触发器表达式

四、触发器独立性

五、触发器严重性定义

SEVERITY DEFINITION COLOUR
Not classified Unknown severity. Grey
Information For information purposes. Light blue
Warning Be warned. Yellow
Average Average problem. Orange
High Something important has happened. Light red
Disaster Disaster. Financial losses, etc. Red

1、不同的triger 会展示不同的颜色

2、不同的triger 可以出现不同告警声音

3、用户信息展示(如:短信、邮件)

4、用于action处理条件

 

zabbix监控系统-配置篇(触发器-triger)

Pingbacks已打开。

引用地址

暂无评论

发表评论