I have installed jmx4perl in my Icinga server and deployed jolokia agent on local tomcat server. Below is my configuration.
Code
- services.conf
- ---------------------------------------------------------
- apply Service "check_methodserver_heapmemory" {
- import "generic-service"
- check_command = "check_jmx4perl"
- vars.url = "http://localhost:8080/jolokia"
- vars.mbean = "java.lang:type=Memory"
- vars.attribute = "HeapMemoryUsage"
- vars.path = "used"
- vars.base = "java.lang:type=Memory/HeapMemoryUsage/max"
- vars.warning = "80"
- vars.critical = "90"
- assign where host.name == NodeName
- }
- commands.conf
- -----------------------------------------------
- object CheckCommand "check_jmx4perl" {
- import "plugin-check-command"
- command = [PluginDir + "/check_jmx4perl"] arguments = {
- "-u" = "$url$"
- "-m" = "$mbean$"
- "-a" = "$attribute$"
- "-p" = "$path$"
- "-b" = "$base$"
- "-w" = "$warning$"
- "-c" = "$critical$"
- }
- }
In this scenario I am collecting metrics with respect to HeapMemoryUsage. What will be approach if I want to collect more metric values like ProcessCpuLoad for the same tomcat server?