puppetexplorer
puppetexplorer copied to clipboard
Show nodes with failed reports in dashboards
Hello,
is there a way to show a list in the dashboard with the nodes that had a failure on the last run?
Something like the Events page ( /#/events?query=&facts=augeasversion&date_from=2014-09-27&date_to=2014-09-27&status=Failure) but on the dashboard
There is no way to create a node search for currently failing nodes until https://tickets.puppetlabs.com/browse/PDB-818 and https://tickets.puppetlabs.com/browse/PDB-814 are solved. Hopefully they can be solved until PuppetDB 2.3 though.
So it would be possible to show the number of failing nodes without those solved, but you wouldn't be able to click on that and for example view facts for those nodes.
But as soon as those issues are solved I plan to implement support for it in node-pupeptdbquery, so then you can define dashboard panels with those nodes.
Wouldn't it be convenient for the time being to just have the list of in the same way we have it in the Events page? Sort of "last 10 failing nodes" so that a user can see right away that there are issues? Even without the link to the node itself, it would be beneficial I think
Once the bugs/features are implemented we could switch it to the final implementation
On Sep 27, 2014, at 3:18 PM, Erik Dalén [email protected] wrote:
There is no way to create a node search for currently failing nodes until https://tickets.puppetlabs.com/browse/PDB-818 and https://tickets.puppetlabs.com/browse/PDB-814 are solved. Hopefully they can be solved until PuppetDB 2.3 though.
So it would be possible to show the number of failing nodes without those solved, but you wouldn't be able to click on that and for example view facts for those nodes.
But as soon as those issues are solved I plan to implement support for it in node-pupeptdbquery, so then you can define dashboard panels with those nodes.
— Reply to this email directly or view it on GitHub.
Could the reports endpoint usable for that? Especially with the field "latest_report?".
https://docs.puppetlabs.com/puppetdb/3.1/api/query/v4/reports.html
latest_report? (boolean): return only reports associated with the most recent puppet run for each node. NOTE: this field does not appear in the response.
That would look like that: http://puppetdb.puppetexplorer.io/pdb/query/v4/reports?query=["and", ["=","latest_report?","true"], ["=","status","failed"]]
I don't know how to translate this into "node puppetdb query".
@dalen The 2 tickets seem to be resolved. Are you still planning on implementing this to node-puppetdbquery?
So, technically it works now if you use something like #node.latest_report_status=failed
and running PuppetDB 3.2.0 or higher.
I think it should be documented made easier though. But for now it works even on the already released version of puppet explorer.