4

If I want to monitor some machines that I'm not the primary maintainer of (ie, I don't have access to install packages), are there any lightweight alternatives to things like Nagios? I'm looking for a script (bash, Perl, PHP, etc.) that does basic monitoring of Linux servers and services (disk space, web server, maybe cpu usage, etc.) and sends alerts when necessary.

I've found a few one-off scripts, but I'm surprised there isn't something slightly more comprehensive.

3
  • 2
    You complain about Nagios for beeing too comprehensive. Then you want a script but in the same sentence you say that it is not comprehensive enough. -1
    – mailq
    Sep 29, 2011 at 21:45
  • I don't think the question should be lightweight alternatives to Nagios. It should be what monitoring solutions are available that meet your requirements. Then tell us how many hosts and services you wish to monitor; what kids of things you wish to monitor and what kind of notifications you need. I suspect you will find you want a bit of everything and one of the more comprehensive mgmt tools will fall out. but maybe not.
    – uSlackr
    Sep 29, 2011 at 22:04
  • 1
    If you don't have access to install packages, you may not be able to get very much info anyway. How much access do you have?
    – Andrew
    Sep 30, 2011 at 2:17

4 Answers 4

5

You can use Monit: http://www.ubuntugeek.com/monitoring-ubuntu-services-using-monit.html

It's lighter weight than Nagios, and it will do alerts and service mending. The drawback is that it's not as flexible as Nagios, and you may need something to monitor Monit (i.e., if it dies, you won't be doing any monitoring, as opposed to Nagios, which can do active checks against NRPE hosts).

3
  • He doesn't have permission to install packages.
    – quanta
    Sep 30, 2011 at 2:42
  • D'oh. Yeah, that would be an issue. In which case, ask the admin to install monitoring. Or get busy with perl.
    – cjc
    Sep 30, 2011 at 2:52
  • 1
    I believe it should be possible to install monit somewhere to home folder and run it under regular user. Of course it won't be able to restart services, but I think it will be ok for alerting.
    – rvs
    Oct 3, 2011 at 18:28
2

You can use one of the free monitoring services (pingdom, etc) and use a simple script as sensor, see for example http://blog.alertfox.com/2011/01/monitoring-disk-space-and-other-status.html

This way you get detailed reporting with very simple scripts.

1

well it is not hard to write it yourself, just make a perl script that does basic commands and uses some regex to get your information, drag it into your master computer, compair it to your tresshold and do something ( email ) when you pass it.

Add it to cron and your off :)

however, if you want something comprehensive, get munin, nagios or cacti send an email to install the packages.

1
  • Not comprehensive enough ... ;-)
    – mailq
    Sep 29, 2011 at 21:49
1

Probably the best commercial solution is Status2K. It's a PHP script and you'll need access to a MySQL database as it stores Bandwidth and CPU/Memory history.

enter image description here

2
  • Does it provide alerting, as specified in the question? A quick look at the web site suggests it doesn't. Oct 11, 2011 at 21:18
  • Yes alerts via email or MSN.
    – Ian Purton
    Oct 13, 2011 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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