Skip to content

Instantly share code, notes, and snippets.

@LeoCavaille
Last active August 18, 2016 00:26
Show Gist options
  • Save LeoCavaille/cd412c7a9ff5caec462f to your computer and use it in GitHub Desktop.
Save LeoCavaille/cd412c7a9ff5caec462f to your computer and use it in GitHub Desktop.
Datadog reporting with masterless puppet

Steps to use Datadog reporting in masterless configuration.

  1. The Datadog module has to be installed on all nodes running masterless...
  2. Set the reports option in your puppet.conf in the [main] section
  3. Use the sample manifests and put them in manifests/
  4. Run puppet in masterless configuration cd /etc/puppet && puppet apply --modulepath ./modules manifests/site.pp
node "default" {
class { "datadog_agent":
api_key => "your_api_key_here",
puppet_run_reports => true
}
}
import "nodes.pp"
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
reports=datadog_reports
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
@marcgascon
Copy link

I'm getting an error:

...
Notice: Finished catalog run in 69.80 seconds
/etc/puppet/modules/datadog_agent/lib/puppet/reports/datadog_reports.rb:20: warning: already initialized constant HOSTNAME_EXTRACTION_REGEX
Error: Report processor failed: undefined method `[]' for nil:NilClass

Any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment