I'm not sure if all macros from this page are supposed to work for the email notifications, i DID get the hostalias macro to successfully give output in the email after finding it in this list,
Let me know if i'm deciphering the column incorrectly, but it says they should work for notifications
https://assets.nagios.com/downloads/nag ... stduration
Here's how i have the email config, i've reached the max for attachments, but here's the output i get in the email as text (disregard the issue that the alert is informing of):
Code: Select all
---- Respond above this line ----
***** Nagios XI Alert *****
Nagios has detected a problem with this service.
Notification Type: PROBLEM
Service: SQL Server
Host: REDACTED
Host Alias: REDACTED (this works)
Address: REDACTED
State: UNKNOWN
Info: UNKNOWN - The WMI query had problems. The error text from wmic is: [wmi/wmic.c:212:main()] ERROR: Retrieve result data.
Date/Time: 2020-01-22 15:48:25
Status Duration: %serviceduration%
Respond: REDACTED
Nagios URL: REDACTED
-----
To reply, keep the following data in your response email.
##REDACTED