View Full Version : Good server monitoring script / program
S2S-Robert
02-19-2004, 10:36 AM
I am looking for a good server monitoring program or script that allows checking of services and if a service on another server is down then it should e-mail me (actually, an e-mail 2 sms provider) to let me know it's down.
The program I've found was :
http://www.linvision.com/checkservice/
But does anybody have any information about either this program or any other program / script that allows this? It should be very easily installable preferably ofcourse ;)
ProWebUK
02-21-2004, 07:01 PM
You could develop a custom script..... theres SIM if you want something already done... theres DA service monitor you will already have...
A custom script (to get you started if you wish to use):
#!/bin/sh
#
# Script to determine if an application is running or not
#################################
# User definable variables:
# examples: httpd, vm-pop3d, exim, proftpd, sshd
APPLICATION="httpd"
APP_STARTSCRIPT="/etc/init.d/httpd"
DATE_TIME=`date +'%D %T'`
CUSTOM_LOG="/var/log/monitor.log"
#################################
# Check processes and count how many are from the appliaction you wish to monitor
# If there are no processes that exist for the specified application the service will be considered down
check=`ps -aux | grep -c httpd` >> /dev/null
# Determine what we should do now...
if test $check -lt 1 then
# If processes for the specified application do *not* exist:
# Write to the log file...
echo "$DATE_TIME: $APPLICATION appears to be offline, Attempting to restart." >> $CUSTOM_LOG
# Restart the service
$APP_STARTSCRIPT restart >> /dev/null
# If you wish to run anything if processes exist run an else command below... if theres nothing else end the if statement above
fi
Chris
RSanders
02-26-2004, 02:40 PM
http://www.nagios.org/
This is what I use, it scales very well (where checkserver dies around a few hundred services) and is very reliable. At first the configuration is tricky, but after you get it, you've got it.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.