html emails
html emails
is there a way to get html email notifications like the ones shown in this link http://nagios.fm4dd.com/howto/nagios-fl ... ations.htm? it doesnt appear that xi makes the /pnp4nagios accessible via apache, so should we be putting a Directory statement for /usr/local/nagios/etc/pnp/ in the nagios.conf to get this to work? Is there a different plugin that works by default with XI?
Re: html emails
Are your monitoring contacts "xi users" or "contacts only"? Other words, are they using the "default" notification handlers (xi_host_notification_handler & xi_service_notification_handler) or the "core" notification handlers (notify-host-by-email & notify-service-by-email)?
The "xi users" can modify their notification messages but "contacts only" cannot. With "xi users" you could use simle html tags in the host/service alert messages.
For example, you could have:
In the "Host Alert Message" field:
In the "xi_host_notification_handler" command:
The notesurl and action url links in the actual email notification will be "clickable".
The "xi users" can modify their notification messages but "contacts only" cannot. With "xi users" you could use simle html tags in the host/service alert messages.
For example, you could have:
In the "Host Alert Message" field:
Code: Select all
Notes URL: <a href="%notesurl%">%notesurl%</a>
Action URL: <a href="%actionurl%">%actionurl%</a>Code: Select all
--notesurl="$HOSTNOTESURL$" --actionurl="$HOSTACTIONURL$"You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: html emails
they go to team distribution lists, so they are contacts only.
Re: html emails
This won't be possible with contacts, they will need to be setup as users in order to use the HTML / add additional fields.
I'd recommend changing them, adjusting your commands as stated above, and you'll then be able to use HTML.
I'd recommend changing them, adjusting your commands as stated above, and you'll then be able to use HTML.
Former Nagios Employee
Re: html emails
It looks like you might be able to construct a URL:
You can get the ticket number by masquerading as the user you want and clicking their username in the top right corner (it's the API key).
Code: Select all
http://YOURXISERVER/nagiosxi/includes/components/perfdata/graphApi.php?host=localhost&service=PING&source=1&view=1&start=&end=&username=nagiosadmin&ticket=XXXXXXX