4

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?
1
  • Which OS? linux and windows have very different scripting and monitoring methodologies
    – Jim B
    May 18, 2010 at 13:11

4 Answers 4

5

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.

2

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

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

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.

1

One application which is light weight and very simple to setup is monit (http://mmonit.com/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

You must log in to answer this question.