Home Directory Plugins * Plugin Development Tools check_snmp_attributes.pl - experimental plugin base & library

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_snmp_attributes.pl - experimental plugin base & library

Current Version
0.32
Last Release Date
2011-12-20
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
Owner
License
GPL
Hits
81400
Files:
FileDescription
check_snmp_attributes.plcheck_snmp_attributes.pl - version 0.32 (Dec 2011), copy this to your plugins directory
check_netsnmp_memory.plcheck_netsnmp_memory.pl - version 0.15 (Dec 2011), a working example of plugin using check_snmp_attributes base
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This is an experimental library I was working on in 2008 to make it easier to write plugins similar to ones I've written without really writing any plugin code and just defining how data is retrieved. It started from the code from I believe check_snmp_temperature plugin and then extended to basically build a virtual machine inside perl to interpret syntax for defining data values.

The syntax for defining data is an expression in a reverse polish notation as with HP calculators with a stack used for data processing. If you scroll down to the end of this file (which is what I recommend instead of reading top-bottom) you will see definitions of these operators which are based on name and regex; note that numeric data is also one of the operators. Operators can be overloaded, with right one chosen depending on what is on stack (so one '+' is used to add two numeric values and another '+' operator to conctatenate strings).

Its all very cool and all but I decided it got too complex for its own good and its easier to just write plugins in perl as I did before. However I did write SNMP Memory plugin using this library and had installed it in places with many thousands of servers so library appears to be stable and working fine although I'm sure it has plenty of bugs if you start extending it further so it should be considered EXPERIMENTAL.

I've no immediate plans to develop this further right now but I decided its worth being released to the public. Perhaps others will find it an interesting project and want to either write their own plugins with this or develop this further.