Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking for open-source software or other solution to install on my linux server that will keep me up to date on the server's performance and status by email.

I envision something like this:

  • I receive regular (daily or so) email updates with the server's status. (disk and memory usage, performance, load, etc.)
  • When something important happens like an attack is detected by fail2ban, something is failing, a reboot is necessary after an automated update or something similar I receive an email.
  • Real-time statistics from web- or command line interface.

I've always had email notifications from my Windows server, but with Linux I am yet to come across such an option.

Thanks in advance!

share|improve this question
    
see also serverfault.com/questions/67234/… or any of the many questions already about monitoring tools –  warren Oct 5 '10 at 17:09
    
@warren I've looked, but nothing of those gives me the option of receiving automated notifications by email. –  BloodPhilia Oct 5 '10 at 17:14
    
One word: Nagios –  John Gardeniers Oct 7 '10 at 20:36
add comment

4 Answers

up vote 2 down vote accepted

If you will be monitoring more then one system, setting up Nagios will provide what you are asking, for a single system it is probably overkill.

It isn't exclusive to Linux either, it will handle Windows servers, routers, switches, printers, etc.

There are a ton of different plugins available to interact with various systems to get detailed information out of them along with supporting purely SNMP based items.

An example is with our Dell servers, we load NSClient++ on the machines with the check_openmanage plugin so that Nagios can get details on power supplies, cpus, memory, disk controllers, drives, fans, etc.

Also see my answer about some other monitoring where I put some more information about Nagios.

Regarding the email, Nagios is event based, when something happens it sends a notification based on the rules of time of day, degree of issue, etc. As far as I know, there isn't a daily recap email, you just login to the web interface and look at the status' in real time. There may be some options or an extension available to do so though. Nagios is a heavily used monitoring suite and so there is a lot of 3rd party work done for it.

Additional Information:

The core Nagios server is licensed under GPL as are many of the plugins released for public use. There are some commercial add-ons also available and a commercial support available from Nagios.

Nagios is typically run on a single independent machine. It could be run on a shared server but depending on what kind of outage to that server, you may not get the alerts that something happened.

There are more advanced configurations of Nagios to have local information collectors that report back to a centralized Nagios system and double monitoring so that loss of a monitoring server can be reported along with other issues during that period of time.

You can execute probes on a linux server locally using NRPE. For windows I recommend NSClient++, there is also an NRPE_NT but I've found NSClient++ more stable and they can run the same probes.

NConf is a very useful web based configuration utility for Nagios. NConf doesn't update the Nagios configuration live but rather generates a tgz of the config files to extract into the nagios directory. I tossed a simple bash script into my home directory so after I generate the configs I run it, see below.

#!/bin/bash
tar -xzvf /var/www/localhost/htdocs/nconf/output/NagiosConfig.tgz -C /etc/nagios
/etc/init.d/nagios restart
share|improve this answer
    
I will be monitoring 4 servers at a time so yes, this might work... Is this free to use as a business solution? –  BloodPhilia Oct 5 '10 at 18:26
    
@BloodPhilia as far as I have seen yes. The Nagios Core is released under GPL. Anything beyond could be licensed differently as there are Web UIs, configuration management tools, probes, etc built by 3rd parties to add to Nagios' functionality. –  ManiacZX Oct 5 '10 at 18:33
    
Thanks for the quick reply, I think Nagios will be the way to go for me... Have you used this system? –  BloodPhilia Oct 5 '10 at 18:35
    
nagios is free unless you want paid support –  warren Oct 5 '10 at 21:24
    
@BloodPhilia yes I use Nagios to monitor two racks of equipment at two datacenter locations, about 30 restaurant POS systems and various other customer sites. It is very versatile, I monitor status of RAID arrays, VPN tunnels, credit card processing software, mail services, SSL certificate expirations, etc. –  ManiacZX Oct 5 '10 at 22:50
show 5 more comments

I use logwatch for monitoring servers, it doesn't do performance logging by default though, it's very simple to configure. Nagios will do very precise availability and performance monitoring, it also can send e-mails when some thresholds are met.

share|improve this answer
    
Is Nagios free to use as a business solution? –  BloodPhilia Oct 5 '10 at 18:27
    
yes, it's licensed under GNU GPL –  Hubert Kario Oct 5 '10 at 18:34
    
Thanks for the quick reply, I think Nagios will be the way to go for me... Have you used this system? –  BloodPhilia Oct 5 '10 at 18:38
add comment

There are a number of widely available, well-supported, and open source systems to monitor your server health in near-real-time. Check out the following in combination with logwatch:

Ganglia - http://ganglia.sourceforge.net/

Munin - http://munin-monitoring.org/

Monit - http://mmonit.com/monit/

There are other systems that will perform specific checks on machine health and alert you immediately as well. Nagios is very user-extensible and you can write a plugin to monitor almost anything.

Nagios - http://www.nagios.org/

Zabbix - http://www.zabbix.com/

OpenNMS - http://www.opennms.org/

share|improve this answer
    
Any recommendations? Would love to hear some experience with any of these systems. –  BloodPhilia Oct 5 '10 at 18:26
    
If you have just one server to monitor, Nagios, Zabbix and OpenNMS are too complex. –  marcoc Oct 5 '10 at 19:07
    
There's 4 to monitor –  BloodPhilia Oct 5 '10 at 20:18
    
personally, I'd vote OpenNMS –  warren Oct 5 '10 at 21:24
    
@warren why OpenNMS over Nagios besides the obvious GUI advantage –  BloodPhilia Oct 6 '10 at 5:43
show 1 more comment

i have one small code which send you cpu load like wise i'm developing for memory and network usage you try following link for the same

http://studyhat.blogspot.com/2010/09/cpuload-and-send-email-to-admin.html

http://studyhat.blogspot.com/2010/09/memory-use-by-which-process-centos-rhel.html

http://studyhat.blogspot.com/2009/10/linux-memory-use.html

may be help you above links

Thanks :)

share|improve this answer
add comment

Your Answer

 
discard

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.