Applications Systems

Script monitor does not provide statistic value if the script exit code is 1

The following script monitors do not provide the statistic or message output value if the script exists using the exit code 1: Windows Powershell Monitor Windows Script Monitor Linux/Unix Script Monitor

First published date

10/11/2018 9:22 PM

Last published date

6/29/2020 5:34 AM

Overview

The following script monitors do not provide the statistic or message output value if the script exists using the exit code 1:

  • Windows Powershell Monitor
  • Windows Script Monitor
  • Linux/Unix Script Monitor

Product section

Server Application Monitor

Cause

An exit code of 1 inicates that the script has failed. As such, no parsing of output is performed to gather Statistic or Message values.

Resolution

To monitor a value and compare it against a threshold, set the statistic value as needed and exit with a value of 0. You can then adjust the thresholds within the Monitor to fail or not, depending on the value received.


See also: 
SAM PowerShell Monitors are not working