prometheus / jmx_exporter

A process for exposing JMX Beans via HTTP for Prometheus consumption
Apache License 2.0
2.97k stars 1.19k forks source link

unable to scrape activemq metrics from WIldfly17.0.1 domain. #707

Open obulirajm opened 2 years ago

obulirajm commented 2 years ago

We have configured jmx_exporter on our wildfly domain using the default [wildfly-10.yaml] (https://github.com/prometheus/jmx_exporter/blob/master/example_configs/wildfly-10.yaml)

Though it seem to contain parameters to pull activeMQ metrics, we dont see any activeMQ data being scraped. Is there any change required to this config to support this.

ndimitry commented 1 year ago

Check if these metrics are enabled. And yes, this config is more for the standalone and later versions...

wf_host=<WF-host>
db_source_name=<db source name>
JBOSS_CLI="$WF/bin/jboss-cli.sh --controller=remote+https://$wf_host:10048 --connect"

echo "# Enable monitoring"
$JBOSS_CLI -c << EOF
/subsystem=transactions:write-attribute(name=statistics-enabled,value=true)
/subsystem=undertow:write-attribute(name=statistics-enabled,value=true)
/subsystem=webservices:write-attribute(name=statistics-enabled,value=true)
/subsystem=messaging-activemq/server=default:write-attribute(name=statistics-enabled,value=true)
/subsystem=datasources/xa-data-source=$db_source_name/statistics=pool:write-attribute(name=statistics-enabled,value=true)
/subsystem=datasources/xa-data-source=$db_source_name/statistics=jdbc:write-attribute(name=statistics-enabled,value=true)
exit
EOF

But anyway, even without these settings typically it is typically possible to collect 0 values, so maybe there is a need for an update...

dhoard commented 11 months ago

@obulirajm any updates?