Puppet failed run: How to find?

57 views
Skip to first unread message

kaustubh chaudhari

unread,
Jan 17, 2014, 2:35:15 AM1/17/14
to puppet...@googlegroups.com
Hi All,

How can i find all the failed puppet run in last 30 days!

In dash board i can see if the agent run is failing, but if it has recovered it will be green again.

Practically it not possible to see the Daily run status and look for a red mark if i have 3000 servers.

Is there a way i can see all the failed reports for last 30 days!

Kaustubh

Jason Antman

unread,
Jan 17, 2014, 7:14:29 AM1/17/14
to puppet...@googlegroups.com
Kaustubh,

There are many, many ways to do this. Perhaps you could tell us what
version of Puppet you're running? By "dash board" I assume you mean the
open source Puppet Dashboard? Or are you running Puppet Enterprise?

The best way that I could tell you to do this is by using a custom
report processor, or by pulling the data out of the Puppet Dashboard
database (or PuppetDB, which will make this even easier). For
information on how to do that, see docs.puppetlabs.com.

-Jason
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/c4d6aca5-4ed8-4f31-91bb-a9a47b0a788b%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

kaustubh chaudhari

unread,
Jan 17, 2014, 7:20:47 AM1/17/14
to puppet...@googlegroups.com
Hey Jason,

Thanks for the email!

Yes i am using Open Source Puppet! 3.3.2 and dashboard version 1.2.23.

I would appreciate if you can redirect me or share a link regarding the options that you mentioned.

-Kaustubh

Jason Antman

unread,
Jan 17, 2014, 7:33:11 AM1/17/14
to puppet...@googlegroups.com
Kaustubh,

The *easiest* method would be to use PuppetDB, but until a feature
request (https://tickets.puppetlabs.com/browse/PDB-16) is finished, it
only stores successful reports, not failed ones. Hopefully that ticket
will get closed soon, but it would probably be at least weeks until it
gets released.

If you're comfortable with it, you can hook into the Puppet Dashboard
database to pull out the information you want. I don't think there are
any real documents about it, because the database isn't really intended
to be used by anything other than Dashboard itself. But the schema is
pretty stable. You should be able to just connect to MySQL as the same
user that Dashboard uses and find what you need - the schema is pretty
straightforward. If you need a rough example, you can take a look at a
Nagios check I wrote that uses the Dashboard DB
(https://github.com/jantman/nagios-scripts/blob/master/check_puppet_dashboard_node.pl)
though it may be for an older version of Dashboard, so some things may
have changed.

The last thing you could do, which is probably the most time consuming,
is to implement your own custom report processor in Ruby to do whatever
you want with the reports. Documentation on this can be found in the
Reporting Guide, at http://docs.puppetlabs.com/guides/reporting.html

-Jason
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/8ead04a4-d72c-47a3-8b4a-31ec7b4fd25a%40googlegroups.com.

kaustubh chaudhari

unread,
Jan 17, 2014, 8:14:45 AM1/17/14
to puppet...@googlegroups.com
Thanks Jason,

This is useful info! going through it now!

Thanks again!

-Kaustubh
Reply all
Reply to author
Forward
0 new messages