This section provides example configuration for checking JVM memory utilization.
Edit your commands.cfg and add the following
define command { command_name check_jboss_memory command_line $USER1$/nagios-plugin-jbossas7/check_jbossas7.py -H $HOSTADDRESS$ -A $ARG1$ -P $ARG2$ -u $ARG3$ -p $ARG4$ -W $ARG5$ -C $ARG6$ -m $ARG7$ }
(add -D to the command if you want to add perfdata to the output) Then you can reference it like the following.
The option heap_usage allows you to monitor the Heap Utilization of the JVM. Default thresholds are WARNING - 80 inclusive and CRITICAL - 90 inclusive.
In the example below 80 is the WARNING threshold (inclusive) while 90 is the CRITICAL threshold. These thresholds are compared to the perecentage of used heap against max available heap.
define service { use generic-service hostgroup_name JBossAS Servers service_description JBossAS Server Heap Memory Usage Check check_command check_jboss_memory!heap_usage!9990!admin!password123!80!90 }
Sample output: OK - Heap Memory Utilization 154MB of 455MB |heap_usage=33.85%;80;90
The option non_heap_usage allows you to monitor the overall Non Heap Utilization of the JVM. Default thresholds are WARNING - 80 inclusive and CRITICAL - 90 inclusive. In the example below 80 is the WARNING threshold while 90 is the CRITICAL threshold. These thresholds are compared to the perecentage of used non heap space against max available non heap space.
define service { use generic-service hostgroup_name JBossAS Servers service_description JBossAS Server Non-Heap Memory Usage Check check_command check_jboss_memory!non_heap_usage!9990!admin!password123!80!90 }
Sample output: OK - Non Heap Memory Utilization 80MB of 352MB |non_heap_usage=22.73%;80;90
The option eden_space_usage allows you to monitor the Eden space memory utilization of the JVM. Default thresholds are WARNING - 80 inclusive and CRITICAL - 90 inclusive. In the example below 80 is the WARNING threshold while 95 is the CRITICAL threshold. These thresholds are compared to the perecentage of used eden space against max available eden space.
define service { use generic-service hostgroup_name JBossAS Servers service_description JBossAS Server Eden Space Usage Check check_command check_jboss_memory!eden_space_usage!9990!admin!password123!80!95!memory_pool }
Examples of memory_pool types: PS_Eden_Space, G1_Eden_Space
Sample output: OK - Eden_Space Utilization 43MB of 56MB |eden_space_usage=76.79%;80;95
The option old_gen_usage allows you to monitor the old gen memory utilization of the JVM. Default thresholds are WARNING - 80 inclusive and CRITICAL - 90 inclusive. In the example below 80 is the WARNING threshold while 95 is the CRITICAL threshold. These thresholds are compared to the perecentage of used old gen space against max available.
define service { use generic-service hostgroup_name JBossAS Servers service_description JBossAS Server Old Gen Usage Check check_command check_jboss_memory!old_gen_usage!9990!admin!password123!80!95!memory_pool }
Examples of memory_pool types: PS_Old_Gen, G1_Old_Gen
Sample output: OK - Old_Gen Utilization 134MB of 341MB |old_gen_usage=39.30%;80;95
The option perm_gen_usage allows you to monitor the perm gen memory utilization of the JVM. Default thresholds are WARNING - 90 inclusive and CRITICAL - 95 inclusive.
define service { use generic-service hostgroup_name JBossAS Servers service_description JBossAS Server Perm Gen Usage Check check_command check_jboss_memory!perm_gen_usage!9990!admin!password123!90!95!memory_pool }
Examples of memory_pool types: PS_Perm_Gen, G1_Perm_Gen
Sample output: OK - Perm_Gen Utilization 66MB of 256MB |perm_gen_usage=25.78%;90;95
The option code_cache_usage allows you to monitor the code cache utilization of the JVM. Default thresholds are WARNING - 90 inclusive and CRITICAL - 95 inclusive.
define service { use generic-service hostgroup_name JBossAS Servers service_description JBossAS Server Code Cache Usage Check check_command check_jboss_memory!code_cache_usage!9990!admin!password123!90!95 }
Sample output: OK - Code_Cache Utilization 14MB of 96MB |code_cache_usage=14.58%;90;95