[Puppet Users] Issues with reporting to foreman under puppet-server 0.25.4 (installed from Epel)

Matt actually has the older version (the diff between them is SSL support).

can you check your puppet master logs? does it say something like processing
report for foreman ?

does your clients have the report=true option?

Ohad

··· On Fri, Mar 5, 2010 at 7:53 PM, Matthew Macdonald-Wallace < mattmacwall@gmail.com> wrote:

Um, yeah, so that’s completely different to what I’ve got… :frowning:

I’ll get a copy of that script and install it now.

On 5 March 2010 10:38, Matt mattmoran76@gmail.com wrote:

On 5 March 2010 10:11, Matthew Macdonald-Wallace mattmacwall@gmail.com > > wrote:

I’ve had a thought about this overnight (my brain seems to work better
when I’m asleep!)

Is there a newer version of the foreman.rb report intended for use
with puppetmaster 0.25.x?

I know the config.ru changed for the RACK application, I’m wondering
if I need to make further changes.

Are you running Foreman 0.1.3? My foreman.rb on a x86_64 box is in :-
/usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb
And consists of:-
$foreman_url="http://your.foreman.url"
require 'puppet’
require 'net/http’
require 'uri’
Puppet::Reports.register_report(:foreman) do
Puppet.settings.use(:reporting)
desc "Sends reports directly to Foreman"
def process
begin

Net::HTTP.post_form(URI.parse("#{$foreman_url}/reports/create?format=yml"),

{‘report’=> to_yaml})
rescue Exception => e
raise Puppet::Error, "Could not send report to Foreman: #{e}"
end
end
end

/etc/puppet/puppet.conf
[puppetmasterd]
reports=log, foreman


You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.compuppet-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.compuppet-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.

Hi Ohad,

So I am using the newest script already, or do I need to replace it
with the one sent by mattmoran?

The "report=true" is set on all clients, however I don't see anything
in the logs about preparing the report for foreman.

Kind regards,

Matt

··· On 5 March 2010 12:01, Ohad Levy wrote: > Matt actually has the older version (the diff between them is SSL support). > can you check your puppet master logs? does it say something like processing > report for foreman ? > does your clients have the report=true option? > Ohad > On Fri, Mar 5, 2010 at 7:53 PM, Matthew Macdonald-Wallace > wrote: >> >> Um, yeah, so that's completely different to what I've got... :( >> >> I'll get a copy of that script and install it now. >> >> On 5 March 2010 10:38, Matt wrote: >> > On 5 March 2010 10:11, Matthew Macdonald-Wallace >> > wrote: >> >> >> >> I've had a thought about this overnight (my brain seems to work better >> >> when I'm asleep!) >> >> >> >> Is there a newer version of the foreman.rb report intended for use >> >> with puppetmaster 0.25.x? >> >> >> >> I know the config.ru changed for the RACK application, I'm wondering >> >> if I need to make further changes. >> > >> > Are you running Foreman 0.1.3? My foreman.rb on a x86_64 box is in :- >> > /usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb >> > And consists of:- >> > $foreman_url="http://your.foreman.url" >> > require 'puppet' >> > require 'net/http' >> > require 'uri' >> > Puppet::Reports.register_report(:foreman) do >> > Puppet.settings.use(:reporting) >> > desc "Sends reports directly to Foreman" >> > def process >> > begin >> > >> > >> > Net::HTTP.post_form(URI.parse("#{$foreman_url}/reports/create?format=yml"), >> > {'report'=> to_yaml}) >> > rescue Exception => e >> > raise Puppet::Error, "Could not send report to Foreman: #{e}" >> > end >> > end >> > end >> > >> > /etc/puppet/puppet.conf >> > [puppetmasterd] >> > reports=log, foreman >> > >> > >> > -- >> > You received this message because you are subscribed to the Google >> > Groups >> > "Puppet Users" group. >> > To post to this group, send email to puppet-users@googlegroups.com. >> > To unsubscribe from this group, send email to >> > puppet-users+unsubscribe@googlegroups.com. >> > For more options, visit this group at >> > http://groups.google.com/group/puppet-users?hl=en. >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to > foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en. >

Could this be the issue:

You cannot collect exported resources without storeconfigs being set;
the collection will be ignored on line 3 in file
/etc/puppet/manifests/classes/munin-server.pp

Would that prevent the reports from being generated?

It seems odd that we are getting this message as "storeconfigs" is set
on the server. Does it need to be configured on the client as well?

M.

··· On 5 March 2010 12:04, Matthew Macdonald-Wallace wrote: > Hi Ohad, > > So I am using the newest script already, or do I need to replace it > with the one sent by mattmoran? > > The "report=true" is set on all clients, however I don't see anything > in the logs about preparing the report for foreman. > > Kind regards, > > Matt > > On 5 March 2010 12:01, Ohad Levy wrote: >> Matt actually has the older version (the diff between them is SSL support). >> can you check your puppet master logs? does it say something like processing >> report for foreman ? >> does your clients have the report=true option? >> Ohad >> On Fri, Mar 5, 2010 at 7:53 PM, Matthew Macdonald-Wallace >> wrote: >>> >>> Um, yeah, so that's completely different to what I've got... :( >>> >>> I'll get a copy of that script and install it now. >>> >>> On 5 March 2010 10:38, Matt wrote: >>> > On 5 March 2010 10:11, Matthew Macdonald-Wallace >>> > wrote: >>> >> >>> >> I've had a thought about this overnight (my brain seems to work better >>> >> when I'm asleep!) >>> >> >>> >> Is there a newer version of the foreman.rb report intended for use >>> >> with puppetmaster 0.25.x? >>> >> >>> >> I know the config.ru changed for the RACK application, I'm wondering >>> >> if I need to make further changes. >>> > >>> > Are you running Foreman 0.1.3? My foreman.rb on a x86_64 box is in :- >>> > /usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb >>> > And consists of:- >>> > $foreman_url="http://your.foreman.url" >>> > require 'puppet' >>> > require 'net/http' >>> > require 'uri' >>> > Puppet::Reports.register_report(:foreman) do >>> > Puppet.settings.use(:reporting) >>> > desc "Sends reports directly to Foreman" >>> > def process >>> > begin >>> > >>> > >>> > Net::HTTP.post_form(URI.parse("#{$foreman_url}/reports/create?format=yml"), >>> > {'report'=> to_yaml}) >>> > rescue Exception => e >>> > raise Puppet::Error, "Could not send report to Foreman: #{e}" >>> > end >>> > end >>> > end >>> > >>> > /etc/puppet/puppet.conf >>> > [puppetmasterd] >>> > reports=log, foreman >>> > >>> > >>> > -- >>> > You received this message because you are subscribed to the Google >>> > Groups >>> > "Puppet Users" group. >>> > To post to this group, send email to puppet-users@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> > puppet-users+unsubscribe@googlegroups.com. >>> > For more options, visit this group at >>> > http://groups.google.com/group/puppet-users?hl=en. >>> > >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users+unsubscribe@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To post to this group, send email to foreman-users@googlegroups.com. >> To unsubscribe from this group, send email to >> foreman-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/foreman-users?hl=en. >> >

please paste your /etc/puppet/puppet.conf and the location of your tagmail
report , e.g. rpm -ql puppet-server |grep tagmail

cheers,
Ohad

··· On Fri, Mar 5, 2010 at 8:04 PM, Matthew Macdonald-Wallace < mattmacwall@gmail.com> wrote:

Hi Ohad,

So I am using the newest script already, or do I need to replace it
with the one sent by mattmoran?

The “report=true” is set on all clients, however I don’t see anything
in the logs about preparing the report for foreman.

Kind regards,

Matt

On 5 March 2010 12:01, Ohad Levy ohadlevy@gmail.com wrote:

Matt actually has the older version (the diff between them is SSL
support).
can you check your puppet master logs? does it say something like
processing
report for foreman ?
does your clients have the report=true option?
Ohad
On Fri, Mar 5, 2010 at 7:53 PM, Matthew Macdonald-Wallace > > mattmacwall@gmail.com wrote:

Um, yeah, so that’s completely different to what I’ve got… :frowning:

I’ll get a copy of that script and install it now.

On 5 March 2010 10:38, Matt mattmoran76@gmail.com wrote:

On 5 March 2010 10:11, Matthew Macdonald-Wallace < > mattmacwall@gmail.com> > >> > wrote:

I’ve had a thought about this overnight (my brain seems to work
better

when I’m asleep!)

Is there a newer version of the foreman.rb report intended for use
with puppetmaster 0.25.x?

I know the config.ru changed for the RACK application, I’m wondering
if I need to make further changes.

Are you running Foreman 0.1.3? My foreman.rb on a x86_64 box is in :-
/usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb
And consists of:-
$foreman_url="http://your.foreman.url"
require 'puppet’
require 'net/http’
require 'uri’
Puppet::Reports.register_report(:foreman) do
Puppet.settings.use(:reporting)
desc "Sends reports directly to Foreman"
def process
begin

Net::HTTP.post_form(URI.parse("#{$foreman_url}/reports/create?format=yml"),

{‘report’=> to_yaml})
rescue Exception => e
raise Puppet::Error, "Could not send report to Foreman: #{e}"
end
end
end

/etc/puppet/puppet.conf
[puppetmasterd]
reports=log, foreman


You received this message because you are subscribed to the Google
Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.compuppet-users%2Bunsubscribe@googlegroups.com
.

For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.


You received this message because you are subscribed to the Google
Groups

“Puppet Users” group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.compuppet-users%2Bunsubscribe@googlegroups.com
.

For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Puppet.conf:

[main]
# Where Puppet stores dynamic and growing data.
# The default value is '/var/puppet'.
vardir = /var/lib/puppet

# The Puppet log directory.
# The default value is &#39;$vardir/log&#39;.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is &#39;$vardir/run&#39;.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is &#39;$confdir/ssl&#39;.
ssldir = $vardir/ssl

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

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

Puppetmasterd.conf:

[main]
# Where Puppet stores dynamic and growing data.
# The default value is '/var/puppet'.
vardir = /var/lib/puppet

# The Puppet log directory.
# The default value is &#39;$vardir/log&#39;.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is &#39;$vardir/run&#39;.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is &#39;$confdir/ssl&#39;.
ssldir = $vardir/ssl

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

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

[puppetmasterd]
reports = log,foreman

storeconfigs = true
dbadapter = mysql
dbuser = puppet
dbpassword = ****************
dbserver = mysql.server.domain

Tagmail report:

the command supplied does not return any data.

Kind regards,

Matt

thats your problem, puppet 0.25x uses only /etc/puppet/puppet.conf, move all
of the puppetmasterd.conf to the puppetmaster section

try something like this:

cat /etc/puppet/puppet.conf
Puppet.conf:

[main]

Where Puppet stores dynamic and growing data.

The default value is '/var/puppet'.

vardir = /var/lib/puppet

The Puppet log directory.

The default value is '$vardir/log'.

logdir = /var/log/puppet

Where Puppet PID files are kept.

The default value is '$vardir/run'.

rundir = /var/run/puppet

Where SSL certificates are kept.

The default value is '$confdir/ssl'.

ssldir = $vardir/ssl

[puppetd]

The file in which puppetd stores a list of the classes

associated with the retrieved configuratiion. Can be loaded in

the separate puppet executable using the --loadclasses

option.

The default value is '$confdir/classes.txt'.

classfile = $vardir/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

[puppetmasterd]
reports = log,foreman

storeconfigs = true
dbadapter = mysql
dbuser = puppet
dbpassword = ****************
dbserver = mysql.server.domain

··· On Fri, Mar 5, 2010 at 9:32 PM, Matthew Macdonald-Wallace < mattmacwall@gmail.com> wrote:

Puppet.conf:

[main]

Where Puppet stores dynamic and growing data.

The default value is ‘/var/puppet’.

vardir = /var/lib/puppet

The Puppet log directory.

The default value is ‘$vardir/log’.

logdir = /var/log/puppet

Where Puppet PID files are kept.

The default value is ‘$vardir/run’.

rundir = /var/run/puppet

Where SSL certificates are kept.

The default value is ‘$confdir/ssl’.

ssldir = $vardir/ssl

[puppetd]

The file in which puppetd stores a list of the classes

associated with the retrieved configuratiion. Can be loaded in

the separate puppet executable using the --loadclasses

option.

The default value is ‘$confdir/classes.txt’.

classfile = $vardir/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

Puppetmasterd.conf:

[main]

Where Puppet stores dynamic and growing data.

The default value is ‘/var/puppet’.

vardir = /var/lib/puppet

The Puppet log directory.

The default value is ‘$vardir/log’.

logdir = /var/log/puppet

Where Puppet PID files are kept.

The default value is ‘$vardir/run’.

rundir = /var/run/puppet

Where SSL certificates are kept.

The default value is ‘$confdir/ssl’.

ssldir = $vardir/ssl

[puppetd]

The file in which puppetd stores a list of the classes

associated with the retrieved configuratiion. Can be loaded in

the separate puppet executable using the --loadclasses

option.

The default value is ‘$confdir/classes.txt’.

classfile = $vardir/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

[puppetmasterd]
reports = log,foreman

storeconfigs = true
dbadapter = mysql
dbuser = puppet
dbpassword = ****************
dbserver = mysql.server.domain

Tagmail report:

the command supplied does not return any data.

Kind regards,

Matt


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.comforeman-users%2Bunsubscribe@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

works a treat. Thanks.

/me feels kind foolish…

··· On 5 March 2010 13:39, Ohad Levy wrote: > thats your problem, puppet 0.25x uses only /etc/puppet/puppet.conf, move all > of the puppetmasterd.conf to the puppetmaster section > try something like this: > cat /etc/puppet/puppet.conf > Puppet.conf: > > [main] > # Where Puppet stores dynamic and growing data. > # The default value is '/var/puppet'. > vardir = /var/lib/puppet > > # The Puppet log directory. > # The default value is '$vardir/log'. > logdir = /var/log/puppet > > # Where Puppet PID files are kept. > # The default value is '$vardir/run'. > rundir = /var/run/puppet > > # Where SSL certificates are kept. > # The default value is '$confdir/ssl'. > ssldir = $vardir/ssl > > [puppetd] > # The file in which puppetd stores a list of the classes > # associated with the retrieved configuratiion. Can be loaded in > # the separate ``puppet`` executable using the ``--loadclasses`` > # option. > # The default value is '$confdir/classes.txt'. > classfile = $vardir/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 > > [puppetmasterd] > reports = log,foreman > > storeconfigs = true > dbadapter = mysql > dbuser = puppet > dbpassword = **************** > dbserver = mysql.server.domain > > > On Fri, Mar 5, 2010 at 9:32 PM, Matthew Macdonald-Wallace > wrote: >> >> Puppet.conf: >> >> [main] >> # Where Puppet stores dynamic and growing data. >> # The default value is '/var/puppet'. >> vardir = /var/lib/puppet >> >> # The Puppet log directory. >> # The default value is '$vardir/log'. >> logdir = /var/log/puppet >> >> # Where Puppet PID files are kept. >> # The default value is '$vardir/run'. >> rundir = /var/run/puppet >> >> # Where SSL certificates are kept. >> # The default value is '$confdir/ssl'. >> ssldir = $vardir/ssl >> >> [puppetd] >> # The file in which puppetd stores a list of the classes >> # associated with the retrieved configuratiion. Can be loaded in >> # the separate ``puppet`` executable using the ``--loadclasses`` >> # option. >> # The default value is '$confdir/classes.txt'. >> classfile = $vardir/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 >> >> Puppetmasterd.conf: >> >> [main] >> # Where Puppet stores dynamic and growing data. >> # The default value is '/var/puppet'. >> vardir = /var/lib/puppet >> >> # The Puppet log directory. >> # The default value is '$vardir/log'. >> logdir = /var/log/puppet >> >> # Where Puppet PID files are kept. >> # The default value is '$vardir/run'. >> rundir = /var/run/puppet >> >> # Where SSL certificates are kept. >> # The default value is '$confdir/ssl'. >> ssldir = $vardir/ssl >> >> [puppetd] >> # The file in which puppetd stores a list of the classes >> # associated with the retrieved configuratiion. Can be loaded in >> # the separate ``puppet`` executable using the ``--loadclasses`` >> # option. >> # The default value is '$confdir/classes.txt'. >> classfile = $vardir/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 >> >> [puppetmasterd] >> reports = log,foreman >> >> storeconfigs = true >> dbadapter = mysql >> dbuser = puppet >> dbpassword = **************** >> dbserver = mysql.server.domain >> >> >> Tagmail report: >> >> the command supplied does not return any data. >> >> Kind regards, >> >> Matt >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To post to this group, send email to foreman-users@googlegroups.com. >> To unsubscribe from this group, send email to >> foreman-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/foreman-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to > foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en. >