I don't receive reports in foreman

Good afternoon!

I'm struggling to make the foreman read the reports, already read many
tutorials, and also other discussions here, but still can not work.

I'll show how this environment:

Puppet.conf of puppetmaster:

[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
factpath = $vardir/lib/facter
templatedir = $confdir/templates
pluginsync = true
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
reportdir = /var/lib/puppet/reports
autosign = true
modulepath=/etc/puppet/modules

[agent]
report = true
ignorecache = true

[master]
reports = foreman, http, store, log
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
reportdir = /var/lib/puppet/reports
storeconfigs = true
dbadapter = mysql
dbuser = puppet
dbpassword = puppet
dbname = puppet
dbserver = localhost
dbsocket = /var/lib/mysql/mysql.sock
modulepath=/etc/puppet/modules
rrddir=/var/lib/puppet/rrd
rrdinterval=$runinterval
rrdgraph=true

And my puppet.conf of my clients:

[main]
# 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
report = true

[agent]
# 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/localconfigi
runinterval = 14400
report = true
server = server.domain.com.br

I took a look at my log and it has no entry for this parameter
"ReportsController#upload"

it is my foreman.rb

$foreman_url="https://172.16.3.19:443"

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
    uri = URI.parse($foreman_url)
    http = Net::HTTP.new(uri.host, uri.port)
    if uri.scheme == 'https' then
      http.use_ssl = true
      http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    end
    req = Net::HTTP::Post.new("/reports/create?format=yml")
    req.set_form_data({'report' => to_yaml})
    response = http.request(req)
  rescue Exception => e
    raise Puppet::Error, "Could not send report to Foreman at

#{$foreman_url}/reports/create?format=yml: #{e}"
end
end
end

foreman.rb the file has to be on clients too?

I wonder what's wrong in my installation?

Tks

[]'s

> Good afternoon!
>
> I'm struggling to make the foreman read the reports, already read many
> tutorials, and also other discussions here, but still can not work.
>
> I'll show how this environment:
>
> Puppet.conf of puppetmaster:
>
>
> [main]
> logdir = /var/log/puppet
> rundir = /var/run/puppet
> ssldir = $vardir/ssl
> factpath = $vardir/lib/facter
> templatedir = $confdir/templates
> pluginsync = true
> classfile = $vardir/classes.txt
> localconfig = $vardir/localconfig
> reportdir = /var/lib/puppet/reports
> autosign = true
> modulepath=/etc/puppet/modules
>
> [agent]
> report = true
> ignorecache = true
>
> [master]
> reports = foreman, http, store, log
> ssl_client_header = SSL_CLIENT_S_DN
> ssl_client_verify_header = SSL_CLIENT_VERIFY
> reportdir = /var/lib/puppet/reports
> storeconfigs = true
> dbadapter = mysql
> dbuser = puppet
> dbpassword = puppet
> dbname = puppet
> dbserver = localhost
> dbsocket = /var/lib/mysql/mysql.sock
> modulepath=/etc/puppet/modules
> rrddir=/var/lib/puppet/rrd
> rrdinterval=$runinterval
> rrdgraph=true
>
> And my puppet.conf of my clients:
>
>
> [main]
> # 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
> report = true
>
> [agent]
> # 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/localconfigi
> runinterval = 14400
> report = true
> server = server.domain.com.br
>
> I took a look at my log and it has no entry for this parameter
> "ReportsController#upload"
>
> it is my foreman.rb
>
> $foreman_url="https://172.16.3.19:443"
>
> 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
> uri = URI.parse($foreman_url)
> http = Net::HTTP.new(uri.host, uri.port)
> if uri.scheme == 'https' then
> http.use_ssl = true
> http.verify_mode = OpenSSL::SSL::VERIFY_NONE
> end
> req = Net::HTTP::Post.new("/reports/create?format=yml")
> req.set_form_data({'report' => to_yaml})
> response = http.request(req)
> rescue Exception => e
> raise Puppet::Error, "Could not send report to Foreman at
> #{$foreman_url}/reports/create?format=yml: #{e}"
> end
> end
> end
>
> foreman.rb the file has to be on clients too?
>
> No, just in the puppetmaster.

> I wonder what's wrong in my installation?
>

Where do you placed your foreman.rb script?

··· On Tue, Feb 14, 2012 at 1:47 PM, Douglas Brancaglion < dbrancaglion@conviso.com.br> wrote:

Tks

[]'s


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.


Tony
http://blog.tonyskapunk.net

Tks for reply.

i 'm placed foreman.rb in /usr/lib/ruby/site_ruby/1.8/puppet/reports/
foreman.rb

any idea?

tks

[]'s

··· > > dbrancagl...@conviso.com.br> wrote: > > Good afternoon! > > > I'm struggling to make the foreman read the reports, already read many > > tutorials, and also other discussions here, but still can not work. > > > I'll show how this environment: > > > Puppet.conf of puppetmaster: > > > [main] > > logdir = /var/log/puppet > > rundir = /var/run/puppet > > ssldir = $vardir/ssl > > factpath = $vardir/lib/facter > > templatedir = $confdir/templates > > pluginsync = true > > classfile = $vardir/classes.txt > > localconfig = $vardir/localconfig > > reportdir = /var/lib/puppet/reports > > autosign = true > > modulepath=/etc/puppet/modules > > > [agent] > > report = true > > ignorecache = true > > > [master] > > reports = foreman, http, store, log > > ssl_client_header = SSL_CLIENT_S_DN > > ssl_client_verify_header = SSL_CLIENT_VERIFY > > reportdir = /var/lib/puppet/reports > > storeconfigs = true > > dbadapter = mysql > > dbuser = puppet > > dbpassword = puppet > > dbname = puppet > > dbserver = localhost > > dbsocket = /var/lib/mysql/mysql.sock > > modulepath=/etc/puppet/modules > > rrddir=/var/lib/puppet/rrd > > rrdinterval=$runinterval > > rrdgraph=true > > > And my puppet.conf of my clients: > > > [main] > > # 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 > > report = true > > > [agent] > > # 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/localconfigi > > runinterval = 14400 > > report = true > > server = server.domain.com.br > > > I took a look at my log and it has no entry for this parameter > > "ReportsController#upload" > > > it is my foreman.rb > > > $foreman_url="https://172.16.3.19:443" > > > 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 > > uri = URI.parse($foreman_url) > > http = Net::HTTP.new(uri.host, uri.port) > > if uri.scheme == 'https' then > > http.use_ssl = true > > http.verify_mode = OpenSSL::SSL::VERIFY_NONE > > end > > req = Net::HTTP::Post.new("/reports/create?format=yml") > > req.set_form_data({'report' => to_yaml}) > > response = http.request(req) > > rescue Exception => e > > raise Puppet::Error, "Could not send report to Foreman at > > #{$foreman_url}/reports/create?format=yml: #{e}" > > end > > end > > end > > > foreman.rb the file has to be on clients too? > > > No, just in the puppetmaster. > > I wonder what's wrong in my installation? > > Where do you placed your foreman.rb script? > > > > > Tks > > > []'s > > > -- > > 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. > > -- > Tonyhttp://blog.tonyskapunk.net- Ocultar texto das mensagens anteriores - > > - Mostrar texto das mensagens anteriores -

this looks like a typo:

The default value is '$confdir/localconfig'.

localconfig = $vardir/localconfigi

-Josh

··· On Feb 14, 2:09 pm, Douglas Brancaglion wrote: > Tks for reply. > > i 'm placed foreman.rb in /usr/lib/ruby/site_ruby/1.8/puppet/reports/ > foreman.rb > > any idea? > > tks > > []'s > > > > > > > > > > > dbrancagl...@conviso.com.br> wrote: > > > Good afternoon! > > > > I'm struggling to make the foreman read the reports, already read many > > > tutorials, and also other discussions here, but still can not work. > > > > I'll show how this environment: > > > > Puppet.conf of puppetmaster: > > > > [main] > > > logdir = /var/log/puppet > > > rundir = /var/run/puppet > > > ssldir = $vardir/ssl > > > factpath = $vardir/lib/facter > > > templatedir = $confdir/templates > > > pluginsync = true > > > classfile = $vardir/classes.txt > > > localconfig = $vardir/localconfig > > > reportdir = /var/lib/puppet/reports > > > autosign = true > > > modulepath=/etc/puppet/modules > > > > [agent] > > > report = true > > > ignorecache = true > > > > [master] > > > reports = foreman, http, store, log > > > ssl_client_header = SSL_CLIENT_S_DN > > > ssl_client_verify_header = SSL_CLIENT_VERIFY > > > reportdir = /var/lib/puppet/reports > > > storeconfigs = true > > > dbadapter = mysql > > > dbuser = puppet > > > dbpassword = puppet > > > dbname = puppet > > > dbserver = localhost > > > dbsocket = /var/lib/mysql/mysql.sock > > > modulepath=/etc/puppet/modules > > > rrddir=/var/lib/puppet/rrd > > > rrdinterval=$runinterval > > > rrdgraph=true > > > > And my puppet.conf of my clients: > > > > [main] > > > # 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 > > > report = true > > > > [agent] > > > # 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/localconfigi > > > runinterval = 14400 > > > report = true > > > server = server.domain.com.br > > > > I took a look at my log and it has no entry for this parameter > > > "ReportsController#upload" > > > > it is my foreman.rb > > > > $foreman_url="https://172.16.3.19:443" > > > > 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 > > > uri = URI.parse($foreman_url) > > > http = Net::HTTP.new(uri.host, uri.port) > > > if uri.scheme == 'https' then > > > http.use_ssl = true > > > http.verify_mode = OpenSSL::SSL::VERIFY_NONE > > > end > > > req = Net::HTTP::Post.new("/reports/create?format=yml") > > > req.set_form_data({'report' => to_yaml}) > > > response = http.request(req) > > > rescue Exception => e > > > raise Puppet::Error, "Could not send report to Foreman at > > > #{$foreman_url}/reports/create?format=yml: #{e}" > > > end > > > end > > > end > > > > foreman.rb the file has to be on clients too? > > > > No, just in the puppetmaster. > > > I wonder what's wrong in my installation? > > > Where do you placed your foreman.rb script? > > > > Tks > > > > []'s > > > > -- > > > 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. > > > -- > > Tonyhttp://blog.tonyskapunk.net-Ocultar texto das mensagens anteriores - > > > - Mostrar texto das mensagens anteriores -

in my installation is correct $vardir/localconfig, but i don't see
"localconfig.yaml" and "classes.txt" in my server it is random?

Tks

··· On Feb 14, 9:50 pm, Josh Vaughn wrote: > this looks like a typo: > > # The default value is '$confdir/localconfig'. > localconfig = $vardir/localconfigi > > -Josh > > On Feb 14, 2:09 pm, Douglas Brancaglion > wrote: > > > > > > > > > Tks for reply. > > > i 'm placed foreman.rb in /usr/lib/ruby/site_ruby/1.8/puppet/reports/ > > foreman.rb > > > any idea? > > > tks > > > []'s > > > > dbrancagl...@conviso.com.br> wrote: > > > > Good afternoon! > > > > > I'm struggling to make the foreman read the reports, already read many > > > > tutorials, and also other discussions here, but still can not work. > > > > > I'll show how this environment: > > > > > Puppet.conf of puppetmaster: > > > > > [main] > > > > logdir = /var/log/puppet > > > > rundir = /var/run/puppet > > > > ssldir = $vardir/ssl > > > > factpath = $vardir/lib/facter > > > > templatedir = $confdir/templates > > > > pluginsync = true > > > > classfile = $vardir/classes.txt > > > > localconfig = $vardir/localconfig > > > > reportdir = /var/lib/puppet/reports > > > > autosign = true > > > > modulepath=/etc/puppet/modules > > > > > [agent] > > > > report = true > > > > ignorecache = true > > > > > [master] > > > > reports = foreman, http, store, log > > > > ssl_client_header = SSL_CLIENT_S_DN > > > > ssl_client_verify_header = SSL_CLIENT_VERIFY > > > > reportdir = /var/lib/puppet/reports > > > > storeconfigs = true > > > > dbadapter = mysql > > > > dbuser = puppet > > > > dbpassword = puppet > > > > dbname = puppet > > > > dbserver = localhost > > > > dbsocket = /var/lib/mysql/mysql.sock > > > > modulepath=/etc/puppet/modules > > > > rrddir=/var/lib/puppet/rrd > > > > rrdinterval=$runinterval > > > > rrdgraph=true > > > > > And my puppet.conf of my clients: > > > > > [main] > > > > # 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 > > > > report = true > > > > > [agent] > > > > # 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/localconfigi > > > > runinterval = 14400 > > > > report = true > > > > server = server.domain.com.br > > > > > I took a look at my log and it has no entry for this parameter > > > > "ReportsController#upload" > > > > > it is my foreman.rb > > > > > $foreman_url="https://172.16.3.19:443" > > > > > 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 > > > > uri = URI.parse($foreman_url) > > > > http = Net::HTTP.new(uri.host, uri.port) > > > > if uri.scheme == 'https' then > > > > http.use_ssl = true > > > > http.verify_mode = OpenSSL::SSL::VERIFY_NONE > > > > end > > > > req = Net::HTTP::Post.new("/reports/create?format=yml") > > > > req.set_form_data({'report' => to_yaml}) > > > > response = http.request(req) > > > > rescue Exception => e > > > > raise Puppet::Error, "Could not send report to Foreman at > > > > #{$foreman_url}/reports/create?format=yml: #{e}" > > > > end > > > > end > > > > end > > > > > foreman.rb the file has to be on clients too? > > > > > No, just in the puppetmaster. > > > > I wonder what's wrong in my installation? > > > > Where do you placed your foreman.rb script? > > > > > Tks > > > > > []'s > > > > > -- > > > > 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. > > > > -- > > > Tonyhttp://blog.tonyskapunk.net-Ocultartexto das mensagens anteriores - > > > > - Mostrar texto das mensagens anteriores -