On Monday, May 25, 2015 at 12:10:39 PM UTC-5, Boris Modylevsky wrote:
>
> I would like to retrieve a status of a node to know what is its state. 
>
> I read this documentation, but could not find it:
> http://docs.puppetlabs.com/puppet/4.1/reference/http_api/http_catalog.html
>
>

The master can never tell you the current state of any node, but it can 
tell you the state reported by that node when it last made a catalog 
request, in the form of the reported node facts.  That would involve a node 
query 
<http://docs.puppetlabs.com/puppet/4.1/reference/http_api/http_node.html> 
instead the catalog query to which you linked.  The docs are rather vague 
on what exactly the result of a request to that API will be, though.

You could also consider opening up access to PuppetDB's HTTP API, which is 
a bit more clearly defined.  You can then issue a facts query 
<http://docs.puppetlabs.com/puppetdb/2.3/api/query/v3/facts.html> to 
retrieve the latest facts recorded for the machine of interest.


John

-- 
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/e1f9d4a7-f611-4f5d-8bee-95c30c4ee82e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to