What it is...
Nagios is a monitoring system that works across platforms (Linux/Unix/Windows). Not a "Network monitoring" system or anything else so specific.ANYTHING can be monitored, and ANYONE can be notified in ALMOST any way (Nagios doesn't make phone calls!). Most importantly, ANY corrective action can be taken.
Once something can be programmed (check, notification or corrective action), that's enough! The rest depends on your imagination. Anyone who can write shell scripts can write shell scripts for Nagios.
We could use it to monitor...
Disk capacity, network performance, presence of a process, number of instances of a program, service availability, changes to a website, log files etc. etc. etc...The returned status of what we monitor will be one of:
- 0 (OK) - Nothing to worry about
- 1 (Warning) - Keep an eye on this...
- 2 (Critical) - We have a problem that requires urgent attention
- 3 (Unknown) - Can occur after a program restart when first results are pending
Making output more informative...
It is a good idea when writing plugins, to not just output an exit code, but useful explanatory text (eg: Not just "Process X is running", but "... by user Hooligan on terminal Y at IP Address Z"... even at extension 1234!!).And inform people...
By Winpopup to their workstation, email to any address or even by SMS.And automatically fix problems before they become crises...
Many routine IT support calls have "standard fixes", restart a printer queue, a particular service or daemon etc. Why wake someone in the middle of the night when a program could auto-fix a problem and drop the support person a polite email explaining what happened in the middle of the night?The banana skins...
User input is vital to a successful configuration. It's vital to agree with users what should be considered a Warning or a Critical condition. Otherwise, they self-train to ignore "cry-wolf" notifications. Proper planning will ensure that notifications are always relevant.Equally important is to ensure that host and service dependancies are properly defined. If a router has gone down, we don't want to be notified about all the services that are subsequently unavailable beyond it!!
The cost...
Time!! Nagios comes with plugins for the most typical checks an average installation would be expected to perform (Apache, disk space etc.) but bespoke checks need to be hand-coded and thoroughly tested on the command line, before being integrated into the "Live" Nagios system.Further Information, timesavers and plugins...
A community edition incorporating Nagios and related tools is available from Groundork and their Fruity setup tool is available as a seperate download.The Ignoramus setup front-end supports Nagios 3.Before writing plugins, check out Nagios Plugins and Nagios Exchange.
See for yourself!!
See it in action (Username/Password = guest/guest)Also here, (Username/Password = nagiosadmin/nagiosadmin)
See how it can be used to create reports.