For Windows users who want to keep an audio-visual tab on what's happening with their Nagios monitoring system, NagiosTray is available. It's written in Visual BASIC.
Linux/Gnome users will want Nagios_Applet.
Current release version is 2.0 Build 5.
Contents |
Notes
Registry
All configurations are in HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Nagios Tray\Settings\. These values are nearly all exposed via the Options Menu system. Caveat diddler.
SSL Sites
If you're going to be checking an SSL server that doesn't have a certificate signed by someone who bribed Microsoft, you'll need to "install" the certificate on the computer(s) you're running NagiosTray on. The easiest way to do it is to navigate to your Nagios site with IE, double-click on the gold lock icon on the bottom right, and click the "Install" button, following the prompts thereafter. Thank Microsoft for this extra inconvenience. If NagiosTray reports a 12045 or any error that results in a persistent unknown state, this may be the cause: It could also be that your username/password aren't valid so confirm that first.
Authentication
If your Nagios deployment doesn't require authentication, you can disable the login box via the Options Menu.
I know it's obnoxious to have to re-authenticate every time you run NagiosTray, however anything else is horribly insecure. If you want to put that stuff in a text file or the Registry, feel free to modify the source and rebuild it.
Windows Versions
I've only tested it on Windows XP. The only things that might require Windows XP are the balloon-style tooltips. I've also created a version that doesn't need them, as a request. Check the downloads for details.
Sound
Borrowing redalert.wav from the Gaim people, NagiosTray will play this when the state changes to critical or warning. You can disable and change sounds via the Options menu.
Speech
NagiosTray, as of 1.0 Build 10, uses the Microsoft Speech SDK 5.1 to provide text-to-speech "reading" of notices. You can get additional voices in a number of locations, MS Sam and Mary are available here, download Sp5TTIntXP.exe.
Icons
The four icons for the critical, warning, ok and unknown states- as well as the "blink off" icon- are in the pixmaps subfolder. If replaced, the next time NagiosTray is run it will load them. The critical icon will blink at 1/4 second intervals. The warning icon will blink at 1 second intervals. The "blink off" icon is fully transparent. These intervals are configurable via the Options Menu.
Windows Firewalls
The NagiosTray.exe file needs to be able to make HTTP/HTTPS connections to your Nagios server. That's it. If you're having problems, this could be why.
Status code 35764
As the message states, 35764 means you (or the timer) has requested a check while another check is still in progress. If you're getting these "naturally" (IOW you're not using the "Check Now" menu option and getting them), you should increase the Check Interval via the Options Menu.
Status code 35761
As the message states, 35761 means the check timed out. If you get these a lot, you might want to test the connection between you and your Nagios server. If you/your Nagios administrator think this may be because of overchecking, and you're using 1.0.19 or newer, you should increase the Check Interval via the Options Menu.
ChangeLog
2.0.5
- Added handling of larger check interval times by way of a 60 second normalization timer. Said differently, all requests larger than 60 seconds are broken into 60 second or smaller increments and stacked. By request of Jan Saner.
2.0.3
- Changed the warning status balloon icon to a caution sign.
- The NagiosTray icon mouseover will display the first 127 characters of the current status text, instead of just the current state. This limit is a Microsoft string limitation, not mine. No complaining.
- Again, possibly fixed a problem where the status balloon popped up occasionally despite no state change event occuring. If not, this is a Windows "feature" and I can't fix it.
2.0.2
- Possibly fixed a problem where the status balloon popped up occasionally despite no state change event occuring. If not, this is a Windows "feature" and I can't fix it. At least it's not getting read again!
- Added a "Date Stamp?" option to the Options panel, to control the datestamping of status messages. Default is on for backwards compatibility, but you can turn it off if listening to the computer read what the current date and time is annoys you... Like it does me. Fixed a spelling error in an error condition box.
2.0.1
- Added a substantial options system that pops up via the tray menu, and the first time you run Nagios Tray after an upgrade (or a downgrade).
- Reworked the speech system to support MS and 3rd party speech plugins. You can get additional voices in a number of locations, MS Sam and Mary are available here, download Sp5TTIntXP.exe.
- Added new registry keys for Read Unknown Messages, Voice Preference, Balloon Text, Critical and Warning Icon Blink Rates, File paths for critical, warning and ok alert sounds.
- Rewrote large sections of code to use the new preferences, and fixed some theoretical bugs along the way. Big, hairy, changes.
1.0.23
- Introduced an error somewhere along the way where the answer to the popup that asks where the Nagios status.cgi is, got saved into the registry as a null (Thanks, Steve!)
- Refined the checker parameters to "see" more events than previous, including cases where a host is down, but services aren't (rare, if not impossible, but what the heck)
1.0.22
- Fixed issue where in the critical or warning state, the balloon text was coming up every timer tick instead of every state change.
1.0.20
- Fixed problem seeing things reported down that don't have active checks enabled. (passive-only)
- Made the debug form invisible again in production builds. Accidentally enabled during 1.0.19.
1.0.19
- "Unknown" state messages aren't "read" if UseSpeech is true
- Added a CheckInterval registry key. If present, this is the number of seconds between checks. Default is 30 seconds
- Handles non-200 HTTP status codes "better", generating an unknown status, and dumping the HTTP status in a blob, viewable by the "Status" menu option
- "Status" menu option now attempts to display interesting information when the state is "Unknown"
1.0.18
- Initial Release
Install
The Zip file contains two .exe files. Setup.exe is the NagiosTray installer. msttss22L.exe is the Microsoft Speech Redistributable installer. Even if you don't want to use text2speech you still need to install this, unless you alter the source and recompile.
The first time you run NagiosTray it will set up the default registry settings, and prompt you for the URL path to your Nagios status.cgi. You can change this in the registry if need be.
Source
The source is included in the source.zip file in the application folder. Consider all of my code public domain.
Download
If you're using a version of Windows prior to XP, after installing the above version, replace the installed .exe with this one.
