ActiveXperts Network Monitor
Monitor servers, workstations, devices and applications in your network

Quicklinks


Monitor a POP3 mail server on Linux using an SSH Secure Shell Script

The following script can be used in ActiveXperts Network Monitor to check a POP3 server on a remote LINUX machine:

#################################################################################
# ActiveXperts Network Monitor  - shell script checks
# © 1999-2008, ActiveXperts Software B.V.
#
# For more information about ActiveXperts Network Monitor and SSH, please
# visit the online ActiveXperts Network Monitor Shell Script Guidelines at:
#   http://www.activexperts.com/support/network-monitor/online/linux/
#################################################################################

#!/bin/sh

# Validate number of arguments
if [ $# -ne 1 ] ; then
echo "UNCERTAIN: Invalid number of arguments  Usage: pop3_server "
exit 1
fi

#Checks the connection
sleep 1 | nc $1 110 2>&1 |  awk '
  { if ( $1 == "+OK") 
	  printf( "SUCCESS: POP3 server is available, response=[%s] DATA: 1\r\n", $0 );
	else
	  printf( "ERROR: POP3 server is not available, response=[%s] DATA: 0\r\n", $0 );
  }';