Discourse Prometheus

:discourse2: 摘要 Discourse Prometheus 是 Discourse 的官方 Prometheus 导出器
:hammer_and_wrench: 仓库链接 https://github.com/discourse/discourse-prometheus
:open_book: 安装指南 如何在 Discourse 中安装插件

Discourse Prometheus 插件从 Discourse 收集关键指标,并在 /metrics 路径下暴露这些指标,以便 Prometheus 可以消费它们。

这些指标可用于绘制各种数据的图表,例如:

主题/分类/置顶和最新页面的中位数和 99 百分位耗时。分解 SQL/Redis 和应用程序之间的执行时间。

页面浏览量跟踪

错误跟踪

Ruby 对象空间跟踪,包括分配率、堆等。

托管 V8 内存统计信息

计划任务队列和 Sidekiq 任务的持续时间和执行情况。

要查看可用指标的完整列表,请安装插件并以管理员身份访问 SITENAME/metrics

开箱即用,我们允许管理员和私有 IP 访问 metrics 路由。


Discourse Prometheus 足够智能,能够聚合所有分叉的 unicorn 进程的数据,并在单个端点上将其呈现为一致的指标。我们在内部使用它来跟踪我们的站点。

示例仪表板位于:


Discourse 全局设置 prometheus_trusted_ip_allowlist_regex(环境变量:DISCOURSE_PROMETHEUS_TRUSTED_IP_ALLOWLIST_REGEX)允许设置 Prometheus 的受信任 IP 地址。该设置接受正则表达式以设置高级 IP 范围。在 Prometheus IP 地址是动态的情况下,这非常有用。

51 个赞
Install Prometheus plugin + Prometheus on your server
Add more metrics to Discourse Prometheus
Prometheus exporter problem with SecureRandom (multisite?)
Webhook for Discourse Uptime Monitoring?
Best configurations for speeding up standalone discourse
Huge increase in Redis use after changing hosts
Prometheus scrape job cannot reach the metrics
Prometheus pluging Cross-Origin Request
How to avoid upstream timeouts?
Staging instance on same Production instance Docker Server?
A lot of CPU cores or fast cores?
Memory creep in last couple of updates
What's the correct REGEX for the allowlist in app.yml?
Tracking discourse usage by hour?
Discourse disk space limits per user?
Admin Reporting & Analysis: Incremental Changes
Out of memory errors with custom plugin
Postgres connection error on 'bundle exec rails c'
Getting extreme load warning while server resources are not being used
Real-time updating of topics freezes under high activity
Docker image update: Redis 6 and 25% smaller image size
Real-time updating of topics freezes under high activity
Real-time updating of topics freezes under high activity
What happens next?
High load due to peak anonymous sessions, increase unicorn workers?
Opinions on AWS vs DO Page Speed / Performance
Can I ignore some user agents?
Extreme Load Error After Upgrading to 3.3.0.beta3-dev Yesterday (on Prem)
Multiple Discourse Instances with WordPress, Ghost and subfolder support
Display community health stats on lemon (lemon = RPi + Pimoroni Unicorn Hat HD)