Archive for the 'Plugins' Category

Page 3 of 3

Documentation: Writing Custom Wizards

We’ve had some requests in past months about developer documentation for writing custom Configuration Wizards for Nagios XI.  Many admins have a large amount of devices of a specific type that they regularly need to add to their monitoring environment.  So for those needing to write their own wizard, and don’t mind getting their hands dirty with PHP development, this document and example code illustrate how to write a monitoring wizard while maintaining the integrity of the Nagios XI framework.  The example wizard utilizes a weather alerts check plugin written by Tony Yarusso.  You can find the document on the Nagios Library.

 

Check for XI updates with a plugin

Nagios XI has always had the ability to let you know when updates to the software are available, displaying a message under the Admin area that looks like this:


This is great for just checking up on from time to time, but for most system administrators there are too many applications to be manually checking for updates, and since the whole point of Nagios is to notify you when something needs attention, it would seem far more useful to set this up in a way that would actively let you know when an update was available.

The solution for this was to re-implement the software update check as a Nagios check plugin, separate from the page code.  This means that you can now set up a Nagios service to watch for software updates to XI, and get alerts when a new version comes out just like you would for anything else that needed attention on your network, saving you time and making it more likely that you will actually remember to apply updates when they become available.  With that configuration, you will also have a service screen that looks like this:

While not yet present in XI by default, you can easily add this functionality to your existing installations.  Simply download the plugin here to your plugins directory (/usr/local/nagios/libexec/), make it executable (`chmod +x check_xi_updates`), and create a service for it.  You can find more information about those steps in the documentation and from a self-paced training video (customers only).