Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
derekcat
You need to specify where to put MIBs.. Eventually I found /usr/share/snmp/mibs but that should really be part of a /detailed/ instruction. :)
Also the code in your wiki is wrong.. The use lib line should be:
use lib "/usr/local/nagios/libexec";
You had lib exec and nagios switched.. (This prevents it from running correctly in Nagios)
It's also worth noting that the SNMP community is version 2c [Causes problems if you're running a newer firmware and trying to use the V1 community...]
and finally to get the voltage reading correct on my second PDU [now running the very latest firmware... Which changes the SNMP replies], I had to add a bit to your script:
#these two ifs, fix the output voltage if it's not reading correctly... -Derek
if ($inputv > 1000){
$inputv = ($inputv / 10);
}
if ($outputv > 1000){
$outputv = ($outputv / 10);
}
If something's wrong with those lines.. It's because I only know basic Python, not Perl :)
In the end, it's working beautifully, though it has probably taken ~8 hours to get to this point. lol..
Also the code in your wiki is wrong.. The use lib line should be:
use lib "/usr/local/nagios/libexec";
You had lib exec and nagios switched.. (This prevents it from running correctly in Nagios)
It's also worth noting that the SNMP community is version 2c [Causes problems if you're running a newer firmware and trying to use the V1 community...]
and finally to get the voltage reading correct on my second PDU [now running the very latest firmware... Which changes the SNMP replies], I had to add a bit to your script:
#these two ifs, fix the output voltage if it's not reading correctly... -Derek
if ($inputv > 1000){
$inputv = ($inputv / 10);
}
if ($outputv > 1000){
$outputv = ($outputv / 10);
}
If something's wrong with those lines.. It's because I only know basic Python, not Perl :)
In the end, it's working beautifully, though it has probably taken ~8 hours to get to this point. lol..
Owner's reply
The configuration and notes were written for FreeBSD, not Linux. Some path changes will be necessary to get it working on a Linux system.