Hi Everyone,
(Though I am guess this is likely to be a @bdw429s question - as it relates to Undertow)
I asked work to pay for a subscription to Fusion Reactor about 2 years ago.
They subsequently told me that we already pay a hefty sum to Grafana and that I should be using that.
So I have finally gotten some time and now chatting with some engineers at Grafana about their plugins/exporters and what I need to do to get it working.
They provided me with a project they found on Github that works out of the box for Lucee/Tomcat, which is great.
Because we use CommandBox and thus Undertow, his follow-up question was, and thus my question to you, please, is:
“Can you find out how to get Lucee/Undertow to similarly expose its JVM metrics via JMX, and in Prometheus format.”
Thanks!
I thought there was a way to push FR’s open telemetry data directly to Grafana, but my ChatGPT and Google-fu is coming up empty-handed. All I can find is info on sending data from Grafana TO FR Cloud. I reached out to the FR peeps to ask about this as I think it would be the best solution, if it works.
If that doesn’t pan out, I assume just using Open Telemetry would be the answer
It’s just a JVM arg you add with a java agent which pushes data out to Grafana.
It wouldn’t have all the deep CF insight that FR has, but it should work on any servlet container and see the basic servlet data.
HI @bdw429s
Thanks for the reply.
We do realise that FR is the better product.
The issue is that work does NOT want to pay for a FR license.
They want us to use Grafana, only.
Or at least, want me to prove that Grafana isn’t up to the task - before paying for FR.
Grafana has a JMX plugin/agent - that they (Grafana) have suggested might be appropriate for monitoring JVM data and they found an example on Github - of their plugin working with Lucee/Tomcat.
Technically - my question is an Undertow one…
(I did some research/googling/AI-ing about Undertow and JMX - and found that setting up JMX exporters and Undertow are problematic.
It depends on the version of Undertow
It depends on whether you are running standalone or domain mode.
I have no idea what “standalone/domain mode” means in an Undertow context.
And while I can read and write Java - it is always in the context of utilising Java with CFML.
I don’t have the Java specific knowledge to be able to say that "JMX is a red-herring of sorts : just use Opentelemetry - which you seem to suggest in your previous reply)
And since “I’m” only interested in the CFML side of things…
and because we’re using the CommandBox Docker image…
and because you (specifically) know about Undertow AND Lucee and Commandbox …
I thought here would be a good place to ask if you had some specific knowledge/advice about monitoring Undertow via JMX - as that is the tool Grafana is suggesting we use.
Lastly,
Let me say, none of this is impossible for me to learn.
I can spend more time going through forums posts / tutorials / etc.
I can do my own experimentation and hopefully come up with a working solution.
It just seems more sensible to ask first : “Hey do you know about this? Can you help?”
Before I head down a road of discovery - where I am not even sure if I am going in the right direction - or even on the correct road in the first place.
As always - Thanks.
I don’t think there’s any value in the JMX route. Yes, Undertow has very super specific JMX beans you can report on, but I don’t think they provide anything useful that you wouldn’t get out of the drop-in open telemetry agent which simply will connect to any servlet container. I think that has 90% of what you care about.
I have no idea what “standalone/domain mode” means in an Undertow context.
Those are Wildfly specific terms, which don’t apply here. A lot of info on Google or AI platforms will be Wildfly specific even if you just ask about Undertow.
We do realise that FR is the better product. The issue is that work does NOT want to pay for a FR license. They want us to use Grafana, only.
I think you’ve missed the point. This isn’t about FR being “better” or “worse”. It’s about the possibility that FR may be able to crank out more detailed CF-specific data than a generic open telemetry agent, which is simply latching on to the generic servlet lifecycle. FR is built specifically for CF servers and pulls info directly from Lucee/Adobe as well as frameworks like ColdBox, which you wouldn’t get with any off-the-shelf Java/servlet tool. I don’t know if that’s actually possible-- but I’m checking with them. And if FR does indeed have such an ability, it would be worth it IMO to pay for FR than to try and write something like that from scratch.
Ok, it took a few back-and-forths with FR’s support but I have an answer.
- You can slap any generic Java OTEL agent onto your server and it should grab data just fine. In fact, I assume this is what you were using with your Tomcat install. It should work on CommandBox/Undertow all the same
- FusionReactor DOES collect deeper, richer metrics from CF than you’ll get with an off-the-shelf Java agent.
- Unfortunately, there’s not currently a way to use FR as the agent shipping all it’s data out to Grafana. FR Cloud has it’s own capabilities to collect data from FR and other OTEL agents and crunch all of that data for you
- FR is currently working on an enhancement to allow data to be sent from FR (as the agent) to Grafana (which is what you want) They tell me it’s expected in Q3