New Relic Server, APM, Nginx and MySQL Monitor Ansible role
- hosts: yourhost
roles:
- newrelic
# License key
nr_license: 'YOUR_LICENSE_KEY'
# Set the ones you want as 'true', they are all set 'false' by default
monitor_server: true
monitor_apm: true
monitor_nginx: true
monitor_mysql: true
Remember to add -javaagent: /opt/newrelic/newrelic.jar to your JVM startup environment variables.
e.g.: For Tomcat, edit the bin/setenv.sh file and add the above javaagent option to the CATALINA_OPTS variable:
export CATALINA_OPTS="${CATALINA_OPTS} -javaagent: /opt/newrelic/newrelic.jar"