<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Wow, that's cool, did not found that in
documentation. I will try it.<br>
Thanks, Josh.<br>
<br>
08.08.2013 1:26, Josh Behrends пишет:<br>
</div>
<blockquote
cite="mid:CAGw8gzm8N=u=hmR7KgB6d+GLFLAfLL-_qwJNrDoXRjW=AUeTcw@mail.gmail.com"
type="cite">
<div dir="ltr">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-
<div>
<br>
</div>
<div>
<pre class="" style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:16px;width:777px;margin-top:0px;margin-bottom:0px;padding:0px;color:rgb(0,0,0)"><div class="" id="file-jmxstats-conf-LC261">
#######################</div><div class="" id="file-jmxstats-conf-LC262"> # Connection block(s) #</div><div class="" id="file-jmxstats-conf-LC263"> #######################</div><div class="" id="file-jmxstats-conf-LC264">
<Connection></div><div class="" id="file-jmxstats-conf-LC265"> Host "myhost"</div><div class="" id="file-jmxstats-conf-LC266"> InstancePrefix "CAS-"</div><div class="" id="file-jmxstats-conf-LC267">
ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi"</div><div class="" id="file-jmxstats-conf-LC268"> Collect "memory_pool"</div><div class="" id="file-jmxstats-conf-LC269"> Collect "memory-heap"</div>
<div class="" id="file-jmxstats-conf-LC270"> Collect "memory_nonheap"</div><div class="" id="file-jmxstats-conf-LC271"> Collect "java_threads"</div><div class="" id="file-jmxstats-conf-LC272">
Collect "classes"</div><div class="" id="file-jmxstats-conf-LC273"> Collect "garbage_collector"</div><div class="" id="file-jmxstats-conf-LC274"> Collect "jvm_uptime"</div><div class="" id="file-jmxstats-conf-LC280">
</Connection></div><div class="" id="file-jmxstats-conf-LC281"> <Connection></div><div class="" id="file-jmxstats-conf-LC282"> Host "myhost"</div><div class="" id="file-jmxstats-conf-LC283">
InstancePrefix "AMQ-"</div><div class="" id="file-jmxstats-conf-LC284"> ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"</div><div class="" id="file-jmxstats-conf-LC285"> Collect "memory_pool"</div>
<div class="" id="file-jmxstats-conf-LC286"> Collect "memory-heap"</div><div class="" id="file-jmxstats-conf-LC287"> Collect "memory_nonheap"</div><div class="" id="file-jmxstats-conf-LC288">
Collect "java_threads"</div><div class="" id="file-jmxstats-conf-LC289"> Collect "classes"</div><div class="" id="file-jmxstats-conf-LC290"> Collect "garbage_collector"</div><div class="" id="file-jmxstats-conf-LC291">
Collect "jvm_uptime"</div><div class="" id="file-jmxstats-conf-LC292"> </Connection></div><div class="" id="file-jmxstats-conf-LC292">
</div><div class="" id="file-jmxstats-conf-LC292">Hope this helps!</div>
<div class="" id="file-jmxstats-conf-LC292">
</div></pre>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Wed, Aug 7, 2013 at 10:41 AM, Poil <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:poil@quake.fr" target="_blank">poil@quake.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I collect Karaf and cassandra on a same host<br>
I use somethink like this<br>
<br>
<Plugin "GenericJMX"><br>
<MBean "cassandra/classes"><br>
ObjectName "java.lang:type=ClassLoading"<br>
InstancePrefix "cassandra_java"<br>
<Value><br>
Type "gauge"<br>
InstancePrefix "loaded_classes"<br>
#InstanceFrom ""<br>
Table false<br>
Attribute "LoadedClassCount"<br>
</Value><br>
</MBean><br>
<br>
<MBean "karaf/classes"><br>
ObjectName "java.lang:type=ClassLoading"<br>
InstancePrefix "karaf_java"<br>
#InstanceFrom ""<br>
<Value><br>
Type "gauge"<br>
InstancePrefix "loaded_classes"<br>
#InstanceFrom ""<br>
Table false<br>
Attribute "LoadedClassCount"<br>
</Value><br>
</MBean><br>
<br>
<Connection><br>
Collect "karaf/classes"<br>
Collect "cassbandra/classes"<br>
</Connection><br>
<br>
More info <a moz-do-not-send="true"
href="https://github.com/Poil/CGraphz/wiki/GenericJMX"
target="_blank">https://github.com/Poil/CGraphz/wiki/GenericJMX</a><br>
<br>
regards<br>
<br>
Le 07/08/2013 12:54, Alexzander thunder Shevchenko a écrit :
<div class="im HOEnZb"><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi.<br>
<br>
I wonder how I can get same values for more than one
JVMs?<br>
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?<br>
<br>
Thanks,<br>
<br>
</blockquote>
<br>
<br>
</div>
<div class="HOEnZb">
<div class="h5">
_______________________________________________<br>
collectd mailing list<br>
<a moz-do-not-send="true"
href="mailto:collectd@verplant.org" target="_blank">collectd@verplant.org</a><br>
<a moz-do-not-send="true"
href="http://mailman.verplant.org/listinfo/collectd"
target="_blank">http://mailman.verplant.org/listinfo/collectd</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Josh
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
collectd mailing list
<a class="moz-txt-link-abbreviated" href="mailto:collectd@verplant.org">collectd@verplant.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.verplant.org/listinfo/collectd">http://mailman.verplant.org/listinfo/collectd</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
WBR, Alexzander "thunder" Shevchenko, Russia, Saint-Petersburg
emailto: <a class="moz-txt-link-abbreviated" href="mailto:alexzandershevchenko@gmail.com">alexzandershevchenko@gmail.com</a> | <a class="moz-txt-link-abbreviated" href="mailto:thunder@blackdeath.ru">thunder@blackdeath.ru</a>
jabberto: <a class="moz-txt-link-abbreviated" href="mailto:thunder.spb@jabber.ru">thunder.spb@jabber.ru</a> | skypeto: alexzander.o.shevchenko
blogspot: <a class="moz-txt-link-freetext" href="http://thunder-spb.blogspot.com">http://thunder-spb.blogspot.com</a></pre>
</body>
</html>