Home Directory

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

Directory

andyspiegl

Reviews(1)
byandyspiegl, October 30, 2017
check_eth
Thanks for the check script.
The only thing I fell for was that the nagios user needs write permissions for the tmpfile. Initially I tried the check script manually which created the tmpfile with owner "root". All following calls of the script failed to write the interface state to the tmpfile (silently!) which led to strange speed values and a very flat PNP curve. :-)

I suggest to add the following lines:
if ( open( TMP, ">$tmpfile-$iface" ) ) {
print( TMP "$data{time}:$data{rxbytes}:$data{txbytes}
" );
close( TMP );
}
+ else
+ {
+ print "ERROR: Unable to write $tmpfile-$iface
";
+ exit $status{UNKNOWN};
+ }

Andy