[Nagiosplug-help] check_jmx plugin
Andy Shellam
andy-lists at networkmail.eu
Tue Sep 30 21:04:53 CEST 2008
Hi Greg,
Your definitions are slightly out - you don't need to pass the -U, -A,
-K etc arguments into the check_command in the service definition as
you've already got these in the command's command_line definition - just
pass the values for the $ARGx$ arguments, separated by !.
Your command definition is correct, however your service's check_command
line needs to be re-written as:
check_command
check_jmx!service:jmx:rmi:///jndi/rmi://xxx.xxx.xxx.xxx:1616/jmxrmi!java.lang:type=Memory!HeapMemoryUsage!used!975500000!990000000
You see - all the values in the check_command line (separated by !) get
substituted into the command's command_line argument, so with this
example you wind up with Nagios executing:
/usr/local/nagios/libexec/check_jmx -U
service:jmx:rmi:///jndi/rmi://xxx.xxx.xxx.xxx:1616/jmxrmi -O
java.lang:type=Memory -A HeapMemoryUsage -K used -w 975500000 -c 990000000
(assuming $USER1$ resolves to /usr/local/nagios/libexec.)
Hope this helps,
Andy
Greg Bessette wrote:
> I am trying to use the check_jmx plugin to monitor Java memory usage.
> I built the check command config as:
>
> define command{
> command_name check_jmx
> command_line $USER1$/check_jmx -U $ARG1$ -O $ARG2$ -A $ARG3$ -K
> $ARG4$ -w $ARG5$ -c $ARG6$
> }
>
> The service definition reads like this:
>
> define service{
> use local-service ;
> Name of service template to use
> host_name server1
> service_description JMX
> check_command check_jmx! -U
> service:jmx:rmi:///jndi/rmi://xxx.xxx.xxx.xxx:1616/jmxrmi -O
> java.lang:type=Memory -A HeapMemoryUsage -K used -w 975500000 -c
> 990000000
> }
>
> If I run the above command with out the ! on the command line, I
> receive the correct values.
>
> Here is the image from the Nagios service page showing the error
>
> Current Status:
> UNKNOWN
> (for 0d 1h 42m 27s) (Has been acknowledged)
> Status Information:JMX UNKNOWN 18 Usage: check_jmx -help
> Performance Data:
> Current Attempt:4/4 (HARD state)
> Last Check Time:09-30-2008 14:20:41
> Check Type:ACTIVE
> Check Latency / Duration:0.129 / 0.099 seconds
> Next Scheduled Check: 09-30-2008 14:25:41
> Last State Change:09-30-2008 12:43:01
> Last Notification:N/A (notification 1)
> Is This Service Flapping?
> NO
> (0.00% state change)
> In Scheduled Downtime?
> NO
> Last Update:09-30-2008 14:25:23 ( 0d 0h 0m 5s ago)
> Active Checks:
> ENABLED
>
>
> Any help would be appreciated.
>
> Greg
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
More information about the Help
mailing list