part of plugin output not displaying in status info

jeff dinisco dinisco at gmail.com
Sat Aug 7 16:40:46 CEST 2010


I'm writing a plugin that monitors storage array cache utilization by
processing the output of navicli (cli for EMC Clariion arrays).  The problem
is that the value for cache utilization is not displaying in the status
information field on the nagios web interface.  It seems like a whitespace
or hidden character issue, but perls chomp doesn't solve it.

Here's what the output looks like when the plugin is executed at the command
line...

# ./check_cache 90 95
Percent Dirty Pages 73

Here's what nagios is displaying in the status information field...
Percent Dirty Pages

So it's the variable ($dirtypages) derived from the output of navicli that
doesn't display.  Here's the plugin (I'm aware this script does nothing, I'm
just trying to solve this particular issue)...

#!/usr/bin/perl

$warn = $ARGV[0];
$crit = $ARGV[1];
$clariion="garfunkel";

open (NAVIOUT, "/opt/Navisphere/bin/naviseccli -h $clariion getcache |");
while (<NAVIOUT>) {
  chomp $_;
  if (/^Prct Dirty Cache Pages =/) {
    $dirtypages = (split / +/, $_)[5];
  }
}
chomp $dirtypages;
print "Percent Dirty Pages $dirtypages";

Any help would be greatly appreciated.

jd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100807/675c5588/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list