Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
@willix
Favorites33
Views55714
Projects24
I don't want to discourage you (and starting like this is a good way to get some practice writing nagios plugins) but why are you writing this? Your script is not really a perl plugin because it relies on retrieving SNMP with external command. As such its just a wrapper and we already have check_snmp included with nagios plugin, written purely in C, and that can retrieve data from multiple SNMP OIDs and compare values. There is also at least one other alternative check_snmp (which is faster but does not work with SNMP v3), just look around exchange. And if you want temperature I recommend you just download check_snmp_temperature.pl. Take a look at how its code too to learn how to write nagios plugins in Perl that retrieve data by SNMP. Then consider what is needed for your setup and write a new perl plugin (if it does not already exist) that you'd be proud of.
Reviewed 14 years ago