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

I have some server which my team use for hosting internal applications for development purpose. I thinking of setting up some periodic checks but do now know how to go about it. Can advise on the following?

Preferably windows bat file or linux script

  • How to write a script that will check the content of a webpage to verify if it is down.
  • How to write a script that will check if the website is down by pinging it
  • How to write a script that will check the diskspace of the server is running out of diskspace.
  • How to write a script that will email back to system administrator if either of the above tasks are not fulfilled?
share|improve this question

migrated from May 18 '10 at 12:29

This question came from our site for professional and enthusiast programmers.

Which OS? linux and windows have very different scripting and monitoring methodologies – Jim B May 18 '10 at 13:11

IMHO, there's no need to re-invent the wheel. You have great tools like Nagios, Zabbix or Zenoss.

On the other hand, I'd also consider a RRTool trending/graphing tool like Cacti, Munin or Ganglia.

I'd also recommend to use both these tools with SNMP agents.

Hope this helps.

share|improve this answer

You could build a small monitoring station...there're different products that you can setup in few minutes (zenoss, zabbix, pandorafms, nagios, etc). I think the most important thing to monitor are logs. For linux you could start with logwatch

share|improve this answer
+1 - definitely use something prepackaged - monitoring has already been solved by others. I've had success with nagios, personally. – whaley May 18 '10 at 12:50
+1 for the same reason pointed by whaley. No need to re-invent the wheel. – Marco Ramos May 18 '10 at 13:31

Something like Nagios (which has thousands of user contributed checks) is probably your best bet, although Nagios can take a long time to set up. I've had a good experience with Groundwork OpenSource, which is basically Nagios with a config web GUI, then added additional checks from Monitoring Forge.

All these checks are basically written in PERL or some other scripting language, and can be adapted for use fairly easily if you don't need the web front end or notifications of something like Zabbix or Nagios.

Groundworks includes a lot of WMI based checks as well, which is better suited to Windows monitoring.

share|improve this answer

One application which is light weight and very simple to setup is monit (, from what you are after i am thinking that groundwork might be a little over kill for what you are after.

Downside with monit is that the initial configuration is done though the command line you dont have a GUI for the configuration but you do have one for checking the status. and very easy to integrate scripts you have written into the monitoring as well.

Other monitoring systems i would recommend are;

If you find you need to start trending disk space or http response's over time i would say to start looking down the groundworks route

share|improve this answer

Your Answer


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