Accessing prometheus metrics for opnsense plugin

I am running OPNsense 25.7.6-amd64 on FreeBSD 14.3-RELEASE-p4 with OpenSSL 3.0.18 and have installed the os-crowdsec 1.0.12 plug in. I have registered the security engine and enabled acquisition of caddy logs and selected loki logs. Notifications for telegram have been configured and tested.

I have amended /usr/local/etc/crowdsec/config.yaml as follows and restarted the crowdsec service:

prometheus:
  enabled: true
  level: full
  listen_addr: 0.0.0.0
  listen_port: 6060

When I access my opnsense router at either http://192.168.1.1:6060/metrics or https://192.168.1.1:6060/metrics I receive a timeout error.

What should the address be to expose crowdsec metrics for prometheus with the os-crowdsec plugin?

We discovered the solution to this on Discord.

The steps are:

  1. Amend the crowdsec config.yaml to listen on 0.0.0.0
  2. Restart the crowdsec service via the opnsense gui
  3. Attempt to access http://{opnsense router}:6060/metrics

That’s all it needed.