Official Prometheus Exporter for Discourse
The Discourse Prometheus plugin collects key metrics from Discourse and exposes them in the
/metrics path so prometheus can consume them.
These metrics can be used to Graph all sorts of data like:
Median and 99th percentile times for topic / categories / top and latest pages. Breaking down execution time between SQL/Redis and App.
Page view tracking
Ruby object space tracking including allocation rate, heaps and so on.
Hosted V8 memory statistics
Scheduled Job Queue and Sidekiq job durations and executions.
To see a full list of metrics available, install the plugin and visit
SITENAME/metrics as an admin.
Out of the box we allow the
metrics route to admins and private ips.
Discourse Prometheus is smart enough to aggregate data for all forked unicorn processes and present it as cohesive metrics on a single endpoint. We use it internally to keep track of our sites.
Sample dashboard at: https://grafana.com/dashboards/3539
Discourse global setting called
env: DISCOURSE_PROMETHEUS_TRUSTED_IP_ALLOWLIST_REGEX) is allowing to set Prometheus’s trusted IP addresses. The setting accepts regular expression to set advanced IP ranges. This is useful in a case when Prometheus IP address is dynamic.