From 89a06619ac93ed47219ec278c4d3c1f147833576 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 23 Jul 2022 18:35:49 +0100 Subject: Set the perf data in the message, not the name :\ --- gentoobrowse-api/service/maintenanceGitOperations.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp index a5a9ed0..ebeeb83 100644 --- a/gentoobrowse-api/service/maintenanceGitOperations.cpp +++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp @@ -185,7 +185,8 @@ namespace Gentoo::Service { return changes; } - AdHocFormatter(NagiosServiceUpdate, "GB API Package Updates|changes=%?"); + constexpr const std::string_view NagiosServiceName("GB API Package Updates"); + AdHocFormatter(NagiosServiceUpdate, "Package tree(s) updated|changes=%?"); void Maintenance::refreshPackageTree(const Ice::Current & c) { @@ -203,11 +204,10 @@ namespace Gentoo::Service { time_t now = time(nullptr); sd_notifyf(0, "STATUS=Last update %s", ctime(&now)); AdHoc::submitNagiosPassiveServiceCheck( - NagiosServiceUpdate::get(total), AdHoc::NagiosStatusCode::OK, "Package tree(s) updated"); + NagiosServiceName, AdHoc::NagiosStatusCode::OK, NagiosServiceUpdate::get(total)); } catch (const std::exception & ex) { - AdHoc::submitNagiosPassiveServiceCheck( - NagiosServiceUpdate::get(0), AdHoc::NagiosStatusCode::Warning, ex.what()); + AdHoc::submitNagiosPassiveServiceCheck(NagiosServiceName, AdHoc::NagiosStatusCode::Warning, ex.what()); throw; } } -- cgit v1.2.3