Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itainteasy/3d4f3b3d7663e827879d2a8c52a719e3 to your computer and use it in GitHub Desktop.
Save itainteasy/3d4f3b3d7663e827879d2a8c52a719e3 to your computer and use it in GitHub Desktop.
saltstack-newrelic.sls
newrelic-add-repo:
cmd.run:
- name: echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list
- unless: grep "deb http://apt.newrelic.com/debian/ newrelic non-free" /etc/apt/sources.list.d/newrelic.list
newrelic-trust-repo:
cmd.run:
- name: wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add -
- unless: apt-key list | grep "New Relic"
newrelic-sysmond:
pkg:
- installed
- require:
- cmd: newrelic-add-repo
- cmd: newrelic-trust-repo
- cmd: newrelic-license-install
service:
- running
- require:
- pkg: newrelic-sysmond
newrelic-license-install:
cmd.wait:
- name: nrsysmond-config --set license_key=<insert your key>
- unless: grep "license_key=<insert your key>" /etc/newrelic/nrsysmond.cfg
- watch:
- pkg: newrelic-sysmond
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment