After installing the Plugin Agent today on Ubuntu 12.04, I enhanced the guide that MeetMe provides. Try the following steps:
Install pip:
$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo pip install --upgrade virtualenv
For certain plugins there might be additional installations, so check out the plugin instructions. [MongoDB plugin for example needs python driver for Mongo]
Copy the configuration file example to /etc/newrelic/newrelic_plugin_agent.cfg and edit the configuration in that file to enable the plugin and set the New Relic license key:
$ sudo cp /opt/newrelic_plugin_agent/etc/newrelic/newrelic_plugin_agent.cfg /etc/newrelic/newrelic_plugin_agent.cfg
Change ownership of newrelic folders to newrelic user:
$ sudo chown newrelic:newrelic /var/run/newrelic
$ sudo chown newrelic:newrelic /var/log/newrelic
Run the agent:
$ sudo newrelic_plugin_agent -c /etc/newrelic/newrelic_plugin_agent.cfg
If the process is not staying up try to run it as foreground process and check out the output:
$ sudo newrelic_plugin_agent -c /etc/newrelic/newrelic_plugin_agent.cfg -f