diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index 27f069d02..246fa44aa 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -541,11 +541,11 @@ String Host::StateToString(HostState state) bool Host::ResolveMacro(const String& macro, const Dictionary::Ptr&, String *result) const { - if (macro == "HOSTNAME" || macro == "HOSTALIAS") { + if (macro == "HOSTNAME") { *result = GetName(); return true; } - else if (macro == "HOSTDISPLAYNAME") { + else if (macro == "HOSTDISPLAYNAME" || macro == "HOSTALIAS") { *result = GetDisplayName(); return true; } diff --git a/lib/icinga/user.cpp b/lib/icinga/user.cpp index 53e297670..c4ce9291f 100644 --- a/lib/icinga/user.cpp +++ b/lib/icinga/user.cpp @@ -103,7 +103,7 @@ bool User::ResolveMacro(const String& macro, const Dictionary::Ptr& cr, String * *result = GetName(); return true; } else if (macro == "CONTACTALIAS") { - *result = GetName(); + *result = GetDisplayName(); return true; } else { Dictionary::Ptr macros = GetMacros();