- 27 Aug 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Check PowerShell by Query (Multi-Line) (Service Check)
- Updated on 27 Aug 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Service Check Category: Network Application Checks
Passive: No
Description: Runs a query via remote PowerShell that returns a string value. If this value contains multiple lines, all lines of the value are checked (in contrast to Check PowerShell by Query (Service Check)).
The returned value can be used in one of two ways:
- To cause the check to enter an OK state.
- To cause the check to enter a CRITICAL state.
Only one of the two options may be chosen. Attempting to use both options causes the check to enter the UNKNOWN state.
Only the following characters commonly allowed in PowerShell may be entered in the query field:
- Alphanumeric
- Ampersand
- Angle brackets
- Backslash
- Backtick
- Brackets
- Colon
- Comma
- Dash
- Dollar sign
- Double quote
- Forward Slash
- Parentheses
- Period
- Percent symbol
- Pipe symbol
- Semicolon
- Single quote
- Spaces
- Underscore
This query runs remotely from the Netreo appliance to the host to which this check has been added.
Check-specific Fields:
(See the entry Service Check for details on basic configuration options.)
- POWERSHELL COMMAND TO EXECUTE
(Required) Enter the PowerShell query to run. - VALUE FOR AN OK STATE
(Optional/Required if the field below is not used) Enter a string value. This field is ReGex capable, case insensitive, and partial match by default. If the output returned by the PowerShell command includes this string anywhere in it, the check will enter an OK state. Otherwise, it will enter a CRITICAL state. (Use==
,>=
,<=
,!=
for numbers and=~
,!~
for strings.) (Do not use this field if supplying a value in the field below.) - VALUE FOR CRITICAL STATE
(Optional/Required if the field above is not used) Enter a string value. This field is ReGex capable, case insensitive, and partial match by default. If the output returned by the PowerShell command includes this string anywhere in it, the check will enter a CRITICAL state. Otherwise, it will enter an OK state. (Use==
,>=
,<=
,!=
for numbers and=~
,!~
for strings.) (Do not use this field if supplying a value in the field above.) - DESCRIPTION
(Required) This field specifies a name for this check. The name entered must be unique among service check names on the host it is added to (the name may used again only on a different host). It is used to identify this specific check from among other service checks added to the same host.