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
------------------------------------------------------------------------------
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 
_______________________________________________
Nagios-users mailing list
[email protected]
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

Reply via email to