The discussion revolves around a New Relic plugin for Discourse, originally authored by Sam Saffron, which enables New Relic RPM monitoring via a simple plugin.rb and newrelic.yml configuration. watchmanmonitor offers installation guidance, suggesting placing newrelic.yml in config/ and adjusting the path in plugin.rb, while questioning whether a bundle install is necessary [3]. patrick praises the plugin. davidcelis later created a GitHub repo (new_relic-discourse) with updates, including environment variable support and Docker instructions, crediting Sam. cooper suggests adding it to New Relic Connect, which davidcelis agrees to. hunterowens asks about containerized deployment without data loss; davidcelis confirms data persists in shared volumes but requires container rebuild. evaryont recommends using Discourse’s /srv/status endpoint for New Relic availability monitoring. Later, Nacho_Caballero and valsha note the plugin is now incompatible with current Discourse versions and seek updated alternatives.
I took it upon myself to create a GitHub repository for this; it’s pretty much unchanged, but it does use the most up-to-date Ruby agent version while also providing a newrelic.yml file that will look for NEW_RELIC_LICENSE_KEY and NEW_RELIC_APP_NAME variables.
Bonus: installation instructions for the Docker image. Thanks for the initial version, @sam!
You won’t lose the content, as both the PostgreSQL and Redis databases are stored in a folder that’s shared with the host. You will have to destroy the container and re-bootstrap it, but all your data (posts, users, topics, etc.) will still be there.
For anyone else looking to further integrate New Relic, they offer an availability monitoring service. This way you can get alerts if Discourse ever goes down. (Ideally, that would be never!)
Discourse already has an OK status URL that works wonderfully for this purpose. If you go to your Discourse application in New Relic, then Settings → Availability Monitoring, New Relic asks for a URL to monitor. You can use /srv/status from your application, like https://meta.discourse.org/srv/status and hit “Save”.