What i’d like to do is add a hyperlink in the nagios email notifications so that the hostname of the server with a problem is a link that brings up that host in nagios. How can i get sendmail to parse html code? Currently it sends all code as text and doesnt create the link.
Try creating the mail as HTML. You need to alter your content type etc in the header… After much trial and error I ended up with the following command object to send html mail (it’s for my high priority servers and it also sets the high priority flag) which you should be able to adapt… works OK for us outlook/exchange anyhow.
erk… well it works for me on 3.0.3, I can only assume some problem with the way 2.3 is interpreting the command. I seem to remember having many fun and games working out what characters to ‘escape’ in nagios to get it working compared to the line that would run from the shell without any problem, maybe your issue lies somewhere within needing to escape some of the quote characters as well. First though I would try and send a simple test message from the shell and get something working that way then try and crowbar it back into nagios… Otherwise, you could set up some sort of external shell script to create the email and point the command object to pass through your variables to that.