The Nagios Plugins project recently released a new version. Amongst the changes is a new feature which we added for a customer.

The requirement was to measure the rate of change for SNMP counters. The standard check_snmp plugin is great at getting information, but only at a specific moment in time. For some things, you want to check and alert on the rate of change. There's a lot of interesting metrics that you can get from SNMP which are Counter32 or Counter64 values. An example is IP-MIB::ipInAddrErrors.0. This counts the number of packets that are discarded due to invalid IP addresses - probably due to network errors or an attempt at infiltrating your network.

We could have met the requirements by writing a new plugin. But we wanted to this in the core plugins because it is useful functionality for everyone. To enable this feature, we had to introduce some library functions so that plugins could save state information. After some discussions with the Nagios Plugins core team, we designed the library functions for inclusion in the Nagios Plugins C library. There have been attempts before, but the interface was unnecessarily complex. We believe in designing things to work yet keeping it simple - we make these design decisions every day!

But there's more! Having the plugin is only half the story because we wanted people to easily configure it using Opsview's web interface. Opsview has the concept of a "service check" which defines the things you care about and how to check them. On this page, you can select SNMP polling, do an SNMP walk to gather all the available SNMP metrics and then you just click to select it. Nice!

You can see the configuration in our screencast.

Even if you don't use Opsview, you can take advantage of this new feature by downloading the latest Nagios Plugins. We continue to work to improve our open source base. Enjoy!