Type
  • Best Practice
Description
  • This article explains how to automatically reset the value of a parameter when a threshold is reached.
Additional Keywords
  • Monitoring Studio KM for PATROL

Related Topic

Knowledge Base

Automatically Resetting the Value of a Parameter when a Threshold is Reached

KB1086 - Nov 03, 2011

Description

Since some features of Monitoring Studio do not offer the possibility to automatically acknowledge an alert, it might be required to automatically reset the value of a parameter using a PSL command. This can for example occur when the polling interval of a monitored object is set to once-a-day and one of its parameters reset is required after a given timeout.

This article explains how to automatically reset the value of a parameter automatically using an Alert Action of type 'Execute a PSL statement'.

Procedure

To acknowledge the alert, you need to configure an alert action:

  1. Right-click the monitored object for which you wish to reset the value of a parameter
  2. Select KM Commands › Set Alert Action
  3. Select the parameter to reset and click Next
  4. Check Execute a PSL statement (advanced) and click Next
  5. Enter the following PSL Command line
    requires  SW_sentry_shared; sleep(x);  swSetParameterValue("/%{OBJECT_CLASS}/%{OBJECT_ID}/%{PARAMETER_NAME}",  n);
    where :
    • x is a countdown representing the time interval (in seconds) after which the command has to be executed
    • n is the value to be set to the parameter. It must be below the threshold value to actually reset the alarm

    Note:  Macros have been used in this PSL command to enable its use on any object. 
  6. Click Next
  7. Click Finish

IMPORTANT: Advanced users might be inclined to write their own command and use PSL functions to reset the parameter. Although it will work the first time, once the threshold is reached a second time, no Alert Action will be triggered. Monitoring Studio keeps an internal counter of the parameters value and when an Alert Action needs to be triggered. Bypassing Monitoring Studio by calling regular PSL functions will make the KM fail to keep track of the values.