Ask Your Question
0

API query for finding unreported nodes

asked 2015-02-04 02:40:21 -0600

gorantornqvist gravatar image

I would like to run a report in bash each morning which e-mails any nodes that hasn´t reported since midnight. Similar to the page /nodes?status=unreported in Puppetboard.

Any suggestions on how to find these nodes...? Thanks...

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-02-07 13:47:29 -0600

GregLarkin gravatar image

You can query the console URL with an extra query string like so: https://<master IP>/nodes/unresponsive?format=json

That will return a JSON-formatted response with all of the nodes that the console deems unresponsive. From there, you can format and extract the node names as needed.

You might want to perform queries against PuppetDB with your own criteria, and here are some links to help you get started with that:

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: 2015-02-04 02:40:21 -0600

Seen: 602 times

Last updated: Feb 07 '15