Check Remote SSH Execution (Service Check)
  • 06 Mar 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Check Remote SSH Execution (Service Check)

  • Dark
    Light
  • PDF

Article Summary

Service Check Category: System Checks

Passive: No

Description: Linux servers only. Sends a specific, user-provided SSH command to the host and checks the output against either a numerical value or a regular expression. The check will enter a CRITICAL state if the output does not evaluate as specified in the check configuration.

For example, you could configure this check to send the command "systemctl is-active vsftpd.service" to the device the check is assigned to. This command will output the string "active" if the process specified in the command is running properly. So, you could put "=~" in the comparator field for a regex match and put "active" in the value to match field. The check will then run at regular intervals (as configured). As long as the output from the command is the string "active" the check will remain in the OK state. If the output is anything other than the string "active" the check will enter a CRITICAL state and generate an alarm.

Check-specific Configuration Fields:
(See the entry 
Service Check for details on basic configuration options.)

  • COMMAND
    (Required) The command to be executed on the target system.
  • COMPARATOR
    (Required) How the command output should be evaluated against the VALUE TO MATCH value. A regular expression may be used in this field. The following values are allowed:
    • ==, >=, <=, !=
    • =~ for regular expression
    • !~ for inverse regular expression
  • VALUE TO MATCH
    (Required) The exact text string or numerical value against which the command output will be evaluated.
  • 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?