Configure Scripts for Custom Alarms

Custom alarms may be used to provide application-specific monitoring. Each alarm is based on the execution of a named script or program which must return a value through its exit code and allows for the configuration of scripts to provide specific timed information responses outside the bounds of the existing framework. For example, a script can send a ping to a router and if a successful reply is not received, denoted by an error code, the SysTrack Agent will respond with an action and/or a notification. In a more complex situation, a custom created script could send a SQL statement to a database and capture the response time of the query. If the response time is more than ‘y’ number of milliseconds, over number or consecutive requests, the SysTrack Agent could raise an alarm

For each script the following three alarms may be independently enabled:

  • Duration - triggered when the time required for the script to complete exceeds the specified limit for the specified time period
  • Failure - triggered when an attempt to run the script fails
  • Result - triggered when the value returned by the script exceeds the specified limit for the specified time period

Configure a Script

  1. In System Configuration, select Roles.
  2. In the drop down list, select Scripting.
  3. Click the plus icon to add a new child setting to the selected Role. The Add New Setting dialog box opens.

  4. Enter a name and click Create.
  5. In the Script path/Redist/SQL field, select one of the following options:
    • Redist - allows for the placing of a script in the redist folder that will be distributed to each system running in this Alarm Configuration. The redist folder is located off the Lsiagent folder on the Master System. If you select this option the path will appear as follows: Redist\<script name>
    • Path- Allows you, via the ellipsis button to the right of the File field, to select a specified path on each system where you would like to manually place a copy of the script.
    • SQL - Allows you to enter a SQL command line argument in the Arguments field to be applied to the script.
  6. Use the Frequency field to configure how often the script will run. The frequency you select depends on the Time values you select for Duration and Result times.
  7. Click in the Start Time field to display the Choose Time dialog and select the appropriate start time using the sliders, or clicking the Now button for the current time. Click the Done button when complete.

  8. The custom script can be schedule to run in accordance with your scheduling. To do this select the Synchronize check box to synchronize your scripts with the time you have set.
  9. Enter the Red Limit. Red is generic designation of higher severity. Its Limits and Times are typically set higher than a Yellow. This is the value against which another value is compared. In the case of the Duration, it is the time in seconds that must be exceeded before a failure is recorded. In the case of a Result, it works in conjunction with the Operator to determine if the error condition is met. In both cases, the Limit is dependent on the Time value before an Alarm, Notification or Action will be triggered.
  10. Enter the Red Time. Red is generic designation of higher severity. Its Limits and Times are typically set higher than a Yellow. This is the total time in seconds that the Duration or Result values must exceed before an alarm is sounded. The limit must be exceeded during the duration of the Time value or an alarm will not be generated.
  11. Use the Timeout field to set a value that will cause the SysTrack Agent to stop the script after the script has run for that period of time.
  12. Enter the Yellow Limit value. This is the value against which another value is compared. In the case of the Duration, it is the time in seconds that must be exceeded before a failure is recorded. In the case of a Result, it works in conjunction with the Operator to determine if the error condition is met. In both cases, the Limit is dependent on the Time value before an Alarm, Notification or Action will be triggered.
  13. Enter the Yellow Time. This is the total time in seconds that the Duration or Result values must exceed before an alarm is sounded. The limit must be exceeded during the duration of the Time value or an alarm will not be generated.
  14. Select a Notification from the drop down list. If desired select an Action to take when the set limits are exceeded from the drop down list.
  15. If you wish to set the Action field to its default value, click the icon to the right of the field.
  16. When you are done, click the Save Changes button on the top right of the page.