uncategorized

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:

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

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

64-bit

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

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

Set the license key

/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

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

Start the daemon

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

Check log output

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:

#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:

start newrelic

To ensure it is autostarted:

chmod +x /etc/init/newrelic.conf