nickfloyd / newrelic-perfmon-plugin

The Perfmon Plugin for the New Relic Plugins - https://newrelic.com/plugins
MIT License
11 stars 22 forks source link

newrelic-perfmon-plugin

Perfmon Plugin for New Relic RPM

Quick Download

NOTE: When using this, please follow the directions below for Standalone or Windows Service.

https://github.com/nickfloyd/newrelic-perfmon-plugin/blob/master/standalone/perfmon_plugin_standalone.zip

Prerequisites

Standalone and Windows Service Versions

Ruby Script Version

Instructions for running the Plugin

Standalone Version

  1. Verify that the "typeperf" command is available at your Windows command line. ex. typeperf "\Processor(_Total)\% Processor Time"
  2. Download and extract the plugin to a local directory
  3. Copy config\template_newrelic_plugin.yml to config\newrelic_plugin.yml
  4. Edit config\newrelic_plugin.yml and replace:
    • 'YOUR_LICENSE_KEY_HERE' with your New Relic license key (in ' ')
    • your_sever_name_here with the hostname of your Windows server from which you wish to collect Perfmon counters
    • (optional) If your server is behind an HTTP proxy, uncomment and set the proxy_host, proxy_user and proxy_pass settings.
  5. Run perfmon_plugin_standalone.exe
  6. Go back to the Plugins list, after a brief period you will see an entry called 'Perfmon'

Windows Service Version

  1. Follow directions for Standalone Version
  2. Install the plugin service: run install_perfmon_plugin_service.bat
  3. Start the plugin service by one of the following:
    • Run perfmon_plugin_service.exe start OR
    • Run sc start nr_perfmon OR
    • Start via Windows Services GUI
    • Note: This service is set to start automatically at Windows start. To set to manual or disable, do so by editing the service in the Windows Services GUI.

Ruby Script Version

  1. Verify that the "typeperf" command is available at your Windows command line. ex. typeperf "\Processor(_Total)\% Processor Time"
  2. Go to: https://github.com/newrelic-platform/perfmon_plugin.git
  3. Download and extract the source to a local directory
  4. Run bundle install in the directory with this source
  5. Copy config\template_newrelic_plugin.yml to config\newrelic_plugin.yml
  6. Edit config\newrelic_plugin.yml and replace:
    • 'YOUR_LICENSE_KEY_HERE' with your New Relic license key (in ' ')
    • your_sever_name_here with the hostname of your Windows server from which you wish to collect Perfmon counters
  7. Edit 'config\perfmon_counters.txt' to list which counters you wish to collect
  8. Execute perfmon_plugins_multithread.rb at command-line
  9. Go back to the Plugins list, after a brief period you will see an entry called 'Perfmon'

Collecting Custom Perfmon Counters

Out-of-the-box, we have collected a set of Perfmon counters and dashboards that pertain to .NET applications. If you would like to collect your own counters, you can do so via config files in the Standalone agent, like so:

  1. Create a new perfmon counters text file in the "config" directory
    • You can use the existing perfmon_totals_counters.txt file as an example
    • Use one Perfmon counter expression per line - the wildcards are as permitted by the "typeperf" command in Windows.
  2. Edit your newrelic_config.yml file as follows:
    • Uncomment "guid" and set to your own GUID
    • Uncomment "countersfile" and set to the list of perfmon counters text file.
  3. Follow the instructions above - Instructions for running the Plugin
    • The agent will appear in the UI under the new GUID name you defined.

Note: You will need to create your own custom dashboards and summary alerts for the agent.

Forking the plugin / Making it your own

Beyond collecting new Perfmon counters, if you'd like to take this plugin and customize it for your own specific needs you can do the following:

  1. Fork the repository | Download the code
  2. Change the agent_guid found in perfmon_plugins_multithread.rb to your own custom GUID (see the docs for more information)
  3. Follow the instructions above - Instructions for running the Plugin

Notes / Tips

Contributing

  1. Fork the repository
  2. Add awesome code or fix an issue with awesome code
  3. Submit a pull request

Support

All support requests will be handled via github issues.