Ad Widget

Collapse

Newly created status trigger not alerting in 1.1beta6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kempkep
    Junior Member
    • Feb 2006
    • 18

    #1

    Newly created status trigger not alerting in 1.1beta6

    I created a new host via a template consisting of multiple agent items and a single trigger {<host>:status.last(0)}=2

    I then shutdown the zabbix agent on <host>.

    This shows up in the events and summary as being ON, and the latest data shows a value of 2 - all perfect, but no action was initiated.

    I fixed this by modifying src/libs/zbxdbhigh/db.c to add another condition to the DBupdate_trigger_value function, which did not cater for unknown trigger values (determined by previous alerts).

    The change was as follows:-

    --- db.c.old 2006-02-17 14:34:35.667794863 +1300
    +++ db.c 2006-02-17 14:08:18.454827912 +1300
    @@ -584,6 +584,7 @@
    }*/
    if( ((trigger->value == TRIGGER_VALUE_TRUE) && (new_value == TRIGGER_VALUE_FALSE)) ||
    ((trigger->value == TRIGGER_VALUE_FALSE) && (new_value == TRIGGER_VALUE_TRUE)) ||
    + (trigger->prevvalue == TRIGGER_VALUE_UNKNOWN) ||
    ((trigger->prevvalue == TRIGGER_VALUE_FALSE) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_TRUE)) ||
    ((trigger->prevvalue == TRIGGER_VALUE_TRUE) && (trigger->value == TRIGGER_VALUE_UNKNOWN) && (new_value == TRIGGER_VALUE_FALSE)))
    {

    Needless to say, after making the change, relinking, restarting the server, recreating the host and again shutting down the agent - an alert was received
    Last edited by kempkep; 17-02-2006, 04:02.
Working...