but keep the $CONTACT...$ still supported for compatibility.
fixes #4792
Name | Description
-----------------------|--------------
- CONTACTNAME | The name of the user object.
- CONTACTALIAS | The value of the display_name attribute.
- CONTACTEMAIL | This is an alias for the *email* macro.
- CONTACTPAGER | This is an alias for the *pager* macro.
+ USERNAME | The name of the user object.
+ USERDISPLAYNAME | The value of the display_name attribute.
+ USEREMAIL | This is an alias for the *email* macro.
+ USERPAGER | This is an alias for the *pager* macro.
### Global Macros
object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
command = [
"/opt/bin/send-mail-notification",
- "$CONTACTEMAIL$",
+ "$USEREMAIL$",
"$NOTIFICATIONTYPE$ - $HOSTNAME$ - $SERVICEDESC$ - $SERVICESTATE$",
{{{***** Icinga *****
bool User::ResolveMacro(const String& macro, const Dictionary::Ptr&, String *result) const
{
- if (macro == "CONTACTNAME") {
+ if (macro == "USERNAME" || macro == "CONTACTNAME") {
*result = GetName();
return true;
- } else if (macro == "CONTACTALIAS") {
+ } else if (macro == "USERDISPLAYNAME" || macro == "CONTACTALIAS") {
*result = GetDisplayName();
return true;
} else {
String tmacro;
- if (macro == "CONTACTEMAIL")
+ if (macro == "USEREMAIL" || macro == "CONTACTEMAIL")
tmacro = "email";
- else if (macro == "CONTACTPAGER")
+ else if (macro == "USERPAGER" || macro == "CONTACTPAGER")
tmacro = "pager";
else
tmacro = macro;