Getting Started with the Platform Installer

Getting Started:

Currently the New Relic Platform Installer (NPI) tool supports the following plugins (expect this list to grow rapidly):

  • New Relic MySQL Plugin - Java
  • New Relic Memcached Plugin - Java
  • New Relic Wikipedia (Example) Plugin - Java
  • 3Legs Varnish Plugin - Java
  • 3Legs Cassandra Plugin - Java
  • 3Legs JMX Remote Plugin - Java
  • New Relic WIkipedia (Example) Plugin - .NET
  • New Relic MS SQL Plugin - .NET

The New Relic Platform Team is very excited and thankful for the community’s engagement in helping provide the rich ecosystem we have today. That said, we are always looking for areas to improve your experiences. In scouring through the feedback we have received through forums, reviews, and social media, we have realized that installation of plugins is a constant point of friction. How do I get it on my machine? How do I configure it? How do I keep it running? These are all questions we are hoping to address with the introduction of the New Relic Platform Installer (npi), a simple, light-weight command line tool that will help you to easily download, configure and manage New Relic Platform Plugins.

This is where you come in! Simply follow the instructions below to get a plugin up and running on your machine with the npi tool, and then let us know what you think by posting to our forums! Bear in mind, this is an early release so the tool only supports a small subset of the plugins we intend to support down the road. We look forward to hearing your feedback and thank you as always for helping us improve the New Relic Platform!

Step 1: Downloading the NPI Tool:

Simply copy and paste one of the following commands into your terminal (replacing ‘YOUR_LICENSE_KEY’ with your New Relic License Key) to download the npi tool to the directory “$HOME/newrelic-npi”. This will NOT affect your path, or download any global external dependencies:

** Note ** You can optionally prepend ‘PREFIX=[directory]’ or ‘DEFAULTUSER=[username]’ to configure the location the NPI tool will be installed and the default user plugins will be run as respectively.

  • Linux – Debian/Ubuntu

    • x86:

LICENSE_KEY=YOUR_KEY_HERE bash -c "$(curl -sSL"

  • x64:

LICENSE_KEY=YOUR_KEY_HERE bash -c "$(curl -sSL"

  • Linux – Red Hat/CentOS

    • x86:

LICENSE_KEY=YOUR_KEY_HERE bash -c "$(curl -sSL"

  • x64:

LICENSE_KEY=YOUR_KEY_HERE bash -c "$(curl -sSL"

  • Linux – Generic

    • x86:

LICENSE_KEY=YOUR_KEY_HERE bash -c "$(curl -sSL"

  • x64:

LICENSE_KEY=YOUR_KEY_HERE bash -c "$(curl -sSL"

  • Windows and OSX are currently supported but have a slightly more manual setup process:
  1. Navigate to: and download the latest archive for your system.
  2. Extract the archive to a location of your choosing.
  3. Run the following commands to configure the New Relic Platform installer to use your license key:

npi config set license_key <YOUR_LICENSE_KEY>

Step 2: Downloading Plugins:

We currently only support a subset of our plugins all of which require either Java or .NET to be installed on the box they are running on (the NPI tool does not install any runtime dependencies).

The NPI tool has two different workflows, the first is a simple interactive flow that will walk you through the installation; the second is a series of individual commands that give you granularity over each step of the installation and can be easily integrated into other scripts or workflows:

Installing with the interactive walkthrough:

The ‘install’ command will guide you through the installation process:

// Gets a list of available plugins to install with this tool
./npi available

// Walks you through the installation of a plugin 
./npi install <plugin_id>

Installing with individual commands:

You can always run ‘./npi --help’ from the directory where the tool was installed ("$HOME/newrelic-npi") to see a full list of commands currently supported. The following is an example session:

// Display a list of commands and flags that can be used to tailor your workflow
./npi --help

// Show plugins currently on your machine
./npi list

// Set your license key if you did not already in the installation process
./npi config set license_key <LICENSE_KEY>

// Gets a list of available plugins to install with this tool
./npi available

// Download a plugin to your machine
./npi fetch <plugin_id>

// Copy license key and open the plugin configuration file in a text editor
./npi prepare <plugin_id>

// Start a plugin in the foreground to ensure everything is working
./npi start <plugin_id> --foreground

// * ADMIN REQUIRED * Set the plugin to run as a background process and start it
./npi add-service <plugin_id> --start

Step 3: Provide Feedback:

We are using the New Relic forums to gather feedback from you on the NPI tool to make things as simple as possible. All you’ll need to do is create a post with your feedback under the “Platform Installer” category. Anything you’d like us to know, we’d like to hear (e.g. the tool is easy or hard to use, the experience is confusing, the command names do not make sense to you) it will all help us plan the next steps for this project!

Thank you for taking the time!

New Relic Platform Team


This topic is now pinned. It will appear at the top of its category until it is either unpinned by a moderator, or the Clear Pin button is pressed.

All good, but please allow $PREFIX to be passed and add support for unattended setup (I really hate having to pipe “yes” in). Also, you can add the “-s” option to curl.


Thanks for reaching out! It is not very clear, but $PREFIX can be passed the same way the LICENSE_KEY is set (e.g. PREFIX=/etc/newrelic bash -c …). Initially we were demonstrating all of these values were configurable but we wanted to make the command more concise and approachable, so we dropped off all the example configurations. As far as headless installation goes, do you have an example of a tool that you think does this well? I am planning to revamp the installation script very soon so am very grateful for any advice on what would make things convenient! :smile:

Are you sure? Looking into the source code of the installer, $PREFIX is hard-coded to $HOME/newrelic-npi.

Ah, you’re absolutely right! I was under the impression that variables could be overridden by passing them as I do the LICENSE_KEY but that apparently only applies in bash if the variable has not been initialized. I will address this and have a release out by end of the week!

It may be obvious to most but ill comment for anyone who may need this little tidbit.
We run mysql on non standard ports, so I needed to add a colon and the port to the end of the host variable in plugin.json file.

i.e. : if my host IP is and my port is 3312 then my plugin.json host should look like this

“host” : “”,

1 Like

Hey Nikolay, I apologize for the delayed response, I have been working on adding support for Windows and .NET plugins to the NPI tool, but I wanted to reach out and let you know that your feedback was taken to heart and I’ve made several changes to the latest release of NPI. PREFIX and DEFAULTUSER are now configurable options for the curl command. I’ve also added support for an “UNATTENDED=true” variable (I tried to make this a flag; however, I could not reliably support flags through the curl command in a way that accommodated all of our *nix distros. I hope this makes your experience better and certainly look forward to more feedback in the future!

Thanks! This is great news. Let me test it out! :smile:

1 Like

Nice! I was never able to get the MySQL monitoring working, hopefully this will make it work. I’m building an Ansible script to automatically install the NPI tool, but unfortunately the script has a prompt: “Are you sure you want to continue? (y/n)”

Which makes it unable to efficiently automate the installation of the script. The manual options of the software itself are perfect, but now only the installation of the software has to have a way to manually install itself. Is there a way? Thanks!

Edit1: Oops adding the UNATTENDED=true variable works! Thanks.

Edit2: Successfully automated it with Ansible, but had to first transfer the install command in a separate shell script before I could execute it properly. It would be nicer for automation if we could specify the variables in a file, which the script would then listen to.

@hyper are you planning on sharing your Ansible automation via ? If so, it’d be terrific if you could post the URL here once it goes live there - thanks!

For now I have uploaded the script on Github. I’ll open source more playbooks when I have the time to do so and also integrate them with Galaxy later. Here’s the link:


The Windows platform installer seems to currently only run from the same drive where Windows is installed (get an error trying to run \Windows\System32\sc.exe if the folder is not on the Windows system drive). Would be nice to be able to locate the folder on any drive at some point.

1 Like

Thanks for bringing this to our attention, we’ll take a look at what we can do!

Hey dknudsen,

We’ve modified the code to now use the ‘SystemRoot’ environment variable to determine where the sc utility is located (if the variable is not present it will default to the ‘C’ drive explicitly). We’ve tested things locally, and we’ve released a beta version containing this change here, if this works for you we will push this improvement out with our next release!


Hi Adam,

This change seems to work fine for me. Thanks for the quick turn-around! doesn’t seem to list a 64-bit windows option. I’m trying to install the SqlServer plugin an a 64-bit machine…

Hey @leen_kievit, currently we have not explicitly differentiated between architectures since we compile our plugins for ‘AnyCPU’ for max compatibility and convenience and because Windows in general is pretty good with x86 support on x64 machines. The x86 distributable should work for your x64 machine but please let us know if you are running into problems and we will work with you to get things running!

Would it be possible to add the on failure configuration to winsw.template.xml e.g.
<onfailure action="restart" />
<resetfailure>0 sec</resetfailure>

Are there any plans to put this on Github to make suggesting changes like this easier?

Hey @Trevor_Dearham,

In regards to the winsw template, I think those are reasonable requests; however, I know we’ve received feedback in the past to not be quite as aggressive about trying to stay running if something is wrong (i.e. it may not be an ideal default behavior). As I’m sure you already know, you can modify the template file (located in the ./bin directory of the NPI folder) to contain whatever configurations you’d like and they will propagate to each subsequent plugin you install. That said, I will look into mechanisms to help facilitate these sorts of configurations in a more user friendly way…potentially exposing them as ‘config’ options?

As far as being in a public repo goes, I think you’re absolutely right. We’ve started discussions internally to discuss the transition and identify any hard blocks (which we don’t anticipate there being any). I will respond here as that conversation unfolds.

Thanks for taking the time!