[hobbit] Mail Format?

Stef Coene stef.coene at docum.org
Thu Jun 3 15:58:21 CEST 2010


On Thursday 03 June 2010, Neil Franken wrote:
> Hi Guys
> 
> Just some quick questions.
> 
> 1) If a mail alert contains some html is there a way to make sure it
> comes through as proper markup i.e. HEADER1 instead of <h1>HEADER1</h1>
> 2) If I don't want to include the alert/test results i.e. &red cpu 100%
> in the mail is there a way to do that?
I created an alerting.pl perl script that picks up the parameters.  In that 
script I use lynx to remove the html code:
               
                  open (TEMP,">/tmp/TEMP") ;
                  print TEMP "$_\n" foreach @split ;
                  close TEMP ;
                  `links -dump /tmp/TEMP > /tmp/TEMP2` ;
               
                  open (TEMP,"</tmp/TEMP2") ;
                  while (<TEMP>) { $mail{MES} .= $_; }
                  close TEMP ;

If you want more control, create a scripts (shell or perl) and do the alerting 
yourself.


Stef

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the Xymon mailing list