Prometheus module doesn't work with WildFly 18

I'm trying to configure Metricbeat to pull statistics from WildFly 18's MicroProfile Metrics subsystem. Internally, that subsystem is implemented using smallrye-metrics. When Metricbeat polls WildFly, the Prometheus module spits out an error that says:

Unable to decode response from prometheus endpoint

I have no idea why. There are no further details. Enabling debug logging in Metricbeat provides no additional information. I've used Wireshark to confirm that Metricbeat is getting the response it should, and the format of the response looks valid to me.

I tried to paste the response here and the forum complained my post had too many characters, so here's a link to PasteBin instead: https://pastebin.com/1WJXvW6Z

Could someone who works on Metricbeat help me diagnose what's happening here?

Hi @rcd,

I tried the pastebin and it imported for me. Would it be possible for you to provide some steps to reproduce this? A docker scenario would also work.

Best regards

  1. Download WildFly 18. Start it using the standard configuration by running bin/standalone.bat (or standalone.sh if you're on Linux) with no arguments.

  2. Create this Metricbeat module:

    - module: prometheus
    period: 10s
    hosts:
    - 'localhost:9990'
    metrics_path: /metrics

Put leading spaces where needed. The "preformatted text" option on this forum doesn't work very well.

  1. Execute 'metricbeat test modules'

Thanks @rcd,

Could you please open a bug report with this info? Sounds like something we should look into: https://github.com/elastic/beats/issues/new?template=bug-report.md

Best regards

I created the issue here: https://github.com/elastic/beats/issues/14513