Ask Your Question

How to view compiled catalog

asked 2014-11-28 21:27:22 -0600

GeneBean gravatar image

updated 2014-11-29 08:13:49 -0600

I want to view the compiled catalog for a host that includes everything that would be applied in some easy to read format... is there a way to do this? I have not seen such a thing in Foreman, Puppet Board, or Puppet Explorer, which I find a little odd. I am running PuppetDB too in case it makes a difference. Thanks!

Edit per answer from Jonn I must be missing something as the puppet catalog command isn't telling me anything either:

[genebean@puppet ~]$ sudo puppet catalog find --render-as dot
Notice: Compiled catalog for in environment production in 0.07 seconds
digraph Puppet__Resource__Catalog {
    label = "Puppet__Resource__Catalog"
    "Class[Settings]" [
        fontsize = 8,
        label = "Class[Settings]"

    "Class[main]" [
        fontsize = 8,
        label = "Class[main]"

    "Stage[main]" [
        fontsize = 8,
        label = "Stage[main]"

    "Stage[main]" -> "Class[Settings]" [
        fontsize = 8

    "Stage[main]" -> "Class[main]" [
        fontsize = 8

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-29 04:51:39 -0600

jonn gravatar image

updated 2014-11-29 04:54:07 -0600

You can use puppet catalog find <node> to obtain a node's catalog.

You can also pass a --render-as parameter to specify an output format. If you choose --render-as dot, you'll get some output in DOT format that can be run through Graphviz to obtain a graphical representation of the catalog, which is probably the most readable option.

More info is available here.

edit flag offensive delete link more


I edited the original question but still need some help please. Thanks!

GeneBean gravatar imageGeneBean ( 2014-11-29 08:14:22 -0600 )edit

Hi - I think that is probably the output when the catalog is compiled locally. You might need to add `--terminus rest` to get it to talk to the puppetmaster - that way, you'll get to see any classes added by the ENC/console.

jonn gravatar imagejonn ( 2014-11-29 09:59:29 -0600 )edit

The terminus flag was what was needed, thanks!

GeneBean gravatar imageGeneBean ( 2014-11-30 08:17:07 -0600 )edit

As a followup, I posted a new question about viewing via the web at

GeneBean gravatar imageGeneBean ( 2014-11-30 12:59:44 -0600 )edit

For me 'puppet catalog' takes 30 seconds. Before I knew about 'puppet catalog' I wrote a quick Ruby hack which reads the cached catalog on a host. It takes less than a second:

Mark Plaksin gravatar imageMark Plaksin ( 2014-12-01 10:04:20 -0600 )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



Asked: 2014-11-28 21:27:22 -0600

Seen: 4,241 times

Last updated: Nov 29 '14