2 动作

2 Actions

概述

Overview

如果您希望由于事件而发生某些操作(例如发送通知),则需要配置动作(actions)。

If you want some operations taking place as a result of events (for example, notifications sent), you need to configure actions.

可以根据所有支持的类型的事件来定义操作:

Actions can be defined in response to events of all supported types:

  • 触发事件 - 当trigger的状态从 OK 转到 PROBLEM 或者从 PROBLEM 转到 OK
  • 发现事件 - 发生网络发现时
  • 自动注册事件 -当新的活动代理自动注册
  • 内部事件 - 当项目不受支持或触发器进入未知状态

  • Trigger events - when trigger status changes from OK to PROBLEM and back

  • Discovery events - when network discovery takes place
  • Auto registration events - when new active agents auto-register (or host metadata changes for registered ones)
  • Internal events - when items become unsupported or triggers go into an unknown state

配置动作

Configuring an action

配置动作

To configure an action, do the following:

  • 进入 配置 - >操作
  • Event source下拉单中选择所需的来源
  • 点击 创建 action
  • 命名action
  • 选择进行操作的条件
  • 选择操作来执行
  • 选择恢复操作来执行

  • Go to Configuration → Actions

  • From the Event source dropdown select the required source
  • Click on Create action
  • Name the action
  • Choose conditions upon which operations are carried out
  • Choose the operations to carry out
  • Choose the recovery operations to carry out

常见动作属性:

General action attributes:

2 动作 - 图1

All mandatory input fields are marked with a red asterisk.

参数 说
Nameaction名称.
Type of calculation选择评估 manual/config/notifications/action/conditions#type_of_calculation选项 作为行动条件(有多个条件):
And - 必须满足所有条件
Or - 如果满足一个条件就足够了
And/Or - 两者的组合:AND与不同的条件类型和 OR具有相同的条件类型
Custom expression - 用于评估操作条件的用户定义的计算公式.
Conditions行动条件清单。
New condition选择一个新的动作条件并且点击Add.
Enabled选中该复选框以启用该操作. 否则将被禁用.
ParameterDescription
NameUnique action name.
Type of calculationSelect the evaluation option for action conditions (with more than one condition):
And - all conditions must be met
Or - enough if one condition is met
And/Or - combination of the two: AND with different condition types and OR with the same condition type
Custom expression - a user-defined calculation formula for evaluating action conditions.
ConditionsList of action conditions.
New conditionSelect a new action condition and click on Add.
EnabledMark the checkbox to enable the action. Otherwise it will be disabled.