Hi,
I have JBOSS 7.0.0 set up in domain mode.
I managed to expose the remote port 4447 + port offset for every jvm I have and I can connect remotely with jconsole using this string "service:jmx:remote://
192.168.56.101:4447"(+ the needed credentials of an ApplicationRealm user)
I use jconsole just to test the connection. I did the same thing on a standalone jboss environment and it worked, I would add the same string in the config.yml file of the jmx exporter and it would expose the metrics, however, it doesn't work in the domain mode.
my config.yml file looks like this:
---
startDelaySeconds: 0
username: test
password: test
ssl: false
lowercaseOutputName: false
lowercaseOutputLabelNames: false
whitelistObjectNames: ["*:*"]
rules:
- pattern: ".*"
####################END OF CONFIG####################
as you can see I tried different connection strings, none of them worked.
The error message I get is:
java -jar jmx_prometheus_httpserver-0.11.jar 5556 config.yml
Feb 27, 2018 10:28:59 AM io.prometheus.jmx.JmxCollector collect
SEVERE: JMX scrape failed: java.net.MalformedURLException: Unsupported protocol: remote
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:359)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:269)
at io.prometheus.jmx.JmxScraper.doScrape(JmxScraper.java:106)
at io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:415)
at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:180)
at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.<init>(CollectorRegistry.java:144)
at io.prometheus.client.CollectorRegistry.filteredMetricFamilySamples(CollectorRegistry.java:131)
at io.prometheus.client.exporter.HTTPServer$HTTPMetricHandler.handle(HTTPServer.java:44)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
###########END OF ERROR MESSAGE#############
Any advice would be greatly appreciated!
Kind regards