Adding plugins to new relic infrastructure monitoring

Custom and third party performance statistics plugins can be installed from new relic store,
new plugin installer can be used to install plugins from npi command.
npi will be located at /root/newrelic-npi

$LICENSE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  bash -c "$(curl -sSL https://download.newrelic.com/npi/release/install-npi-linux-redhat-x64.sh)"

You are about to download the New Relic Platform Installer v0.1.5.
This will download the 'npi' tool from the following URL: https://download.newrelic.com/npi/v0.1.5/platform_installer-linux-x64-v0.1.5.tar.gz
It will place the tool at '/root/newrelic-npi'.  It will not affect your path or global settings.

Are you sure you want to continue? (y/n) y
Setting default configurations
  user -> root
  license_key -> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  distro -> redhat
Successfully setup the New Relic Platform Installer!

Next steps: 
  - Navigate to the directory: '/root/newrelic-npi'
  - Run './npi available' to get a list of available plugins
  - Run './npi install <plugin>' to download, configure and start a plugin
  - For additional help run the following './npi --help'

Now we can use new relic plugin install command to install plugins from new relic store.

$./npi install com.newrelic.plugins.mysql.instance
Enter your New Relic license key (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx): 
[21:31:18] [INFO] operations - Using license key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[21:31:18] [INFO] operations - Fetching the plugin to your file system...
You are about to download the following plugin: 
- com.newrelic.plugins.mysql.instance: 
  - Details: 
      download_url           https://github.com/newrelic-platform/newrelic_mysql_java_plugin/raw/master/dist/newrelic_mysql_plugin-2.0.0.tar.gz
      implementation         Java
      publisher_name         New Relic Inc.
      publisher_support_url  https://support.newrelic.com/home
      version                2.0.0

Are you sure you want to continue? (y/n): y
[21:31:23] [INFO] platform_helpers - Downloading compressed archive for 'com.newrelic.plugins.mysql.instance'...
[21:31:27] [INFO] platform_helpers - Extracting archive for 'com.newrelic.plugins.mysql.instance'...

Current state for the plugin: com.newrelic.plugins.mysql.instance
- com.newrelic.plugins.mysql.instance: 
  - State: 
      Downloaded   [x]
      Prepared     [ ]
      Installed    [ ]
      Running      [ ]

[21:31:27] [INFO] operations - Configuring the plugin to run...
[21:31:27] [INFO] operations - Generating 'newrelic.json' file for plugin...
Configure the plugin in a text editor before continuing? (y/n): y

Current state for the plugin: com.newrelic.plugins.mysql.instance
- com.newrelic.plugins.mysql.instance: 
  - State: 
      Downloaded   [x]
      Prepared     [x]
      Installed    [ ]
      Running      [ ]

[21:32:03] [INFO] operations - Setting the plugin as a background process...
Do you want to set this plugin as a background process? (y/n): y
[21:32:06] [INFO] platform_helpers - Writing service script to: /etc/init.d/newrelic_plugin_com.newrelic.plugins.mysql.instance...
[21:32:06] [INFO] platform_helpers - Changing permissions on service script to 0755...
[21:32:06] [INFO] platform_helpers - Running 'chkconfig' with arguments: ["--add","newrelic_plugin_com.newrelic.plugins.mysql.instance"]
[21:32:06] [INFO] platform_helpers - Received '--start' flag, attempting to start the background service.
Starting newrelic_plugin_com.newrelic.plugins.mysql.instance
Successfully added background service for 'com.newrelic.plugins.mysql.instance'!

Next steps: 
  Start plugin in the background:     npi start com.newrelic.plugins.mysql.instance
[21:32:06] [INFO] operations - Plugin 'com.newrelic.plugins.mysql.instance' has been successfully setup on your machine.  Run 'npi list com.newrelic.plugins.mysql.instance' to see more information

Current state for the plugin: com.newrelic.plugins.mysql.instance
- com.newrelic.plugins.mysql.instance: 
  - State: 
      Downloaded   [x]
      Prepared     [x]
      Installed    [x]
      Running      [x]

After the plugins are added metrics are generated in new relic interface.