mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-13 08:44:36 +02:00
parent
7e10a2bc5d
commit
ad77709c07
@ -235,18 +235,18 @@ bool Host::ResolveMacro(const String& macro, const CheckResult::Ptr&, String *re
|
|||||||
} else if (macro == "duration_sec") {
|
} else if (macro == "duration_sec") {
|
||||||
*result = Convert::ToString((long)(Utility::GetTime() - GetLastStateChange()));
|
*result = Convert::ToString((long)(Utility::GetTime() - GetLastStateChange()));
|
||||||
return true;
|
return true;
|
||||||
} else if (macro == "total_services" || macro == "total_services_ok" || macro == "total_services_warning"
|
} else if (macro == "num_services" || macro == "num_services_ok" || macro == "num_services_warning"
|
||||||
|| macro == "total_services_unknown" || macro == "total_services_critical") {
|
|| macro == "num_services_unknown" || macro == "num_services_critical") {
|
||||||
int filter = -1;
|
int filter = -1;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if (macro == "total_services_ok")
|
if (macro == "num_services_ok")
|
||||||
filter = ServiceOK;
|
filter = ServiceOK;
|
||||||
else if (macro == "total_services_warning")
|
else if (macro == "num_services_warning")
|
||||||
filter = ServiceWarning;
|
filter = ServiceWarning;
|
||||||
else if (macro == "total_services_unknown")
|
else if (macro == "num_services_unknown")
|
||||||
filter = ServiceUnknown;
|
filter = ServiceUnknown;
|
||||||
else if (macro == "total_services_critical")
|
else if (macro == "num_services_critical")
|
||||||
filter = ServiceCritical;
|
filter = ServiceCritical;
|
||||||
|
|
||||||
BOOST_FOREACH(const Service::Ptr& service, GetServices()) {
|
BOOST_FOREACH(const Service::Ptr& service, GetServices()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user