I'm trying to configure monitoring of infinispan with prometheus. By default infinispan doesn't expose metrics. Tried to configure it like this in standalone.xml and domain.xml (for domain mode) infinispan's configuration:
<subsystem xmlns="urn:infinispan:server:core:9.3" default-cache-container="local">
<cache-container name="local" default-cache="default" statistics="true">
<metrics gauges="true" histograms="true" />
<global-state/>
<local-cache name="default"/>
<local-cache name="namedCache"/>
</cache-container>
<metrics enabled="true">
<metrics-infinispan default-enabled="true">
<jmx enabled="true" domain="infinispan" expose-jmx="true"/>
<prometheus enabled="true" prefix="infinispan"/>
</metrics-infinispan>
</metrics>
</subsystem>
But when I verify locally that statistics are exported to the metrics endpoint getting "Connection refused":
curl -v http://localhost:11222/metrics
Where am I doing wrong?