seppovic / check_mk-plugins

checks/plugins for the check_mk monitoring system
GNU General Public License v2.0
16 stars 13 forks source link

check_jolokia auto discover ? #1

Closed EmFl closed 9 years ago

EmFl commented 9 years ago

Hello, Thanks for publishing this it seems like it should do exactly what I need. I wanted to use your plugin to monitor JMS queue state, I installed the package on the check_mk server. Then pushed the agent file (mk_jolokia) on the remote host. However, when I execute mk_jolokia manually I see the output with my new checks, but this is not picked up on the check_mk server as new discovered service. Am I doing something wrong ? Also, I don't know how to rename the output, right now I get this :

JVM Name#,com.bea:JMSServerRuntime=#JMS Server#,Name=#JMS Module#!#queue name#,ServerRuntime=#JVM server name#,Type=JMSDestinationRuntime generic.string.State advertised_in_cluster_jndi

But I'd like something like #queue name# and the state : advertised_in_cluster_jndi Thanks for your guidance on this

seppovic commented 9 years ago

Hey EmFl, First of all, depending on the check_mk version you are using it might be necesary to update to the latest (2.2.2) version as version 2.2.1 and earlier are not working with check_mk 1.2.7 (just updated the github repo)

configuring the mk_jolokia with the cfg file could be tricky, as i am not an AppServer Guy i think i can't help you much here. Here is an example config for a Weblogic Server: instances = [ { "instance" : "my_server1", "port" : 6011, "vars" :[ ( "com.bea:ApplicationRuntime=AppName,Name=default,ServerRuntime=my_server1,Type=WorkManagerRuntime/HealthState/critical", "string.AppStatus", ["ServerRuntime", "ApplicationRuntime"] ), ] } ]

should result in this output: my_server1,my_server1 generic.string.AppStatus.AppName False instanc,ServerRuntime generic.string.AppStatus.ApplicationRuntime Value

check_mk should pick it up with this Servicedescription: JVM my_server1 my_server1 AppStatus

Your config for this output could look like this, but thats just a guess: instances = [ { "instance" : "#JVM Name#", "port" : 6011, "vars" : [
( "com.bea:JMSServerRuntime=#JMS Server#,Name=#JMS Module#!#queue name#,ServerRuntime=#JVM server name#,Type=JMSDestinationRuntimel", "string.State", ["JMSServerRuntime", "Name"] ), ] } ]