[Nagiosplug-help] check_jmx plugin

Greg Bessette greg.bessette at gmail.com
Tue Sep 30 20:27:16 CEST 2008


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




More information about the Help mailing list