Is there an API for retrieving node state?

30 views
Skip to first unread message

Boris Modylevsky

unread,
May 25, 2015, 1:10:39 PM5/25/15
to puppet...@googlegroups.com
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:

Thanks,
Boris

jcbollinger

unread,
May 26, 2015, 9:02:41 AM5/26/15
to puppet...@googlegroups.com
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 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 to retrieve the latest facts recorded for the machine of interest.


John

Reply all
Reply to author
Forward
0 new messages