Prometheus exporter plugin for Discourse


(Sam Saffron) #1

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

Error 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: Discourse Stats dashboard for Grafana | Grafana Labs

Install Prometheus plugin + Prometheus on your server
Webhook for Discourse Uptime Monitoring?
Prometheus exporter problem with SecureRandom (multisite?)
Help us build the new Dashboard
Discourse disk space limits per user?
(Jay Pfaffman) #2

This looks very cool. Thanks.

Looks like if login_required is set you can’t pull without an API key.


Could you please add the “official” tag to the topic.
I find it really helpful while installing official plugins.

(Sam Saffron) #4

No repro here, getting stats just fine from our login required dev instance.

Sure, done.

(Jay Pfaffman) #5

Domain name resolved to an elastic IP, which made the request come from a non-local address.

Putting the host name in /etc/hosts solved the problem.