This cookbook installs, configures and manages as a service New Relic Plugins on Debian/RHEL.
To use the cookbook, add it to your Chef cookbooks path under the name newrelic_plugins.
Recipes for the following plugins are provided:
- [logwatcher](logwatcher plugin)
- pivotal_agent
Chef 0.10.10+ and Ohai 6.10+ for platform_family support.
- Ruby >= 1.9.3
- Rubygems >= 1.9
- CentOS
- Red Hat
node[:newrelic][:plugin][:license] - (required) New Relic License Key
node[:newrelic][:plugin][:install_path] - (required) Install directory. Defaults to /opt/newrelic. Any downloaded files will be placed here. The plugin will be installed within this directory at pivotal_agent.
node[:newrelic][:pivotal_agent][:version] - (required) Version of the plugin
node[:newrelic][:pivotal_agent][:rabbitmq_host] - (optional) RabbitMQ host to monitor. localhost by default.
node[:newrelic][:pivotal_agent][:rabbitmq_port] - (optional) RabbitMQ management API port. 15672 by default.
node[:newrelic][:pivotal_agent][:rabbitmq_user] - (required) RabbitMQ management API user. guest by default.
node[:newrelic][:pivotal_agent][:rabbitmq_password] - (required) RabbitMQ management API password. guest by default.
node[:newrelic][:pivotal_agent][:debug] - (optional) debug model. You will get more logs in debug model.
name "newrelic_plugins"
description "System that run New Relic plugins"
run_list(
"recipe[newrelic_plugins::pivotal_agent]"
)
default_attributes(
"newrelic" => {
"plugin" => {
"license" => "NEW_RELIC_LICENSE_KEY"
},
"pivotal_agent" => {
"rabbitmq_host" => "localhost",
"rabbitmq_port" => "15672",
"rabbitmq_user" => "guest",
"rabbitmq_password" => "guest"
}
}
)
For additional info, see https://github.com/gopivotal/newrelic_pivotal_agent
node[:newrelic][:plugin][:license] - (required) New Relic License Key
node[:newrelic][:logwatcher][:version] - (required) version of the plugin to install.
node[:newrelic][:logwatcher][:metrics] - (required) metrics to watch. Each metric consists of a full path of the log file, a regex of term to grep and an optional grep options.
name "newrelic_plugins"
description "System that run New Relic plugins"
run_list(
"recipe[newrelic_plugins::logwatcher]"
)
default_attributes(
"newrelic" => {
"plugin" => {
"license" => "NEW_RELIC_LICENSE_KEY"
},
"logwatcher" => {
"metrics" => {
"tomcat" => { "log_path" => "/var/log/tomcat6/catalina.out", "term" => "[Ee]rror", "grep_options" => "v" },
"tomcat_access2" => { "log_path" => "/var/log/tomcat6/localhost_access_log.txt", "term" => "/contextpath/path" }
}
}
}
)
For additional info, see https://github.com/railsware/newrelic_platform_plugins
This cookbook is under the included MIT License.
Contribute to this Cookbook at https://github.com/wangjunbo924/newrelic_plugins_chef. Any other feedback or support related questions can be sent to support @ newrelic.com.