Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
lizaoreo
bylizaoreo, July 24, 2015
Did what I needed it to with a slight modification for PNP4Nagios support. For whatever reason PNP4Nagios wouldn't graph the data for me straight up, so I modified line 156 to the below instead and it now graphs. The only issue is it doesn't seem to be setting the max right because PNP4Nagios has the top just a little above the actual (IE, instead of showing 300MB as the top, it shows 40MB with 37MB used). Not a big concern right now, probably something I've done wrong, but I'm quite happen with it now.
$temp = sprintf 'MEMORY: total: %.2f MB, used: %.2f MB (%.0f%%), free: %.2f MB | MemUsed=%2$d;%5$d;%6$d;0;%1$d', ( $memtotal / 1000000 ), ( $mem5minused / 1000000 ), $mempcused, ( $mem5minfree / 1000000 ), $warning, $critical;
$temp = sprintf 'MEMORY: total: %.2f MB, used: %.2f MB (%.0f%%), free: %.2f MB | MemUsed=%2$d;%5$d;%6$d;0;%1$d', ( $memtotal / 1000000 ), ( $mem5minused / 1000000 ), $mempcused, ( $mem5minfree / 1000000 ), $warning, $critical;