
Quicklinks
ActiveXperts Network Monitor ships with a collection of shell scripts to monitor remote Linux- and Unix computers. There are two types of check for that: an RSH check and an SSH check.
SSH 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. RSH is another IP-based protocol to execute programs on a remote Linux/Unix computer, but it less popular because it is NOT secure. Therefore, SSH is recommended for checking remote Linux- and Unix computers.
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.
The shell script must reside on the Linux machine, i.e. you cannot use a script that resides on the Windows monitoring server. The shell script must have the 'Execute' permission flag set.
Here's a sample shell script that works with Network Monitor. This script checks the size of a directory:
#!/bin/sh # Validate number of arguments if [ $# -ne 2 ] ; then echo "UNCERTAIN: Invalid number of arguments - Usage: directory_size" exit 1 fi # Check the size of the directory specified if [ -d "$1" ]; then SIZE=`du -s "$1" | awk '{ print $1; }'` if [ $SIZE -le $2 ] ; then echo "SUCCESS: Size of directory=[$SIZE KB], maximum allowed=[$2 KB] DATA:$SIZE" else echo "ERROR: Size of directory=[$SIZE KB], maximum allowed=[$2 KB] DATA:$SIZE" fi else echo "UNCERTAIN: $1 is not a directory" fi
ActiveXperts Network Monitor ships with a selection of shell scripts. These scripts work out of the box. The scripts are located in the <installation-dir>\Scripts\Monitor (Linux) (e.g., C:\Program Files\ActiveXperts\Network Monitor\Scripts\Monitor (Linux). you must copy the script to the linux machine first in order to run the script.
Click here for a CPU monitoring script.
Click here for a directory size.
Click here for a disk check.
Click here for a file existence check.
Click here for a memory monitoring script.
Click here for a ping check.
Click here for a POP3 check.
Click here for a process check.
Click here for an SMTP check.