Áú»¢¶Ä²©

1 Configura??o de trigger

Overview

To configure a trigger, do the following:

  • Go to: Configuration ¡ú Hosts
  • Click on Triggers in the row of the host
  • Click on Create trigger to the right (or on the trigger name to edit an existing trigger)
  • Enter parameters of the trigger in the form

See also general information on triggers and their calculation times.

Configura??o

A aba Trigger cont¨ºm todos os atributos essenciais de uma trigger.

Par?metro Descri??o
Nome Nome da trigger.
O nome poder¨¢ conter as macros suportadas: {HOST.HOST}, {HOST.NAME}, {HOST.CONN}, {HOST.DNS}, {HOST.IP}, {ITEM.VALUE}, {ITEM.LASTVALUE} e {$MACRO}.
As macros referente aos par?metros da chave ($1, $2...$9) podem ser utilizadas tamb¨¦m.
Observe: As macros $1-$9 ir?o resolver corretamente se estiverem se referindo a constantes em express?es relativamente simples. Por exemplo, o nome "Processor load above $1 on {HOST.NAME}" ir¨¢ automaticamente modificar para "Processor load above 5 on New host" se a express?o for {New host:system.cpu.load[percpu,avg1].last()}>5
Express?o Express?o l¨®gica utilizada para calcular o estado da trigger.
Gera??o de m¨²ltiplos eventos de INCIDENTE Ao marcar esta op??o voc¨º configura que este evento poder¨¢ gerar um novo evento a cada nova valida??o da express?o em estado de 'Incidente'.
Descri??o Campo texto utilizado para prover mais informa??es sobre a trigger. Poder¨¢ conter, por exemplo, informa??es osbre como corrigir problemas espec¨ªficos, detalhes de contato do pessoal de suporte, etc.
Adicionado no Áú»¢¶Ä²© 2.2, a descri??o pode conter o mesmo conjunto de macros que o nome da trigger.
URL Se n?o estiver vazio, a URL informada aqui estar¨¢ dispon¨ªvel em um link quando clicar no nome da trigger em Monitoramento ¡ú Triggers.
Algumas macros podem ser utilizadas neste campo - {TRIGGER.ID}, diversas {HOST.*} macros (desde o Áú»¢¶Ä²© 3.0.0) e macros de usu¨¢rio (desde o Áú»¢¶Ä²© 3.0.0).
Severidade Defina o n¨ªvel de severidade ao clicar no bot?o desejado.
Enabled Desmarque esta op??o para inativar a trigger.

A aba de ¶Ù±ð±è±ð²Ô»å¨º²Ô³¦¾±²¹²õ cont¨ºm todas as »å±ð±è±ð²Ô»å¨º²Ô³¦¾±²¹²õ da trigger.

Clique em Adicionar para adicionar uma nova depend¨ºncia.

Voc¨º tamb¨¦m pode configurar uma trigger ao abrir uma pr¨¦-existente, clicar no bot?o Clone, modificar os dados e clicar no bot?o Adicionar.

Testing expressions

It is possible to test the configured trigger expression as to what the expression result would be depending on the received value.

The following expression from an official template is taken as an example:

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

To test the expression, click on Expression constructor under the expression field.

In the Expression constructor, all individual expressions are listed. To open the testing window, click on Test below the expression list.

In the testing window you can enter sample values ('80', '70', '0', '1' in this example) and then see the expression result, by clicking on the Test button.

The result of the individual expressions as well as the whole expression can be seen.

"TRUE" means that the specified expression is correct. In this particular case A, "80" is greater than the {$TEMP_WARN} specified value, "70" in this example. As expected, a "TRUE" result appears.

"FALSE" means that the specified expression is incorrect. In this particular case B, {$TEMP_WARN_STATUS} "1" needs to be equal with specified value, "0" in this example. As expected, a "FALSE" result appears.

The chosen expression type is "OR". If at least one of the specified conditions (A or B in this case) is TRUE, the overall result will be TRUE as well. Meaning that the current value exceeds the warning value and a problem has occurred.