Server service monitor
November 2, 2005 7:18 AM Subscribe
Hi
I am looking for a way to monitor a few servers - HTTP, POP, SMTP from the Internet and receive an email when a service goes down. Is there a free service? Or perhaps a simple script. I do not want to install Big Brother.
Thanks!
freshmeat is an excellent resource for open source tools such as the one you're looking for.
A search on freshmeat for "service monitor" turns up several relevent projects.
Happy hacking.
posted by cactus at 7:54 AM on November 2, 2005
A search on freshmeat for "service monitor" turns up several relevent projects.
Happy hacking.
posted by cactus at 7:54 AM on November 2, 2005
Some jerk named matt wrote an article about this at lifehacker:
here.
posted by metaculpa at 8:06 AM on November 2, 2005 [1 favorite]
here.
posted by metaculpa at 8:06 AM on November 2, 2005 [1 favorite]
Nagios is considered to be the best out there. It's free and open source.
posted by furtive at 8:37 AM on November 2, 2005
posted by furtive at 8:37 AM on November 2, 2005
Best answer: For a no-install solution, perhaps Alvias will do what you need.
posted by bachelor#3 at 9:37 AM on November 2, 2005
posted by bachelor#3 at 9:37 AM on November 2, 2005
If you just want to know if the port is turned on, nmap can do that easily from cron for any port.
If you want to know if the service actually works (in other words, find out if http is actually serving pages, SMTP will relay mail, POP3 will deliver mail, etc), you are in slightly different territory.
For HTTP, that may be as simple as using wget to save a web page to a file, and grepping through it to see if it's what it's supposed to be.
To see if the SMTP server at least has enough brains to deal with EHLO, you could just use Net::SMTP to see if it will print you a banner or something.
To see if POP and SMTP actually work, you could use perl to:
a) send a message via SMTP
b) go grab it and delete it via POP.
That's pretty much the only way to guarantee that those services are fully functional.
Be sure to send your email alert to a different server ;-)
If you are comfortable with just knowing that the services are running (but not necessarily working), the best tool for the job is Smokeping, which is capable of monitoring almost anything, will make pretty historical graphs, and can even send out notifications for you. Smokeping does require some setup, perhaps more than can be justified by monitoring only three services.
Are you on a UNIX-like system? My advice was geared towards something UNIX-like. Perl, of course, works everywhere.
Good luck.
posted by popechunk at 10:25 AM on November 2, 2005
If you want to know if the service actually works (in other words, find out if http is actually serving pages, SMTP will relay mail, POP3 will deliver mail, etc), you are in slightly different territory.
For HTTP, that may be as simple as using wget to save a web page to a file, and grepping through it to see if it's what it's supposed to be.
To see if the SMTP server at least has enough brains to deal with EHLO, you could just use Net::SMTP to see if it will print you a banner or something.
To see if POP and SMTP actually work, you could use perl to:
a) send a message via SMTP
b) go grab it and delete it via POP.
That's pretty much the only way to guarantee that those services are fully functional.
Be sure to send your email alert to a different server ;-)
If you are comfortable with just knowing that the services are running (but not necessarily working), the best tool for the job is Smokeping, which is capable of monitoring almost anything, will make pretty historical graphs, and can even send out notifications for you. Smokeping does require some setup, perhaps more than can be justified by monitoring only three services.
Are you on a UNIX-like system? My advice was geared towards something UNIX-like. Perl, of course, works everywhere.
Good luck.
posted by popechunk at 10:25 AM on November 2, 2005
For website-only monitoring, there's also Montastic
posted by Sharcho at 11:58 AM on January 16, 2006
posted by Sharcho at 11:58 AM on January 16, 2006
This thread is closed to new comments.
posted by meta87 at 7:45 AM on November 2, 2005