puppet node report

116 views
Skip to first unread message

hai wu

unread,
Jun 28, 2012, 4:04:46 AM6/28/12
to puppet...@googlegroups.com
Is there a way to download latest node report log from puppet dashboard?

Tim Mooney

unread,
Jun 29, 2012, 6:02:06 PM6/29/12
to puppet...@googlegroups.com
In regard to: [Puppet Users] puppet node report, hai wu said (at 3:04am on...:

> Is there a way to download latest node report log from puppet dashboard?

There's a way to do just about anything, but before you write some
complicated web screen-scraping code to get the report from the web
interface of dashboard, consider just enabling additional report backends
and instead pulling the data from there.

There was a very good blog post about "when puppet reports" a few weeks
ago, check it out for more information on other reporting backends that
are available and how you might go about developing your own (perhaps
one for a database). See

http://puppetlabs.com/blog/when-puppet-reports-part-1/

Note also there's a part 2 that you'll want to check out.

The most straightforward method would probably be to enable the yaml
backend and just pull the data from there.

Tim
--
Tim Mooney Tim.M...@ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

hai wu

unread,
Jun 29, 2012, 10:35:56 PM6/29/12
to puppet...@googlegroups.com
Thanks Tim.

The problem is if you have multiple puppetmaster servers with
different Puppet[:reportdir] on different local drives, thus for each
node report yaml file, you would have to go to each puppetmaster
server to retrieve the latest report file for that node, which is not
ideal, as the copy is already stored in puppet dashboard, the problem
is puppet dashboard would purge the file right away after loading it
into database, and there's no way to retrieve that via API.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

Ohad Levy

unread,
Jun 30, 2012, 2:35:54 AM6/30/12
to puppet...@googlegroups.com
On Sat, Jun 30, 2012 at 5:35 AM, hai wu <haiw...@gmail.com> wrote:
Thanks Tim.

The problem is if you have multiple puppetmaster servers with
different Puppet[:reportdir] on different local drives, thus for each
node report yaml file, you would have to go to each puppetmaster
server to retrieve the latest report file for that node, which is not
ideal, as the copy is already stored in puppet dashboard, the problem
is puppet dashboard would purge the file right away after loading it
into database, and there's no way to retrieve that via API.

If you would consider using Foreman [1], there is a very simple api to consume that state, e.g.


A lot of people use that along side with monitoring tools (such as nagios) to generate alerts etc.

cheers,
Ohad

Ohad Levy

unread,
Jun 30, 2012, 2:36:28 AM6/30/12
to puppet...@googlegroups.com
On Sat, Jun 30, 2012 at 9:35 AM, Ohad Levy <ohad...@gmail.com> wrote:


On Sat, Jun 30, 2012 at 5:35 AM, hai wu <haiw...@gmail.com> wrote:
Thanks Tim.

The problem is if you have multiple puppetmaster servers with
different Puppet[:reportdir] on different local drives, thus for each
node report yaml file, you would have to go to each puppetmaster
server to retrieve the latest report file for that node, which is not
ideal, as the copy is already stored in puppet dashboard, the problem
is puppet dashboard would purge the file right away after loading it
into database, and there's no way to retrieve that via API.

If you would consider using Foreman [1], there is a very simple api to consume that state, e.g.

and of course, [1] is http://theforeman.org 

hai wu

unread,
Jun 30, 2012, 4:42:47 PM6/30/12
to puppet...@googlegroups.com
This is good to know. It seems foreman has its own report plugin
script (foreman.rb), so it should not be a problem if I use both at
the same time for reporting purposes. Puppet dashboard uses reporturl,
as long as foreman would keep its current plugin (reports = foreman),
there should be no conflict of using both, correct? It seems foreman
has a new feature using reporturl, I won't be able to use that as
reporturl is currently pointing to puppet dashboard ..

Ohad Levy

unread,
Jul 1, 2012, 1:53:13 AM7/1/12
to puppet...@googlegroups.com
On Sat, Jun 30, 2012 at 11:42 PM, hai wu <haiw...@gmail.com> wrote:
This is good to know. It seems foreman has its own report plugin
script (foreman.rb), so it should not be a problem if I use both at
the same time for reporting purposes. Puppet dashboard uses reporturl,
as long as foreman would keep its current plugin (reports = foreman),
there should be no conflict of using both, correct? It seems foreman
has a new feature using reporturl, I won't be able to use that as
reporturl is currently pointing to puppet dashboard ..

yeah, it doesn't really matter, you can use either of them regardless.

Ohad 
Reply all
Reply to author
Forward
0 new messages