[collectd] Plugin:GenericJMX -- Best Practices to monitor 2 JVMs on same host
Alexzander O. Shevchenko
thunder at blackdeath.ru
Wed Aug 7 23:35:24 CEST 2013
Wow, that's cool, did not found that in documentation. I will try it.
Thanks, Josh.
08.08.2013 1:26, Josh Behrends ?????:
> You can prefix the JMX instance in the connection block for each
> application using the "InstancePrefix" attribute. Here is an example
> from one of my hosts where I'm monitoring activemq and cassandra on
> the same host. All cassandra metrics will have a CAS- in front of
> them, and all activemq metrics will be prefixed with AMQ-
>
> #######################
> # Connection block(s) #
> #######################
> <Connection>
> Host "myhost"
> InstancePrefix "CAS-"
> ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi"
> Collect "memory_pool"
> Collect "memory-heap"
>
> Collect "memory_nonheap"
> Collect "java_threads"
> Collect "classes"
> Collect "garbage_collector"
> Collect "jvm_uptime"
> </Connection>
> <Connection>
> Host "myhost"
> InstancePrefix "AMQ-"
> ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"
> Collect "memory_pool"
>
> Collect "memory-heap"
> Collect "memory_nonheap"
> Collect "java_threads"
> Collect "classes"
> Collect "garbage_collector"
> Collect "jvm_uptime"
> </Connection>
> Hope this helps!
>
>
>
> On Wed, Aug 7, 2013 at 10:41 AM, Poil <poil at quake.fr
> <mailto:poil at quake.fr>> wrote:
>
> Hi,
>
> I collect Karaf and cassandra on a same host
> I use somethink like this
>
> <Plugin "GenericJMX">
> <MBean "cassandra/classes">
> ObjectName "java.lang:type=ClassLoading"
> InstancePrefix "cassandra_java"
> <Value>
> Type "gauge"
> InstancePrefix "loaded_classes"
> #InstanceFrom ""
> Table false
> Attribute "LoadedClassCount"
> </Value>
> </MBean>
>
> <MBean "karaf/classes">
> ObjectName "java.lang:type=ClassLoading"
> InstancePrefix "karaf_java"
> #InstanceFrom ""
> <Value>
> Type "gauge"
> InstancePrefix "loaded_classes"
> #InstanceFrom ""
> Table false
> Attribute "LoadedClassCount"
> </Value>
> </MBean>
>
> <Connection>
> Collect "karaf/classes"
> Collect "cassbandra/classes"
> </Connection>
>
> More info https://github.com/Poil/CGraphz/wiki/GenericJMX
>
> regards
>
> Le 07/08/2013 12:54, Alexzander thunder Shevchenko a écrit :
>
> Hi.
>
> I wonder how I can get same values for more than one JVMs?
> I have MBeans for heap/nonheap memory values and I want to
> collect this data from 2JVMs. But prefix for rrd's I can
> setonly in MBeans block, but not in Connection block. I can
> setup two or more Connection block, but I will get an error
> "update failed"-blah-blah-blah since it tries to write the
> same rrd's. I see the only way to set MBean blocks with
> different InstancePrefixes... I dont want to override Hostname
> property in Connection block. Is there is another way to do this?
>
> Thanks,
>
>
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org <mailto:collectd at verplant.org>
> http://mailman.verplant.org/listinfo/collectd
>
>
>
>
> --
> Josh
>
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
--
WBR, Alexzander "thunder" Shevchenko, Russia, Saint-Petersburg
emailto: alexzandershevchenko at gmail.com | thunder at blackdeath.ru
jabberto: thunder.spb at jabber.ru | skypeto: alexzander.o.shevchenko
blogspot: http://thunder-spb.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20130808/508f230a/attachment-0001.html>
More information about the collectd
mailing list