How to enable prometheus module on FreePBX 16

Hi all.

Asterisk 18 finally include built in prometheus module!

So, if you upgrade your FreePBX to asterisk 18 by asterisk-version-switch command you can enable it by following this steps.

Example basic config:

[general]
enabled=yes
core_metrics_enabled=yes
uri=metrics
  1. Add a config file at /etc/asterisk/prometheus.conf with the above config
  2. Set asterisk owner and permissions: fwconsole chown
  3. Restart asterisk by fwconsole restart or just load it manually with asterisk cli: module load res_prometheus.so
  4. Make sure the module is actually working by running: curl localhost:8088/metrics
  5. Enjoy the power of Prometheus!
4 Likes

With prometheus.conf populated as above, there should be no changes required to modules.conf for the module to load at start. Do you have autoload=yes?

1 Like

I will have to check again, I think it didn’t load after restart.
autoload=yes indeed.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.