This is a Discourse plugin to get your forums reporting performance data to New Relic. It is meant to be used with the Discourse Docker Image, so installation instructions will follow that route. It was originally written by Sam Saffron, but I've updated the version of the New Relic RPM gem and supplied a newrelic.yml file that will be parsed by ERB.
Assuming you've followed the above instructions for the Discourse Docker image:
- SSH into your forum server as the user running docker (probably root)
cd /var/discourse
- Open up
containers/app.yml
- In the
env:
section, addNEW_RELIC_LICENSE_KEY: <your_license_key>
- In the
env:
section, addNEW_RELIC_APP_NAME: <name_of_your_forums>
- (optional) In the
env
sesion, addNEW_RELIC_AGENT_VERSION: <version_of_new_relic_agent>
- In the
hooks
section at the bottom, add the following tocmd:
- git clone https://github.com/davidcelis/new_relic-discourse.git
- (optional) In the
run
section at the bottom, add the following to get notified about new 'deployments':
- exec: curl -H "x-api-key:<your_api_key_not_license>" -d "deployment[app_name]=<name_of_your_forums>" -d "deployment[description]=This is an app id deployment" https://api.newrelic.com/deployments.xml
The next time you bootstrap and start a new container for your forums, it'll start reporting into New Relic! Yay! To restart Discourse so that it picks up the new plugin, just SSH into your server and do the following:
$ cd /var/discourse
$ ./launcher rebuild app
$ ./launcher start app
Or, you can visit the /admin/upgrade
URL on your Discourse installation's frontend and upgrade as you would normally.