Ask Your Question
0

How to identify and/or configure the reports directory for puppet server 2.1 ?

asked 2015-10-07 17:53:39 -0500

JohnsonEarls gravatar image

My puppet server (running puppetserver-2.1.1) recently ran out of space, and I discovered it's because /opt/puppetlabs/server/data/puppetserver/reports was filling the disk up.

The current puppet documentation, when talking about reports, mentions the configuration option reportdir - but that configuration setting points to /opt/puppetlabs/puppet/cache/reports, which I assume is the proper directory if you're running puppet master. The puppet documentation makes no reference to how to configure the reports settings for puppet server.

Two related questions:

  1. How can I configure the reports destination for puppet server 2.1.1?
  2. How can a puppet module running within the puppet agent determine the reports destination for the puppet server?

Thanks in advance,
— Johnson

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2015-10-08 08:58:23 -0500

cprice404 gravatar image

There are a few settings that can get a little confusing between Puppet Server's configuration and puppet.conf. Generally speaking, settings that are based on 'confdir' and 'vardir' are the most common ones because the best practice is to set values for those directly in the puppetserver.conf file, but the agent and other 'puppet' CLI commands will not have access to those settings.

If you look at the docs here:

https://docs.puppetlabs.com/reference...

You can see that the default value for 'reportdir' is built by concatenating 'reports' onto the value of '$vardir', which is most likely set in your puppetserver.conf file. If you provide an explicit value for 'reportdir' in your puppet.conf, though, that should be honored.

As for your second question - I presume you're asking about determining this value from the agent running on the same node as puppet server? If so, we have some room for improvement there - we intend to add some command line tools in the not-too-distant future that give you a way to interrogate the settings of puppet server, but we don't quite have those yet. What you could do for now is to use the ruby-hocon gem to read the data from puppetserver.conf into memory:

require 'hocon'
vardir = Hocon.parse('/etc/puppetlabs/puppetserver/conf.d/puppetserver.conf')["jruby-puppet"]["master-var-dir"]
reportdir = "#{vardir}/reports"

Definitely feel free to file a bug report if there are specific things you need from a future CLI tool around puppet server's settings, though, because we would like to make this sort of thing easier.

edit flag offensive delete link more

Comments

Thank you. It looks like, from a puppet manifest, `$settings::vardir` and `$settings::reportdir` both actually get properly populated.

JohnsonEarls gravatar imageJohnsonEarls ( 2015-10-08 16:23:48 -0500 )edit

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: 2015-10-07 17:53:39 -0500

Seen: 235 times

Last updated: Oct 08 '15