Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report process integration broken? #237

Closed
jlintz opened this issue Sep 22, 2016 · 5 comments
Closed

Report process integration broken? #237

jlintz opened this issue Sep 22, 2016 · 5 comments
Assignees

Comments

@jlintz
Copy link

jlintz commented Sep 22, 2016

I'm trying to setup the sending of reports to datadog and followed the instructions, but I'm getting the following error in my puppetserver.log

016-09-22 17:42:25,441 ERROR [qtp1148338657-136] [puppetserver] Puppet Report processor failed: undefined method `[]' for nil:NilClass
/etc/puppetlabs/code/environments/production/thirdparty/datadog_agent/lib/puppet/reports/datadog_reports.rb:51:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:37:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:53:in `processors'
org/jruby/RubyArray.java:1613:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:51:in `processors'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:30:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/processor.rb:14:in `save'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:285:in `save'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:176:in `do_save'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:48:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/api/indirected_routes.rb:47:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:82:in `process'
org/jruby/RubyArray.java:1613:in `each'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:81:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/route.rb:87:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:60:in `process'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/handler.rb:58:in `process'
file:/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar!/puppetserver-lib/puppet/server/master.rb:42:in `handleRequest'
Puppet$$Server$$Master_1615526159.gen:13:in `handleRequest'
request_handler_core.clj:273:in `invoke'
jruby_request.clj:46:in `invoke'
jruby_request.clj:31:in `invoke'
request_handler_service.clj:34:in `handle_request'
request_handler.clj:3:in `invoke'
request_handler.clj:3:in `invoke'
core.clj:2493:in `invoke'
core.clj:211:in `invoke'
core.clj:45:in `invoke'
core.clj:330:in `invoke'
core.clj:51:in `invoke'
ringutils.clj:86:in `invoke'
master_core.clj:430:in `invoke'
ring.clj:21:in `invoke'
ring.clj:12:in `invoke'
comidi.clj:249:in `invoke'
jetty9_core.clj:424:in `invoke'
normalized_uri_helpers.clj:80:in `invoke'

Using version 1.8.1 of the Puppet module. And the following versions of puppet...

ii  puppet-agent                     1.6.2-1xenial                   amd64        The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, hiera and mcollective.
ii  puppet-client-tools              1.1.0-1xenial                   amd64        PuppetDB CLI for querying Puppet data
ii  puppetdb                         4.2.2-1puppetlabs1              all          Puppet Labs puppetdb
ii  puppetdb-termini                 4.2.2-1puppetlabs1              all          Termini for puppetdb
ii  puppetlabs-release-pc1           1.0.0-2xenial                   all          Release packages for the Puppet Labs PC1 repository
ii  puppetserver                     2.5.0-1puppetlabs1              all          Puppet Labs puppetserver

On Ubuntu Xenial

@truthbk
Copy link
Member

truthbk commented Sep 22, 2016

Hi @jlintz, that shouldn't be broken - I have it running fine on xenial. Could you share (redacted) relevant portions of your nodes manifest - might be some bad documentation leading to the issue.

@jlintz
Copy link
Author

jlintz commented Sep 22, 2016

@truthbk do you need for a client server or for the puppet server?

@truthbk
Copy link
Member

truthbk commented Sep 22, 2016

@jlintz one of each :)

@jlintz
Copy link
Author

jlintz commented Sep 23, 2016

@truthbk hm it's probably easier for me to share my agent and server configs...

[agent]
    # The file in which puppetd stores a list of the classes
    # associated with the retrieved configuration.  Can be loaded in
    # the separate ``puppet`` executable using the ``--loadclasses``
    # option.
    # The default value is '$statedir/classes.txt'.
    classfile = $statedir/classes.txt

    # Where puppetd caches the local configuration.  An
    # extension indicating the cache format is added automatically.
    # The default value is '$confdir/localconfig'.
    localconfig = $vardir/localconfig

    # Disable the default schedules as they cause continual skipped
    # resources to be displayed in Foreman - only for Puppet >= 3.4
    default_schedules = false

    certname          = foo
    report            = true
    pluginsync        = true
    masterport        = 8140
    environment       = master
    server            = puppet.<redacted>.com
    splay             = true
    splaylimit        = 1m
    runinterval       = 600
    noop              = false
    usecacheonfailure = false
[master]
    vardir               = /opt/puppetlabs/server/data/puppetserver
    logdir               = /var/log/puppetlabs/puppetserver
    rundir               = /var/run/puppetlabs/puppetserver
    pidfile              = /var/run/puppetlabs/puppetserver/puppetserver.pid
    reports              = datadog_reports
    autosign             = true
    certname             = puppet.<redacted>.com
    codedir              = /etc/puppetlabs/code
    autosign             = true
    storeconfigs         = true
    storeconfigs_backend = puppetdb

I'm setting datadog_agent::puppet_run_reports: true in Hiera which is getting the dogapi gem installed as well. Let me know if you need more information

@jlintz
Copy link
Author

jlintz commented Oct 5, 2016

So this just magically started working for us on Sept 24th and we're seeing events show up in DD for Puppet... Didn't change anything on my end, but going to close this out heh

@jlintz jlintz closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants