Ask Your Question
1

Reporting not working?

asked 2016-08-01 20:30:25 -0500

t0ddjames gravatar image

When I run puppet agent --test (or allow the puppet agent to run daemonized), I can't seem to find the generated reports. Any insight on what I'm doing wrong?

This is part of my puppet.conf:

[agent]
    report            = true
    reports           = store,log,foreman

I would expect to see reports somewhere in /var/log/puppetlabs/ (store), or in /var/log/syslog (log), or in Foreman (foreman), but I don't see them anywhere. The Foreman logs don't show puppet POSTing. I can see that I do have the .rb files for these reports:

root@puppet:/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/reports# ls -l
total 20
-rw-r--r-- 1 root root 6353 Jul 22 09:33 foreman.rb
-rw-r--r-- 1 root root 1044 Jul 19 19:51 http.rb
-rw-r--r-- 1 root root  326 Jul 19 19:51 log.rb
-rw-r--r-- 1 root root 1886 Jul 19 19:51 store.rb

I am using a clean install of Foreman 1.12 on Ubuntu Server 16.04.1 using the foreman-installer tool, which also installs puppetserver and puppet-agent automatically. I am using the following puppet packages:

root@puppet:~# dpkg -l | grep puppet
ii  foreman-installer                  1.12.0-1                        all          Automated puppet-based installer for The Foreman
ii  puppet-agent                       1.5.3-1xenial                   amd64        The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, hiera and mcollective.
ii  puppet-agent-oauth                 0.5.1-1                         all          OAuth Core Ruby implementation for Puppet Agent
ii  puppetlabs-release-pc1             1.0.0-2xenial                   all          Release packages for the Puppet Labs PC1 repository
ii  puppetserver                       2.4.0-1puppetlabs1              all          Puppet Labs puppetserver
ii  ruby-kafo                          0.9.1-1                         all          Ruby gem for making installations based on puppet user friendly

Here are the results of a puppet agent --test run:

root@puppet:~# puppet agent --test
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Warning: Facter: Could not process routing table entry: Expected a destination followed by key/value pairs, got 'default via <redacted> dev ens160 onlink'
Info: Caching catalog for <redacted>
Info: Applying configuration version '1470101041'
Notice: Applied catalog in 0.08 seconds

Here is /var/log/syslog (which is the same regardless of whether I include "log" in puppet.conf, leading me to believe this is not a report, but rather standard puppet logging):

Aug  1 21:25:42 puppet puppet-agent[3360]: Using configured environment 'production'
Aug  1 21:25:42 puppet puppet-agent[3360]: Retrieving pluginfacts
Aug  1 21:25:42 puppet puppet-agent[3360]: Retrieving plugin
Aug  1 21:25:42 puppet puppet-agent[3360]: Loading facts
Aug  1 21:25:43 puppet puppet-agent[3360]: (Facter) Could not process routing table entry: Expected a destination followed by key/value pairs, got 'default via <redacted> dev ens160 onlink'
Aug  1 21:25:43 puppet puppet-agent[3360]: Caching catalog for <redacted>
Aug  1 21:25:43 puppet puppet-agent[3360]: Applying configuration version '1470101143'
Aug  1 21:25:43 puppet puppet-agent[3360]: Applied catalog in 0.09 seconds
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-08-17 20:01:33 -0500

binford2k gravatar image

Sure thing. The reports key is ignored by the agent. The only thing an agent does in regards to reporting is send it to the master or not. That's what you're configuring with report = true.

Now on the master, go tell it what to do with submitted reports. In other words, move the reports = store,log,foreman line from the [agent] section on the agent node to the [master] section on the master node!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-01 20:30:25 -0500

Seen: 266 times

Last updated: Aug 17 '16