-
Notifications
You must be signed in to change notification settings - Fork 265
Developing a Plugin
Writing new plugins for the agent is comprised of multiple steps:
- Setting up the development environment
- Creating the plugin for the agent
- Creating dashboards for the agent
The development environment for the newrelic-plugin-agent uses Vagrant and docker to provide a repeatable, automated setup for the environment required for the new plugin. If you're writing a plugin for "Daemon X", getting an environment setup where the maintainers and other developers can work with your code against "Daemon X" is an important first step. It will not only help with testing your pull-request, but it will also provide a way for other developers to work with your code.
In the newrelic-plugin-agent source top-level directory start the Vagrant VM:
vagrant up
You'll be prompted for your password to share the source folder with the VM. Once entered, the VM will finish booting and you can ssh into the VM with:
vagrant ssh
Once in the VM, you'll want to set your NewRelic license key. Supposing your license key is ABCD1234
:
core@core-01 ~ $ newrelic-key ABCD1234
Key updated, run "source ~/.newrelic-key" to activate
core@core-01 ~ $ source ~/.newrelic-key