Page tree
Skip to end of metadata
Go to start of metadata

Introduction

The New Relic® LAM is a standard Moogsoft AIOps feature that enables AIOps to ingest incident data from New Relic.

The following information explains the configuration required to send New Relic data to AIOps. 

Requirements

The ingestion of incident data from New Relic requires AIOps installed and running with a New Relic LAM, which is configured to allow inbound communication from New Relic.

A New Relic account is required, with required policies and notification channel configured as described below.

Capabilities

The integration between New Relic and AIOps should be able to accept all New Relic incident types. 

New Relic can monitor a range of products and services, for which incident information can be sent. The list below summarises the different types:

Incident type
Description
New Relic APMUsed to monitor the performance and availability of web applications
New Relic BrowserMonitor browser specific data and software performance from an end-user’s perspective
New Relic MobileMonitor performance problems in mobile apps operating in complex production environments
New Relic ServerFind health issues to things like CPU utilisation, memory utilisation, disk I/O utilisation, and disk capacity
New Relic InsightsQuery application business metrics, performance data, and customer behaviour
New Relic SyntheticsTest and find issues with your software's business critical functionality


The performance of AIOps will be dependent on the number of Events received per second and the specifications of the AIOps system on which the LAM is running.  

AIOps configuration

A New Relic LAM is required to be running on AIOps in order to receive incident data from New Relic. The following configuration files (which are installed by default) are required for the New Relic LAM to run:

  • The New Relic LAM configuration file:

    $MOOGSOFT_HOME/config/newrelic_lam.conf


    The LAMBot file which performs the main processing on the Events received:

    $MOOGSOFT_HOME/bots/lambots/NewRelicLam.js

New Relic LAM configuration

  1. Check the New Relic LAM configuration file to ensure that the below fields are set correctly:

    FieldDescriptionExample
    zoneThe AIOps zone name where the LAM will runDEMO. This must be the same across all components
    portThe port number where the LAM will be receiving data from New RelicPort number 8888. This must be accessable by New Relic
    addresslocalhost or the hostname of the system running AIOpsIf AIOps is running on premise the default address is : 0.0.0.0 
    If AIOps is running on e.g. Amazon web services, it may be similar to ew2.234.234.compute.amazonaws.com
    accept_all_jsonIn order for AIOps to accept the JSON data sent by New Relic, set to true


Note: The New Relic LAM can be configured to use SSL, however New Relic does not recognise the self-signed certificates supplied with AIOps. In order to use SSL communication between AIOps and New Relic, use an official verified and signed certificate on the AIOps system, and in the LAM, set use_ssl to true

  1. Define the following location and names of the certificates to use in the New Relic LAM configuration file (newrelic_lam.conf):

    CertificateDescription
    path_to_ssl_filesThe directory in which the certificates are placed
    ssl_key_filenameName of the certificate .key file
    ssl_cert_filenameName of the certificate .pem file
  2. Enter the following command to start the service:

    service newreliclamd start

AIOps is now listening on the specified port (for example port number 8888) and is ready to receive data sent from New Relic.

AIOps configuration for the New Relic LAM is now complete.

New Relic configuration

To send incident data from New Relic you need:

  • a New Relic account
  • configuration of required policies
  • a notification channel

If you already have an account set up and are already monitoring one or more environments, you may skip the Account set up section below and proceed directly to the second section below.

New Relic account set up

  1. Create a free New Relic account by visiting the New Relic website https://newrelic.com/signup


Monitoring agent set up

When you have created a New Relic account, and before configuring New Relic to send incident information to AIOps, a system must be set up that is monitored by New Relic. For this installation, New Relic is installed and set up to monitor a virtual machine running CentOS. The following steps explain the installation of New Relic on a CentOS machine:

  1. Click Servers. You see a Get started with New Relic Servers page appears:
    1. Select the Red Hat or CentOS option, and scroll down to see the next steps, which are carried out in a terminal window.

       
  2. Open a terminal window and enter the following command to Add the New Relic yum repository to the machine which will be monitored:

     rpm -Uvh http://download.newrelic.com/pub/newrelic/el5/i386/newrelic-repo-5-3.noarch.rpm 
  3. Enter the following command to Install the Server Monitor package

    yum install newrelic-sysmond 

    When installation successfully completes, a screen similar to the one below appears:

     
     

  4. Enter the commands below to add a license key to the New Relic config file, and start the Server Monitor daemon:

    nrsysmond-config --set license_key=LICENCE_KEY 
    /etc/init.d/newrelic-sysmond start 

    Where the LICENCE_KEY is the value shown in the fourth step on the setup page. 

    New Relic should now detect the machine and a screen similar to the one below appears when you click Servers (at the top):

     

Alert policy set up

To monitor the detected machine, set up a New Relic Alert policy to define the conditions for which incidents will be created. 

  1. Click Alerts and then click Alert policies, (at the top right of the New Relic account page):
     
  2. Click New Alert policy, enter a name for the new policy and then click Save
    You see the following screen:
     
  3. Click Create a condition, and on the next page select Servers as the product, and Metric as type of condition:
     
  4. Click Next, select targets and in the next section select the server from the list on the left, either by searching for the machine name or by clicking on All Servers. Click the check box to select the server:
     
  5. Click Next, define thresholds (CPU % and Memory % thresholds will be defined for this set up). 
    From the list at the top left, select CPU % and enter the settings:

    CPU % has an average below 100 % at least once in 5 minutes

    as shown below:
     

  6. Click Save condition and then Add a condition
    Select Memory % (from the list at the top left) and enter the settings

    Memory % has a percentage below 100 % at least once in 5 minutes

    as shown below:

  7. Click Save condition, and ensure your Alert conditions screen looks similar to the one below, with the two conditions listed:

    Specify how incidents should be created when conditions in this Alert policy are violated. 
  8. Click Incident preference (at the top right). You see the following screen:
  9. Select the By condition and target option, and click Save.

Notification channel set up

To define how and where notifications are sent, setup a channel through which the notifications will be sent:

  1. Click Alerts, (in your New Relic account, at the top right) and then click Notification channels:
     
  2. Click New notification channel and select channel type as Webhook. Enter a Name for the channel and the Base URL (this is the URL to which the notifications are sent).
    In this set up, the public facing IP address provides access to the AIOps system. 
    Note: Append the port number specified in the AIOps configuration to the URL (for example, port number 8888, as shown below:
     
  3. Click Use Custom Payload, and ensure that the Payload fields information shown below is displayed, and that JSON format is selected for Payload Type:

    Add the channel to the Alert policy that was created earlier, or any existing policies that you may have set up for monitoring
  4. Click Create channel, and then click Alert policies.
    Click the policy you want from the list, and then select the Notification channels tab:
  5. Click Add notification channels and from the list on the left, select Webhook. Select the webhook channel, and click Update policy, to enable notifications to be sent to AIOps. The Alert Policy screen should now look similar to the one below:

     

New Relic configuration for AIOps is now complete. 

The tables below list the default mappings between the JSON fields being sent from New Relic and the fields in the New Relic LAM:

New Relic > AIOps

 New Relic 
JSON fields

 AIOps 
LAM field names

account_name + account_id

source_id

condition_id

custom_info.conditionId

condition_name

class

details

description

event_type

type

event_type + incident_id

external_id

incident_acknowledge_url

custom_info.AcknowledgeIncident

incident_url

agent_location

policy_name

custom_info.policyName

policy_url

custom_info.policyUrl

severity

severity 

targets

custom_info.name
custom_info.id
custom_info.link
custom_info.type
custom_info.product

 targets.name

source

 timestamp

custom_info.timestamp

AIOps > New Relic

AIOps 
LAM field names

New Relic 
JSON fields

agent_location

incident_url

class

condition_name

custom_info.AcknowledgeIncident

incident_acknowledge_url

custom_info.conditionId

condition_id

custom_info.name
custom_info.id
custom_info.link
custom_info.type
custom_info.product

targets

custom_info.policyName

policy_name

custom_info.policyUrl

policy_url

custom_info.timestamp

timestamp 

description

details

external_id

event_type + incident_id

severity

severity

source

targets.name

source_id

account_name + account_id

type

event_type 

Testing & sample Alerts

Shortly after setting up New Relic, violations should appear on the Events page, in the violations section, such as shown below:

The above violations are sent to AIOps, where they were received by the New Relic LAM and processed to create Alerts as shown below:

Details of the Alerts highlighted are shown below:


Configuration for sending New Relic data to AIOps is now complete.

AIOps New Relic Cookbook recipe

AIOps includes a Cookbook recipe for you to use which uses New Relic LAM data.

This default recipe can create Situations based on 100% similarity of the hostname received from New Relic, with a cook for time of 15 minutes. Administrators can find the recipe in Cookbook Recipes (via System Administration):

For more information on using and editing Cookbook recipes, see Cookbook Recipe builder.


  • No labels