Ad Widget

Collapse

1.6.2 trigger change() diff() functions / bug or limitation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alain Ganuchaud
    Member
    Zabbix Certified Trainer

    • Mar 2009
    • 49

    #1

    1.6.2 trigger change() diff() functions / bug or limitation

    Hi,

    I configure an item retrieving services list and fire a trigger when there is a difference between last() and prev() by using diff() or change() functions (this means a service crashed or is not running and so on ...). The trigger is not fired if last value (type is text) is changing a bit (a bit means last record of output is changed). But trigger is fired when output is completely different (for example, i change the command to produce a syntax error) or when the trigger is based on checksum (in this last case, off course I redirect the outoput in a file and I monitor the output file).

    Any help is appreciated, below Configuration details ...

    Thanks
    Alain

    ---------------------------

    Configured Item
    system.run[wmic service where "Startmode='Auto' and state!='Running'" get DisplayName /Format:csv]
    Output as text

    ---------------------------

    Configured Trigger
    ({T_Windows:system.run[wmic service where "Startmode='Auto' and state!='Running'" get DisplayName /Format:csv].diff(0)})>0

    I tried also with change()

    ---------------------------

    diff does not detect the change

    12854:20090325:152159 In update_functions(22829)
    12854:20090325:152159 Query [select distinct function,parameter,itemid,lastvalue from functions where itemid=22829]
    12854:20090325:152159 ItemId:22829 Evaluating diff(0)
    12854:20090325:152159 In evaluate_function('bali1:system.run[wmic service where "Startmode='Auto' and state!='Running'" get DisplayName /Format:csv].diff(0)')
    12854:20090325:152159 End of evaluate_function('bali1:system.run[wmic service where "Startmode='Auto' and state!='Running'" get DisplayName /Format:csv].diff(0)',value:'0'):SUCCEED
    12854:20090325:152159 Do not update functions, same value
    12854:20090325:152159 End update_functions()
    12854:20090325:152159 In update_triggers [itemid:22829]

    -------------------------------------------

    Displayed Values on Web Interface
    We see the output has changed

    2009.Mar.25 15:23:29
    Node,DisplayName
    BALI1,Performance Logs and Alerts

    2009.Mar.25 15:23:00
    Node,DisplayName
    BALI1,Performance Logs and Alerts

    2009.Mar.25 15:22:29
    Node,DisplayName
    BALI1,Performance Logs and Alerts

    2009.Mar.25 15:21:59
    Node,DisplayName
    BALI1,Performance Logs and Alerts

    2009.Mar.25 15:21:30
    Node,DisplayName
    BALI1,Performance Logs and Alerts
    BALI1,World Wide Web Publishing Service

    2009.Mar.25 15:20:59
    Node,DisplayName
    BALI1,Performance Logs and Alerts
    BALI1,World Wide Web Publishing Service

    ------

    Log On the Agent

    1044:20090325:152140 Requested [system.run[wmic service where "Startmode='Auto' and state!='Running'" get DisplayName /Format:csv]]
    1044:20090325:152140 Run command 'wmic service where "Startmode='Auto' and state!='Running'" get DisplayName /Format:csv'
    1044:20090325:152140 Before
    1044:20090325:152140 Run remote command [cmd /C "wmic service where "Startmode='Auto' and state!='Running'" get DisplayName /Format:csv"] Result [55] [
    Node,DisplayName
    ]...
    1044:20090325:152140 Sending back [
    Node,DisplayName
Working...