Ask Your Question
0

How do you browse/troubleshoot exported resources in PuppetDB?

asked 2017-02-09 17:20:10 -0500

Rob Ogilvie gravatar image

I'm exporting several resources to PuppetDB (@@resource) and am not finding an easy means by which to look at the resources I exported.

How best do you accomplish this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-10 07:21:37 -0500

ggun gravatar image

Execute below curl command to fetch data from Puppetdb server

curl -X GET https://<puppetdbserver>:8081/pdb/query/v4 \ --cert $(puppet config print hostcert) \ --key $(puppet config print hostprivkey) \ --cacert $(puppet config print cacert) \ --data-urlencode 'query=resources[certname, type, title, parameters] { exported = true }' > exported2.json

Json should return you resources those are exported

Or use below curl -X GET https://<masterservername>:8081/pdb/query/v4 --cert $(puppet config print hostcert) --key $(puppet config print hostprivkey) --cacert $(puppet config print cacert) --data-urlencode 'query=resources[certname, type, title, parameters] { exported = true and type = "Test::ABC"}' > exported.json

Test::ABC - is the resource name

edit flag offensive delete link more

Comments

I only receive the text "Not Found" (no trailing line break)

Rob Ogilvie gravatar imageRob Ogilvie ( 2017-02-10 12:57:44 -0500 )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

1 follower

Stats

Asked: 2017-02-09 17:20:10 -0500

Seen: 33 times

Last updated: Feb 10