Blog

Install and Configure New Relic Server Monitoring on a Synology

Marketplace - Microsoft Azure

The New Relic instance is tied to an Azure subscription, however the Server monitoring is FREE.

Download

Download the latest version from here: http://download.newrelic.com/server_monitor/release/newrelic-sysmond-2.3.0.129-linux.tar.gz

Untar the package:

1
2
tar xzvf newrelic-sysmond-2.3.0.129-linux.tar.gz
cd newrelic-sysmond-2.3.0.129-linux/

Copy files to a reasonable location (e.g. /usr/local/bin)

Ensure the location exists, if not create it

1
2
mkdir /usr/local/bin
mkdir /var/log/newrelic

64-bit
1
2
cp daemon/nrsysmond.x64 /usr/local/bin/nrsysmond
cp scripts/nrsysmond-config /usr/local/bin

Set up config file

Create the directory if it doesn’t exist already

1
2
mkdir /etc/newrelic
cp nrsysmond.cfg /etc/newrelic/

Set the license key

1
/usr/local/bin/nrsysmond-config --set license_key=81b2d34ff83a099d6c286a97ae36a772630ca4da

or edit it manually using an editor such as vi

A tip is to also enable communication over HTTPS by setting the “ssl” property in the config file

ssl=true

Ensure permissions are correct

1
2
chmod 775 /usr/local/bin/nrsysmond
chmod 600 /etc/newrelic/nrsysmond.cfg

Start the daemon

1
/usr/local/bin/nrsysmond -c /etc/newrelic/nrsysmond.cfg

Check log output

1
cat /var/log/newrelic/nrsysmond.log

Set daemon to autostart on Synology

Follow this guide: http://majikshoe.blogspot.se/2014/12/starting-service-on-synology-dsm-5.html

Synology is using Upstart. Create config script in /etc/init/[servicename].conf containing below:

1
2
3
4
5
6
7
#script to start New Relic Server monitoring
# stop the service gracefully if the runlevel changes to 'reboot'
stop on runlevel [06]

# exec the process. Use fully formed path names so that there is no reliance on
# the 'www' file is a node.js script which starts the foobar application.
exec /usr/local/bin/nrsysmond -c /etc/newrelic/nrsysmond.cfg

Test by:

1
start newrelic

To ensure it is autostarted:

1
chmod +x /etc/init/newrelic.conf