Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Any tip about software to monitor if a web server is up and running on linux ? It should be able to run with not knowing anything more than the URL. And it must have functionality to send an email alert when the site goes down. Should not be hard to write a script for this myself but seems pointless if there is already something nice out there.

Note that I am going to monitor internal servers, so this need to be a tool that runs on my machine on the same network, not external web based services.

And note that small and simple solutions are preferred.

Update: I eventually created a small python script that I am currently using for this, it can be found here.

share|improve this question
possible duplicate of what are the various ways to monitor servers remotely. – Warner Aug 31 '10 at 14:19
See also:… -- This topic has been covered extensively on a high level. – Warner Aug 31 '10 at 14:20
up vote 10 down vote accepted

You can use wget in a script like this

wget --timeout=3 --tries=1 --spider --no-check-certificate

if [ $? -ne 0 ];then
  echo "Site Down" | mail -s "Site Down"

And you will get an email if wget cannot access the site first time within three seconds.

Set up a cron job to run the script every few minutes.

There are many other alternatives but this is probably the simplest to set up from scratch.

share|improve this answer
as long as you don`t run it on the server that its monitoring - you have no idea how often I have seen that done ;-) – Geraint Jones Aug 31 '10 at 10:47
Thanks. In addition I found that --spider is also an useful option as it avoids to actually save the page to disk. – Zitrax Sep 1 '10 at 10:16
And without installing 'postfix' the mail command just silently fails to send. – Zitrax Sep 2 '10 at 8:02
@Zitrax: And without wget being installed you will get an error. Without the network being up the wget will fail. Without the script being executable the cron job will fail and so on. Also I don't have 'postfix' installed and it works fine for me because I am using exim. – Richard Holloway Sep 2 '10 at 15:45
I would add --no-proxy and --spider – Filippo Vitale Mar 29 '12 at 1:25

You have many options, I'll give you two.

  • Nagios is a full-blown monitoring application capable of monitoring much much more than http, but it handles that as well. It can also create all kinds of repots ("Tell me the uptime percentage of our server/service X this week/month/year...")

  • Monit is another popular choice. Maybe not as feature-filled as Nagios, but nevertheless it's nice.

share|improve this answer
I was looking for something small and simple, so monit seems closer to that. – Zitrax Aug 31 '10 at 10:57

Well, if you want to run something yourself.

These are some options:

Or if you want a managed solution:

Personally I think Zabbix and Zenoss are overkill if you simply wish to monitor the status of a web server. But if you also plan to monitor anything else than they have more features than you'll ever need ;)

share|improve this answer
I guess pingdom and uptrends can't monitor the sites on my internal network. – Zitrax Aug 31 '10 at 10:46
@Zitrax: no, they can't. I read over that part. – Wolph Sep 1 '10 at 0:09

I've upvoted Richard and Janne's answer, but if you want some more detail as to what your webserver is sending and receiving, the first couple chapters of the O'Reilly book "Web Client Programming with Perl" by Clinton Wong gives a great overview of the HTTP protocol. If you want more detailed monitoring than just up/down and want to include response codes, etc, it is a fine place to start.

The book is old, but still valid. Published in 1997, O'Reilly has posted the contents of the book online for free at as part of their OpenBook initiative.

share|improve this answer

I would vote up Janne's answer if I had rep.

Important note about Nagios, the fact that it's full blown does not mean it's a hard and long installation, It's quite simple and friendly.

Second thing, you should really check out what your hardware vendor has to offer. For example, I'm using HP Proliants and they have really nice rpm's that help.

share|improve this answer

If you like what Nagios does, but don't want to delve into the internals, you can also check out Opsview. It is Nagios and a couple of other tools, but delivered through a nice GUI. It's a pretty good starting point.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.