View Full Version : Server Monitor Scripts *for free?
I help run a very low cost hosting biz.... I need a cheap way to monitor servers and shoot me a email when they go down.
Alertra is waaaaaaay to pricey.
Are there any free scripts out there I could run on my own servers?
Thanks <3
3spades 10-08-2003, 12:01 PM If you run the script on your server and your server goes down, chances are you cant be notified of a script on a downed server. You should go with a third party, http://www.easymonitor.com has free monitoring service(s).
Originally posted by 3spades
If you run the script on your server and your server goes down, chances are you cant be notified of a script on a downed server. You should go with a third party, http://www.easymonitor.com has free monitoring service(s).
eh... easymonitor is only every 15 minutes. i need something that will be more frequent.
i have multiple servers that can monitor each other and then shoot an email directly to my cell phone if something isn't right... which is what i'm aiming to do.
if something goes down, it would just email 12345324324324234@email.mycellphoneprovidercoolpeople.com
;)
anyone know where i could nab a script that does this?
3spades 10-09-2003, 12:33 AM http://www.rushland.net/projects.htm
DO a search on Google for Nagios - it is the best monitoring software out there, though it is difficult to setup.
For local monitoring, look at SIM (http://r-fx.net)
If you would like to monitor your servers remotely Nagios could be a consideration :)
Originally posted by JonL
For local monitoring, look at SIM (http://r-fx.net)
If you would like to monitor your servers remotely Nagios could be a consideration :)
already have SIM install
nagios looks tricky, but i'll give it a shot
;)
thanks
crawl 10-09-2003, 11:04 PM I use this on my desktop, along with alertra...
http://www.woodstone.nu/salive/
Very cool product, and you can monitor 10 devices with the free version.
VNPIXEL 10-09-2003, 11:30 PM Originally posted by 3spades
If you run the script on your server and your server goes down, chances are you cant be notified of a script on a downed server. You should go with a third party, http://www.easymonitor.com has free monitoring service(s).
they are down as I type now. How can they monitor for you? :D
John[H4Y] 10-10-2003, 12:48 AM I am assuming you are running Linux.
Here is a short shell script I wrote to notify us of completely downed servers (and if just httpd is down):
#!/bin/bash
testit=`/usr/bin/lynx -source http://yourdomain.com/awebpagetotest.html | grep akeyword`
if [ "$testit" != "" ]; then
echo Server 1 Is Up
else
echo Server_1_Is_Down__From_Server_2 | mail -s "Server_1_is_down" your@emailaddress.com
echo Server 1 is Down
fi
There are a few things you need to modify in the above script. If you can't figure it out then you shouldn't be administering your servers :) You can make a seperate script for each server you have or just copy the lines of code and change the variable name (testit to testit2 and testit3).
Here is a simple script to check if a service is down and to restart it if it is (proftpd used in this example):
#!/bin/bash
testit=`/sbin/service proftpd status | grep running`
if [ "$testit" != "" ]; then
echo ProFTPd is running
else
echo ProFTPd is down
/sbin/service proftpd stop
/sbin/service proftpd start
fi
Assuming you have crond running, simply dump these scripts in your /etc/cron.hourly or add something like this to your /etc/crontab file:
0-59/6 * * * * root /usr/local/bin/yourscript
if you want to run it quite often.
If you use your imagination, you can easily come up with a system that checks every port, sends email to your pager, and restarts services that are down and even sends you an email if it is unsucessful at restarting a service. Also, you can obviously remove the echo lines after you test it because it will be echoing to no one when it runs from the cron. I leave them in in case I want to quickly check the script (for instance if the keyword I use to see if the website is up happens to change and I get a false alarm). Hope this helps!
thodgson 06-05-2005, 08:24 AM Nagios is a decent program/product but a bit tough to set up.
For email alerts and such, you should check out http://www.webwatchbot.com
Karthick 06-05-2005, 08:40 AM How many hosts actually monitor the performance of their servers (instead of monitoring up/down).
PTNHosting 06-05-2005, 08:52 AM What about SiteUptime.com i use them and am very happy with it.
genxweb 06-05-2005, 09:10 AM Here is a thread from servermojo they offer free monitoring and custom times. they usally post in the related offer category.
http://www.webhostingtalk.com/showthread.php?s=&threadid=410386
P-nut 06-05-2005, 11:02 AM Um, did anyone else notice the date of the original post?
10-08-2003 10:37 AM
;)
genxweb 06-05-2005, 11:09 AM hahaha nope
TimSG 06-05-2005, 10:31 PM Well.. if anyone is looking for a program.. you can also use big brother (http://www.bb4.com).
|