Installing New Relic Servers on a Cumulus Linux Switch

Follow

New Relic Servers is a server monitoring tool. This article describes how you can use this tool to monitor x86-based switches running Cumulus Linux.

{{table_of_contents}}

Preparing for the Installation

Warning: This only works on x86-based switches!

You need the following

For more information on creating accounts, read the New Relic documentation.

Installation

To install New Relic Servers:

  1. Since Cumulus Linux is Debian based, install the Debian server agent. As with installing any package, you must use root permissions to install the agent:
    [email protected]$ sudo -i
    [email protected]:~# 
  2. Add the New Relic repo to your apt sources list:
    [email protected]:~# echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
  3. Add the repository's signing key:
    [email protected]:~# wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
  4. Update the switch's repository to add the new packages:
    [email protected]:~# apt-get update
  5. Install the New Relic Servers system monitoring client:
    [email protected]:~# apt-get install newrelic-sysmond
  6. Find the New Relic license key and install it:
    [email protected]:~# nrsysmond-config --set license_key=[YOURLICENSEKEY]

In New Relic Servers, a default dashboard is set up for each Cumulus Linux switch. You can set up custom dashboards or alerts.

Installing the New Relic Service in a Management VRF

If you intend to run New Relic in a management VRF, follow these steps to add it into the mgmt VRF.

  1. Using NCLU, create a management VRF:
    [email protected]:~$ net add vrf mgmt
    [email protected]:~$ net pending
    [email protected]:~$ net commit
  2. Copy the file /etc/systemd/system/newrelic-infra.service to /lib/systemd/system/:
    [email protected]:~$ cp /etc/systemd/system/newrelic-infra.service /lib/systemd/system/newrelic-infra.service
    
    [email protected]:~$ cat /lib/systemd/system/newrelic-infra.service
    [Unit]
    Description=New Relic Infrastructure Agent
    After=syslog.target
    
    [Service]
    Type=simple
    ExecStart=/usr/bin/newrelic-infra
    MemoryLimit=1G
    Restart=always
    RestartSec=20
    StartLimitInterval=0
    StartLimitBurst=5
    
    [Install]
    WantedBy=multi-user.target
  3. Reload the system daemons:
    [email protected]:~$ sudo systemctl daemon-reload
  4. Reference the newrelic-infra service in the /etc/vrf/systemd.conf file:
    [email protected]:~$ cat /etc/vrf/systemd.conf
    # Systemd-based services that are expected to be run in a VRF context.
    #
    # If changes are made to this file run systemctl daemon-reload
    # to re-generate systemd files.
    
    chef-client
    collectd
    dhcpd
    dhcrelay
    hsflowd
    netq-agent
    netq-notifier
    netqd
    newrelic-infra
    ntp
    puppet
    snmpd
    snmptrapd
    ssh
    zabbix-agent
  5. Check the contents of the vrf.conf file:
    [email protected]:~$ cat vrf.conf
    # created by vrf generator
    
    [Unit]
    SourcePath=/lib/systemd/system/newrelic-infra.service
    After=network-online.target networking.service
    
    [Service]
    ExecStart=
    ExecStart=/usr/bin/vrf task exec %I /usr/bin/newrelic-infra
  6. Start the New Relic service:
    [email protected]:~$ sudo systemctl start [email protected]
  7. Check its status:
    [email protected]:~$ sudo systemctl status -l [email protected][email protected] - New Relic Infrastructure Agent
       Loaded: loaded (/lib/systemd/system/newrelic-infra.service; disabled)
       Drop-In: /run/systemd/generator/[email protected]
                └─vrf.conf
        Active: active (running) since Mon 2017-06-12 20:45:59 UTC; 1min 35s ago
      Main PID: 7026 (newrelic-infra)
        CGroup: /system.slice/system-newrelic\x2dinfra.slice/[email protected]
                └─7026 /usr/bin/newrelic-infra

Example Dashboard

List of switches

 

Default dashboard

Have more questions? Submit a request

Comments

Powered by Zendesk