On Friday, January 23, 2015 at 5:04:54 AM UTC-8, Nick Howes wrote:
>
> On Tuesday, 20 January 2015 20:00:14 UTC, JonY wrote:
>
> I'm hoping to use this library (or something similar) to request a single 
>> fact from all nodes. The equiv curl request would be 'curl -X GET 
>> http://host:8080/v3/facts --data-urlencode 
>> 'query=["=","name","fs_space"]'.
>>
>> I've been looking at the docs on '
>> https://github.com/puppetlabs/puppetdb-ruby' but I can't seem to get the 
>> syntax correct for this type of request. Suggestions?
>>
>
>
> It'll look like this:
>
> response = client.request(
>   'facts',
>   [:'=', 'name', 'fs_space']
> )
>
> nodes = response.data 
>
>
> The response data will be an array of hashes - each hash containing the 
> node's "certname" and the "name" and "value" of its fact.
>


Tried that - got this error:

/usr/local/lib/ruby/gems/2.1.0/gems/puppetdb-ruby-0.0.1/lib/puppetdb/client.rb:79:in
 
`raise_if_error': PuppetDB::APIError (PuppetDB::APIError)
        from 
/usr/local/lib/ruby/gems/2.1.0/gems/puppetdb-ruby-0.0.1/lib/puppetdb/client.rb:101:in
 
`request'
        from ./check.rb:8:in `<main>'
 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c02ab0cb-445c-4e84-ac75-d83ce7447eae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to