Add metrics of the reconciliations and of the SGScript entries executions to the cluster-controller
Summary
The cluster-controller exposes the counters and the last duration of the reconciliation of the SGCluster
and of the Patroni external CDS, but not of the managed SQL reconciliation that executes the SGScript
entries, and nothing about the SGScript entries themselves. Since the metrics are registered by name
only, the label set of the second reconciliation (sgcluster-patroni) is never registered either.
Proposed solution
- Expose the total performed, the total errors and the last duration of every reconciliation of the
cluster-controller (SGCluster, Patroni external CDS and managed SQL), each with its own
resourcelabel. - Add a counter of the executions of the
SGScriptentries, and a counter of their failures, with the labelssgscript(theSGScriptname),script(the name of the entry, empty when not set) andid(the id of the entry).