OK
So it is not perfdata, however output, ergo
/output:*.HeapMemoryUsage.used=\d+\{committed=(\d+);init=(\d+);max=(\d+);used=(\d+).*/
and push @s, [ "heap",
[ "committed", GAUGE, $1 ],
[ "init", GAUGE, $2 ],
[ "max", GAUGE , $3 ],
[ "used", GAUGE, $4 ] ];
};
Which reflects in the modified testentry.pl below
Changes:
not perfdata however output
not a ( however an {
I would stash this under map_local to preserve these changes when upgrading.
hth
paul
----- cut here -------
#!/usr/bin/perl
# File: $Id: testentry.pl,v 1.4 2005/10/08 05:55:08 sauber Exp $
# Author: (c) Soren Dossing, 2005
# License: OSI Artistic License
# http://www.opensource.org/licenses/artistic-license.php
use strict;
no strict "subs";
use Data::Dumper;
my @s;
$_ = <<DATA;
servicedescr:ping
output: JMX OK
HeapMemoryUsage.used=342774496{committed=472842240;init=0;max=2067988480;used=342774496}
DATA
eval {
/output:.*HeapMemoryUsage.used=\d+\{committed=(\d+);init=(\d+);max=(\d+);used=(\d+).*/
and push @s, [ "heap",
[ "committed", GAUGE, $1 ],
[ "init", GAUGE, $2 ],
[ "max", GAUGE , $3 ],
[ "used", GAUGE, $4 ] ];
};
print Data::Dumper->Dump([\@s], [qw(*s)]);
---- end cut -----
> Q3: the exact output when running check_jmx from the commandline is:
>
> [nagios@monitorbox libexec]$ ./check_jmx -a '-U
> service:jmx:rmi:///jndi/rmi://mybox.local:9005/jmxrmi -O
> java.lang:type=Memory
> -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 827221606 -c
> 930624307'
> JMX OK
> HeapMemoryUsage.used=342774496{committed=472842240;init=0;max=2067988480;used=34
> 2774496}
>
> Much appreciated!
> Thanks,
> Wilco
>
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users