Monitor Linux hosts using SSH and ActiveXperts

Linux RSH
    Figure 1: ActiveXperts Network Monitor SSH check


ActiveXperts solution to monitor Linux hosts

SSH Secure Shell allows secure network services over an insecure network, such as the Internet. With SSH, ActiveXperts Network Monitor can login onto a remote machine running the SSH daemon, and execute a command or shell script. ActiveXperts Network Monitor requires the output (i.e. StdOut) to be formatted according to the following syntax:

[ SUCCESS | ERROR | UNCERTAIN]: { <explanation> } { DATA:<value>}

The <explanation> will be shown in the 'Last Response' column in the Manager application. The <value> field will be shown in the 'Data' column in the Manager application. Samples:

ERROR: Free Disk space is less than 40 GB DATA:34
SUCCESS: Daemon 'LPD' is running

To allow clients (incl. ActiveXperts Network Monitor) to run a shell script on LINUX/UNIX machine using RSH, the following pre-conditions must be met:

  • The remote UNIX/LINUX machine must have the SSH daemon running;
  • The client must have an entry in the host.allowed configuration file.

An SSH Shell Script check requires the following parameters:

  • Remote Host - Host name or IP address of the remote LINUX/UNIX host;
  • Port - TCP port used for RSH on the remote host. Default port is 22;
  • SSH Command - Specifies the command to run on the remote host;
  • Script Timeout - Specifies the maximum number of milliseconds to wait for completion of the script; if the script takes longer, it will be terminated. Default value: 5000 milliseconds;
  • Account - Account used to authenticate to the remote host;
  • Password - Password used to authenticate to the remote host. If you use a Private Key File to authenticate, you can leave the 'Password' field blank;
  • Private Key File - Private Key File used to authenticate to the remote host. If you use a Password file to authenticate, you can leave the 'Private Key File' field blank;
  • If StdErr is not empty, the result will be - If there's an error in the script, you can handle this error and specify what the result of the check should be: Uncertain, Error or Success.

SSH