Check PowerShell by Query (Multi-Line) (Service Check)
  • 11 Jul 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Check PowerShell by Query (Multi-Line) (Service Check)

  • Dark
    Light
  • PDF

Article Summary

Service Check Category: Network Application Checks

Passive: No

Description: Runs a query via remote PowerShell. This query runs remotely from the Netreo appliance to the host to which this check has been added. You may specify a string return value that 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

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 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. (Do not use this field if supplying a value in the field below.)
  • VALUE FOR CRITICAL STATE
    (Optional/Required if 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. (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.

Was this article helpful?