[Hawkular-dev] problem with jmx exporter reading an attribute we need for availability

Lucas Ponce lponce at redhat.com
Thu Dec 14 09:04:05 EST 2017


I will investigate more on this.

On Wed, Dec 13, 2017 at 10:49 PM, John Mazzitelli <mazz at redhat.com> wrote:

> a temporary workaround: in the whitelist of the jmx exporter file, change:
>
> "jboss.as:management-root=server",
>
> to:
>
> "jboss.as:*",
>
> Once i do that, I see the jmx exporter emitting the server avail metric.
> of course, that sucks because it now tells jmx exporter to get every
> jboss.as MBean and that causes performance issues.
>
> ----- Original Message -----
> > Ok, well, i hate to leave it like this but - this is so friggin' odd
> that I
> > can only say "it is not my fault" :)
> >
> > First - note someone changed jmx exporter code because they saw the same
> > thing as we are - that's what this comment is about:
> >
> > https://github.com/prometheus/jmx_exporter/blob/master/
> collector/src/main/java/io/prometheus/jmx/JmxScraper.java#L110
> >
> > See: https://github.com/prometheus/jmx_exporter/issues/89
> >
> > But the fix is not 100%.
> >
> > If you grab these three files - you can see it yourself:
> > https://github.com/jmazzitelli/test/tree/master/javaagent
> > (get Makefile and the two .java files and then run "make download-wildfly
> > unzip-wildfly compile run")
> >
> > You see i use the same API as the jmx exporter here:
> > https://github.com/jmazzitelli/test/blob/master/
> javaagent/TestJavaAgent.java#L67
> >
> > and that is what you will see:
> >
> > 16:31:05,290 INFO  [stdout] (Test Java Agent Thread)
> > =============================================================
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) FIND INFORMATION
> ABOUT
> > MBEAN: jboss.as:management-root=server
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread)
> > =============================================================
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) isRegistered:
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) true
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) getMBeanInfo:
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread)   description: The
> root
> > node of the server-level management model.
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread)   #attributes: 19
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) getAttribute:
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread)
> > serverState=reload-required
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) queryNames:
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) []
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) queryMBeans:
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) []
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) queryNames(null,
> null):
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread) FOUND IT:
> > jboss.as:management-root=server
> > 16:31:05,291 INFO  [stdout] (Test Java Agent Thread)
> > =============================================================
> >
> >
> > You will see SOME JMX APIs can see the MBean, queryMBeans and queryNames
> > canNOT (note the empty arrays []).
> >
> > But notice getMBeanInfo CAN see it - I can even get the attribute value
> from
> > that! (you can see it is in reload-required state)
> >
> > But again, queryMBeans returns nothing.
> >
> > Oddly, queryNames(null, null) DOES return it in the list (see the "FOUND
> IT"
> > line). It is only if I specifically ask for it does it fail in the query
> > API.
> >
> > The end result - JMX Exporter (at least sometimes) is not able to get
> "Server
> > Availability" because it can't get this MBean.
> >
> > For some odd reason it can get it sometimes - but it seems when it
> can't, it
> > will never get it.
> >
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hawkular-dev/attachments/20171214/a9885d19/attachment.html 


More information about the hawkular-dev mailing list