Log when attempting to push metrics to gateway
This commit is contained in:
parent
7b313b8f9b
commit
4b16dea34e
2
main.go
2
main.go
@ -258,6 +258,8 @@ func runSpecifiedJobs(jobs []Job, backupJobs, restoreJobs, unlockJobs, snapshot
|
|||||||
|
|
||||||
func maybePushMetrics(metricsPushGateway string) error {
|
func maybePushMetrics(metricsPushGateway string) error {
|
||||||
if metricsPushGateway != "" {
|
if metricsPushGateway != "" {
|
||||||
|
fmt.Println("Pushing metrics to push gateway")
|
||||||
|
|
||||||
if err := Metrics.PushToGateway(metricsPushGateway); err != nil {
|
if err := Metrics.PushToGateway(metricsPushGateway); err != nil {
|
||||||
return fmt.Errorf("Failed pushing metrics after jobs run: %w", err)
|
return fmt.Errorf("Failed pushing metrics after jobs run: %w", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user