Database Reference
In-Depth Information
use generic-service
hostgroup_name cassandra_grp
service_description check disk
check_command check_nrpe!check_sda1
}
# check CPU status
define service{
use generic-service
hostgroup_name cassandra_grp
service_description check CPU
check_command check_nrpe!check_load
}
# A command is a template of a command line call,
here:
# $USER1$ is plugin directory, nagios/libexec
# $HOSTADRRESS$ resolves to the address defined in
# the preceding host block; hosts are chosen from
the service that calls this command
# define custom commands
# check JVM heap usage using JMX,
# warn if > 3.7G, mark critical if > 3.85G
define command {
command_name check_cas
command_line $USER1$/check_jmx -U
service:jmx:rmi:///jndi/rmi://$HOSTADDRESS$:7199/
jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K
used -I HeapMemoryUsage -J used -vvvv -w 3700000000
-c 3850000000
}
Letting Nagios know about the new configuration : We have created a new con-
figuration file that Nagios does not know about. We need to register it in /usr/
local/nagios/etc/nagios.cfg . Now, append the following lines to the
file:
Search WWH ::




Custom Search