This is a translation of the original English documentation page. Help us make it better.

1 トリガーの設定

概要

trigger を設定するには、次のようにします。

  • ConfigurationHostsにアクセスします。
  • ホストの行にあるTriggersをクリックします。
  • 右側のCreate triggerをクリックします(または、既存の trigger を編集するために trigger 名をクリックします)
  • フォームに trigger のパラメータを入力します。

trigger とその計算時間については、general informationも参照してください。

設定

Trigger タブには、trigger の基本的な属性がすべて含まれています。

必須入力項目には、赤いアスタリスクが表示されています。

パラメータ 説明
Name Trigger name.
Supported macros are: {HOST.HOST}, {HOST.NAME}, {HOST.PORT}, {HOST.CONN}, {HOST.DNS}, {HOST.IP}, {ITEM.VALUE}, {ITEM.LASTVALUE}, {ITEM.LOG.*} and {$MACRO} user macros.
$1, $2...$9 macros can be used to refer to the first, second...ninth constant of the expression.
Note: $1-$9 macros will resolve correctly if referring to constants in relatively simple, straightforward expressions. For example, the name "Processor load above $1 on {HOST.NAME}" will automatically change to "Processor load above 5 on New host" if the expression is last(/New host/system.cpu.load[percpu,avg1])>5
Event name If defined, this name will be used to create the problem event name, instead of the trigger name.
The event name may be used to build meaningful alerts containing problem data (see example).
The same set of macros is supported as in the trigger name, plus {TIME} and {?EXPRESSION} expression macros.
Supported since Zabbix 5.2.0.
Operational data Operational data allow to define arbitrary strings along with macros. The macros will resolve dynamically to real time data in MonitoringProblems. While macros in the trigger name (see above) will resolve to their values at the moment of a problem happening and will become the basis of a static problem name, the macros in the operational data maintain the ability to display the very latest information dynamically.
The same set of macros is supported as in the trigger name.
Severity Set the required trigger severity by clicking the buttons.
Expression Logical expression used to define the conditions of a problem.
A problem is created after all the conditions included in the expression are met, i.e. the expression evaluates to TRUE. The problem will be resolved as soon as the expression evaluates to FALSE, unless additional recovery conditions are specified in Recovery expression.
OK event generation OK event generation options:
Expression - OK events are generated based on the same expression as problem events;
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.
Recovery expression Logical expression (optional) defining additional conditions that have to be met before the problem is resolved, after the original problem expression has already been evaluated as FALSE.
Recovery expression is useful for trigger hysteresis. It is not possible to resolve a problem by recovery expression alone if the problem expression is still TRUE.
This field is only available if 'Recovery expression' is selected for OK event generation.
PROBLEM event generation mode Mode for generating problem events:
Single - a single event is generated when a trigger goes into the 'Problem' state for the first time;
Multiple - an event is generated upon every 'Problem' evaluation of the trigger.
OK event closes Select if OK event closes:
All problems - all problems of this trigger
All problems if tag values match - only those trigger problems with matching event tag values
Tag for matching Enter event tag name to use for event correlation.
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.
Allow manual close Check to allow manual closing of problem events generated by this trigger. Manual closing is possible when acknowledging problem events.
URL If not empty, the URL entered here is available as a link in several frontend locations, e.g. when clicking on the problem name in Monitoring → Problems (URL option in the Trigger menu) and Problems dashboard widget.
The same set of macros is supported as in the trigger name, plus {EVENT.ID}, {HOST.ID} and {TRIGGER.ID}. Note that user macros with secret values will not be resolved in the URL.
Description Text field used to provide more information about this trigger. May contain instructions for fixing specific problem, contact detail of responsible staff, etc.
The same set of macros is supported as in the trigger name.
Enabled Unchecking this box will disable the trigger if required.
Problems of a disabled trigger are no longer displayed in the frontend, but are not deleted.

Tagsタブでは、trigger-level tagsを定義します。 この trigger のすべての問題は、ここで入力された値でタグ付けされます。

さらに、Inherited and trigger tags オプションにより、テンプレートレベルで定義されたタグを、
trigger がそのテンプレートから来る場合に表示することができます。同じタグを持つ複数のテンプレートがある場合、
これらのタグは一度に表示されます。
テンプレート名はカンマで区切られます。trigger は、ホストレベルのタグを "継承" して表示することはありません。

パラメータ 説明
Name/Value Set custom tags to mark trigger events.
Tags are a pair of tag name and value. You can use only the name or pair it with a value. A trigger may have several tags with the same name, but different values.
User macros, user macro context, low-level discovery macros and macro functions with {{ITEM.VALUE}}, {{ITEM.LASTVALUE}} and low-level discovery macros are supported in event tags. Low-level discovery macros can be used inside macro context.
{TRIGGER.ID} macro is supported in trigger tag values. It may be useful for identifying triggers created from trigger prototypes and, for example, suppressing problems from these triggers during maintenance.
If the total length of expanded value exceeds 255, it will be cut to 255 characters.
See all macros supported for event tags.
Event tags can be used for event correlation, in action conditions and will also be seen in MonitoringProblems or the Problems widget.

Dependencies タブには、trigger のすべての dependencies が含まれています。

新しい依存関係を追加するには、Add をクリックします。

また、既存の trigger を開いて Clone ボタンを押し、別の名前で保存することによっても、trigger を構成することができます。

評価式のテスト

設定したtrigger 式が、受け取った値によってどのような式結果になるかをテストすることが可能である。

例として、公式テンプレートにある以下の式を挙げる。

avg(/Cisco IOS SNMPv2/sensor.temp.value[ciscoEnvMonTemperatureValue.{#SNMPINDEX}],5m)>{$TEMP_WARN}
       または
       last(/Cisco IOS SNMPv2/sensor.temp.status[ciscoEnvMonTemperatureState.{#SNMPINDEX}])={$TEMP_WARN_STATUS}

式をテストするには、式フィールドの下にあるExpression constructorをクリックします。

Expressionコンストラクタでは、個々の式がすべてリストアップされます。テスト・ウィンドウを開くには、
式リストの下にある Test をクリックします。

テスト画面では、サンプル値(この例では '80' , '70' , '0' , '1')を入力し、Testボタンをクリックすると、 式の結果を確認することができます。

個々の表現だけでなく、全体の表現の結果も見ることができます。

"TRUE "は、指定された式が正しいことを意味する。このケースAでは、"80" は{$TEMP_WARN}の指定値(この例では "70"です)より大きい。
予想通り、"TRUE "の結果が表示される。

"FALSE "は、指定された式が正しくないことを意味します。この場合この特定のケースBでは、
{$TEMP_WARN_STATUS}の "1 "が "1 "と等しい必要がある。"1" は、指定された値、この例では "0 "と等しくなければならない。
予想通り、"FALSE"の結果が表示される。

式のタイプは "OR "である。指定された条件のうち少なくとも1つ(この例ではAまたはB)が
指定された条件(この例ではAまたはB)の少なくとも1つが "TRUE" であれば、全体の結果も"TRUE"となります。
つまり、現在値が警告値を超えており、問題が発生していることを意味します。