Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Relic Solution: Insights Dashboards by email

levelup

#1

Do you have business critical dashboards built in Insights?

Have you wanted to get those dashboards sent out to the people who need that information, people who may not have access to your New Relic account?

This may be the solution for you.

Read on to see how you too can get a PDF copy of your insights dashboards sent to you through email.

Requirements -

  • Synthetics Private Locations subscription
  • The ability to run the Containerised Private Minion (CPM) in a docker container
  • Gmail account
  • A New Relic user account with access to the Insights Dashboard

Note: If your account uses SSO, you will need to account for this in the attached Synthetics Script.

Steps -

This script uses a 3rd party module (nodemailer) to send the emails and requires you to run it in the CPM. You will have to create a package.json file with nodemailer as a dependency and call it when running the CPM container.

docker run \
--name YOUR_CONTAINER_NAME \
-e "MINION_PRIVATE_LOCATION_KEY=YOUR_PRIVATE_LOCATION_KEY" \
-v /tmp:/tmp:rw \
-v /var/run/docker.sock:/var/run/docker.sock:rw \
-v /location of package.json:/var/lib/newrelic/synthetics/modules:rw \
quay.io/newrelic/synthetics-minion:latest

Following that - you’ll need to edit the parameters below as part of the Synthetics Script.

NRLogin = 'New Relic Username';
NRPass = 'New Relic Password';
Dashboard = 'Enter dashboard # or unique name';
Sender = 'Email you want to appear as the sender';
Recipients = 'Email or emails of receipients separated by a comma';
Subject = 'Subject of the email';

emailSettings = {
    service: 'Gmail',
    auth: {
        user: 'EMAIL_ADDRESS',
        pass: 'EMAIL_PASSWORD'
    }
};

Please note if you will be using gmail to send out the reports, you will also need to change the security access settings in gmail to allow 3rd party access.


Recurring scheduled reports -

To get this script set up on recurring schedule - for example; a weekly report of an Insights dashboard. You can use the Monitor Downtime functionality to enable/disable the monitor at the times required.

Resources!!

All required resources live in this Github Repo; including the Synthetics Script, and a sample Package.json file.


Support

Please note that this is offered for use as-is without warranty. You are free to use and modify as needed. It has been created for use with New Relic, but is not a supported product of New Relic.


#2

Hi @dkairu - This is a great workaround, but there are a lot of issues here if your company works to high security standards. Also there are some additional costs for the synthetics, private minion and the associated Insights event storage.

I will wait until the feature request is implemented :wink:


#3

@stefan_garnham - You’re absolutely right - this is a workaround, and as such is a far from ideal solution.
Relying on extra subscriptions (like Private Locations) is not exactly preferable.

I guess this post is designed to target those who already have that set up of private locations & Synthetics Pro.