Ask Your Question
0

puppetdb query not working

asked 2016-12-09 13:16:19 -0500

updated 2017-01-31 15:36:31 -0500

Request:

 curl -X GET http://puppet:8080/pdb/query/v4/resources

 curl -X POST http://puppet:8080/pdb/query/v4/resources -H   'Content-Type: application/json' -d '{"query":["and",["=","type","Class"],["=","title","reponame"]]}'

Response:

[]

I wonder why puppetdb querying is not working. Any thoughts?

puppet and puppetdb are in the same server. The puppetdb dashboard comes back ok and the postgres backend setup is done. Puppetdb setup is done using the doc provided in the docs.puppet.com.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-12 07:48:26 -0500

natemccurdy gravatar image

Try capitalizing the name of the class:

Reponame

And if there are multiple segments in the name, capitalize each:

Reponame::Foo::Bar

This is needed because all classes are stored with a capital first letter. If you try a query that shows all classes, you'll see what I mean.

edit flag offensive delete link more

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: 2016-12-09 13:16:19 -0500

Seen: 22 times

Last updated: Dec 12 '16