Ga naar hoofdinhoud

Linux/SSH Command Event Monitor Reference Guide

notitie

Overview

The Linux/SSH Command Event Monitor is designed to monitor disk input and output on servers and workstations. It enables the execution of shell commands and the parsing of their results. The monitor supports text strings or numbers for result interpretation and allows the definition of complex checks using Javascript.

info

Use Cases

  • Running custom commands and verifying the results.

Monitoring Options

Commands

  • Commands: Enter the shell commands that the event monitor will execute. These commands should be placed on separate lines, mimicking manual keyboard input.

Connection Alerts

  • Alert with [Info/Warning/Error/Critical] if the SSH server is unreachable: Choose the alert level for SSH connection issues.

Result Handling

  • Include the result in every notification: Opt to include the command response in all alerts.
  • Show only the first [#] lines of the result: Limit the number of result lines included in notifications.
  • Alert if the result contains the text [text string]: Set alerts based on specific text appearing in the output.
  • Alert if the result does not contain the text [text string]: Alert if specific text is missing in the output.
  • Alert if the result (a number) is less than [value]: Alert if a numeric output is less than a specified value.
  • Alert if the result (a number) is greater than [value]: Alert if a numeric output exceeds a specified value.

Advanced Content Checks

  • Perform an advanced content check: Execute Javascript-based checks on command outputs. This is ideal for custom validation and logic. Scripts should utilize a ContentCheck() function which receives the command output as a parameter. The script can set Result.Status and Result.Text for simple status and description updates. For more complex scenarios involving data points, use a Result.DataPoint formatted as 'TYPE|NAME|LABEL|VALUE|STATUS'.

Additional Tips

  • Ensure that the Result.status in your script corresponds with the highest severity level needed for monitoring effectiveness. For multiple data points, use a Javascript array structure.

Port Configuration

  • Connect on port number: Specify a non-standard port if not using the default SSH port 22.

Authentication and Security

  • The account must have interactive login rights via SSH and the authority to execute specified commands.

Protocols

Data Points

  • This event monitor can optionally generate custom data points using the advanced content check feature.

Sample Output

Sample Output