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.

Matt V.
  • 837
  • 1
  • 9
  • 12
  • 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 '11 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 '11 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 '11 at 02:17

4 Answers4

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).

cjc
  • 24,916
  • 3
  • 51
  • 70
  • He doesn't have permission to install packages. – quanta Sep 30 '11 at 02: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 '11 at 02: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 03 '11 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.

Matt V.
  • 837
  • 1
  • 9
  • 12
Markules
  • 21
  • 3
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.

Lucas Kauffman
  • 16,880
  • 9
  • 58
  • 93
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

Ian Purton
  • 406
  • 6
  • 4