Hi All; I am using the PuppetDD 1.3 docs. I am attempting to run the following query: curl -H ''Accept: application/json'' -X GET http://localhost:8080/v2/resources--data-urlencode query@db_look Contents of db_look: ["=", "certname", "puppet-satellite"] However, I get no results with this... I also do not get an errors I do see this in the log file (as indicated by the docs) 2013-05-24 19:17:26,464 INFO [command-proc-46] [puppetdb.command] [140d6911-3d86-483c-9c00-3e637fc13ea8] [replace catalog] puppet-satellite But, I am also getting the error.... 2013-05-24 19:17:34,325 WARN [qtp17805761-41] [server.AbstractHttpConnection] /v2/resources com.fasterxml.jackson.core.JsonParseException: Unexpected character (''#'' (code 35)): expected a valid value (number, String, array, object, ''true'', ''false'' or ''null'') Any advice would be greatly appreciated! Bee -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Actually, I am getting no results.. [ ] I assume this means that facts are not being stored but, I cannot figure out why/how to troubleshoot... Thanks! On Fri, May 24, 2013 at 7:23 PM, Worker Bee <beeworker08@gmail.com> wrote:> Hi All; > > I am using the PuppetDD 1.3 docs. I am attempting to run the following > query: > > curl -H ''Accept: application/json'' -X GET > http://localhost:8080/v2/resources --data-urlencode query@db_look > > Contents of db_look: > ["=", "certname", "puppet-satellite"] > > However, I get no results with this... I also do not get an errors > > I do see this in the log file (as indicated by the docs) > > 2013-05-24 19:17:26,464 INFO [command-proc-46] [puppetdb.command] > [140d6911-3d86-483c-9c00-3e637fc13ea8] [replace catalog] puppet-satellite > > But, I am also getting the error.... > 2013-05-24 19:17:34,325 WARN [qtp17805761-41] > [server.AbstractHttpConnection] /v2/resources > com.fasterxml.jackson.core.JsonParseException: Unexpected character (''#'' > (code 35)): expected a valid value (number, String, array, object, ''true'', > ''false'' or ''null'') > > > Any advice would be greatly appreciated! > > Bee >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Deepak Giridharagopal
2013-May-28 15:41 UTC
Re: [Puppet Users] Re: PuppetDb Query Help/Problems
On Fri, May 24, 2013 at 5:27 PM, Worker Bee <beeworker08@gmail.com> wrote:> Actually, I am getting no results.. > > [ ] > > I assume this means that facts are not being stored but, I cannot figure > out why/how to troubleshoot... >FWIW, if you want to find all the facts for a node you can just hit "/v2/nodes/myhost.mydomain.com/facts" instead of hitting "/v2/resources" + a query. There are a bunch of other routes like this that you may find nicer to use: http://docs.puppetlabs.com/puppetdb/1.3/api/query/v2/nodes.html As for why you got no results, do you see anything in the logs about "replace facts" commands? If you aren''t seeing any of those, then that means that your puppetmasters aren''t sending over facts, just catalogs. Did you follow the instructions here: http://docs.puppetlabs.com/puppetdb/1.3/connect_puppet_master.html#edit-routesyaml That should add the correct settings to routes.yaml that lets the puppetmaster know to send its facts to puppetdb (you''ll need to restart your puppetmaster for those changes to take effect).> > Thanks! > > > On Fri, May 24, 2013 at 7:23 PM, Worker Bee <beeworker08@gmail.com> wrote: > >> Hi All; >> >> I am using the PuppetDD 1.3 docs. I am attempting to run the following >> query: >> >> curl -H ''Accept: application/json'' -X GET >> http://localhost:8080/v2/resources --data-urlencode query@db_look >> >> Contents of db_look: >> ["=", "certname", "puppet-satellite"] >> >> However, I get no results with this... I also do not get an errors >> >> I do see this in the log file (as indicated by the docs) >> >> 2013-05-24 19:17:26,464 INFO [command-proc-46] [puppetdb.command] >> [140d6911-3d86-483c-9c00-3e637fc13ea8] [replace catalog] puppet-satellite >> >> But, I am also getting the error.... >> 2013-05-24 19:17:34,325 WARN [qtp17805761-41] >> [server.AbstractHttpConnection] /v2/resources >> com.fasterxml.jackson.core.JsonParseException: Unexpected character (''#'' >> (code 35)): expected a valid value (number, String, array, object, ''true'', >> ''false'' or ''null'') >> >> >> Any advice would be greatly appreciated! >> >> Bee >> > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.