From 0c819631314661909e3e139541c4344cfe00a87d Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Thu, 1 Sep 2022 07:07:13 +0200 Subject: [PATCH] fix: Make monitoring build Signed-off-by: Julien Riou --- monitoring.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitoring.go b/monitoring.go index 014ad5d..a59a62e 100644 --- a/monitoring.go +++ b/monitoring.go @@ -83,7 +83,7 @@ func Monitor(db *gorm.DB, warningTimeout int, criticalTimeout int) (rc int) { } // Compare to thresholds and add to result map - result := MonitoringResult{ShopName: shop.Name, UpdatedAt: product.UpdatedAt, ReturnCode: NAGIOS_OK} + result := MonitoringResult{ShopName: shop.Name, UpdatedAt: product.UpdatedAt, ReturnCode: NagiosOk} if product.UpdatedAt.Before(criticalTime) { log.Infof("%s has been updated at %s (before time of %s) (crit)", shop.Name, product.UpdatedAt, criticalTime) result.ReturnCode = NagiosCritical @@ -107,7 +107,7 @@ func Monitor(db *gorm.DB, warningTimeout int, criticalTimeout int) (rc int) { prefix = "CRIT" message = FormatMonitoringResults(resultMap[NagiosCritical]) } else { - rc = NagiosOK + rc = NagiosOk prefix = "OK" message = "All shops have been updated recently" }