HTML Code in Alerts
list Chris Blank
I am using server custom scripts that return HTML code to the hobbit to display. One of which is bbmrtg! I upgraded Friday to the latest snapshot because of another e-mail stating that it was patched in RC2. I am still getting the following: red Sun Feb 26 03:12:35 2006 &red<A HREF="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&bars=Cami&pa ge=graph&xgtype=dwmy&xgstyle=l2&if=mrtg.10.32.3.229.mult1&xmtype=options ">Traffic Analysis for Multilink 1 Ranson to Orange:</A> In: 333800 bytes/sec (86.5%) Out: 10590 bytes/sec (2.7%) <CENTER><BR><A HREF="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&bars=Cami&pa ge=graph&xgtype=dwmy&xgstyle=l2&if=mrtg.10.32.3.229.mult1&xmtype=options "><IMG SRC="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&if=mrtg.10.32 .3.229.mult1&xgtype=d&page=image" ALT="Last 24 Hours" BORDER=0></A><BR></CENTER> <TABLE BORDER=1 ALIGN=CENTER> <TR> <TH COLSPAN=6><B>Rules</B></TH> </TR> <TR> <TD><FONT COLOR=#00eb0c><B>In</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=green><FONT COLOR=black><B>0.0% - 60.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>> 60.0%</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>> 80.0%</B></FONT></TD> </TR> <TR> <TD><FONT COLOR=#1000ff><B>Out</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=green><FONT COLOR=black><B>0.0% - 60.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>> 60.0%</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>> 80.0%</B></FONT></TD> </TR> </TABLE> <BR> How can I get the Hobbit to send everything as HTML formatted e-mails vice text? Chris Blank Network Engineer AB&C Group (XXX) XXX-XXXX x 2221
list Henrik Størner
▸
On Mon, Feb 27, 2006 at 08:58:57AM -0500, Chris Blank wrote:
I am using server custom scripts that return HTML code to the hobbit to display. One of which is bbmrtg! I upgraded Friday to the latest snapshot because of another e-mail stating that it was patched in RC2. I am still getting the following: red Sun Feb 26 03:12:35 2006 &red<A HREF="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&bars=Cami&pa
[snip]
How can I get the Hobbit to send everything as HTML formatted e-mails vice text?
For the alert message, Hobbit just includes the text that was sent to it in the status message. So if you have a custom script like bbmrtg which sends you an html formatted status, you'll get html in the alert. If you prefer to get alerts as plain text, I'd suggest that you send your alerts using an alert script - that will let you filter out any html formatting codes you'd prefer to avoid. Regards, Henrik
list Chris Blank
I am using server custom scripts that return HTML code to the hobbit for displaying. One of which is bbmrtg! I upgraded the latest snapshot
▸
because of another e-mail stating that it was patched in RC2. I am still getting the following: red Sun Feb 26 03:12:35 2006 &red<A HREF="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&bars=Cami&pa ge=graph&xgtype=dwmy&xgstyle=l2&if=mrtg.10.32.3.229.mult1&xmtype=options ">Traffic Analysis for Multilink 1 Ranson to Orange:</A> In: 333800 bytes/sec (86.5%) Out: 10590 bytes/sec (2.7%) <CENTER><BR><A HREF="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&bars=Cami&pa ge=graph&xgtype=dwmy&xgstyle=l2&if=mrtg.10.32.3.229.mult1&xmtype=options "><IMG SRC="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&if=mrtg.10.32 .3.229.mult1&xgtype=d&page=image" ALT="Last 24 Hours" BORDER=0></A><BR></CENTER> <TABLE BORDER=1 ALIGN=CENTER> <TR> <TH COLSPAN=6><B>Rules</B></TH> </TR> <TR> <TD><FONT COLOR=#00eb0c><B>In</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=green><FONT COLOR=black><B>0.0% - 60.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>> 60.0%</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>> 80.0%</B></FONT></TD> </TR> <TR> <TD><FONT COLOR=#1000ff><B>Out</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=green><FONT COLOR=black><B>0.0% - 60.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>> 60.0%</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>> 80.0%</B></FONT></TD> </TR> </TABLE> <BR> How can I get the Hobbit to send everything as HTML formatted e-mails vice text? Chris Blank Network Engineer AB&C Group (XXX) XXX-XXXX x 2221
list Thomas Seglard
Hello, I'm just writing to you to know if hobbit's clients could use one (and only one) port e.g 1984 like hobbitd ? I got several servers into DMZ and my network administrator asked me for the rules to apply in firewalls... He doesn't want to open port from DMZ to internal network (where my hobbit's server is). So, I hope a workaround exists for this because I think that clients connect to hobbit server. He would to prevent a rule like any -> 1984 or 1984 -> any... Sincerly, Thomas Seglard Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et etabli a l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, CNP Assurances et ses filiales declinent toute responsabilite au titre de ce message, s'il a ete altere, deforme ou falsifie. ***** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither CNP Assurances nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
list Robert Taylor
Chris, I don't believe that Hobbit will send HTML alerts. If you want to do this you will need to use a custom notification script for each test that provides HTML alerts. I use the following script for mine... ############################################################ # The following is an HTML alert script. Place it in your # # ext directory as -email-notification.sh. # ############################################################ sendmail="/usr/sbin/sendmail" bbserveraddress="http://<HOST NAME>" echo $BBCOLORLEVEL echo $RECOVERED echo "$BBALPHAMSG" >$BBTMP/originalmessage.$$ lines=`wc -l $BBTMP/originalmessage.$$ | awk '{print $1}'` rowtail=$(($lines -1)) rowhead=$(($lines -3)) tail -n $rowtail $BBTMP/originalmessage.$$ | head -n $rowhead > $BBTMP/temp.$$ #echo $lines echo "To: $RCPT" >$BBTMP/notification.$$ case $RECOVERED in 0) case $BBCOLORLEVEL in red) echo "Subject: Hobbit [${ACKCODE}] $BBHOSTNAME:$BBSVCNAME CRITICAL (RED)" >>$BBTMP/notification.$$ ;; yellow) echo "Subject: Hobbit [${ACKCODE}] $BBHOSTNAME:$BBSVCNAME warning (YELLOW)" >>$BBTMP/notification.$$ ;; green) echo"Subject: Hobbit [${ACKCODE}] $BBHOSTNAME:$BBSVCNAME okay (GREEN)" >>$BBTMP/notification.$$ ;; esac echo "Content-Type: text/html; charset=\"us-ascii\" <BODY BGCOLOR=\"$BBCOLORLEVEL\" BACKGROUND=\"$bbserveraddress/hobbit/gifs/bkg-$BBCOLORLEVEL.gif\" TEXT=\"#FFFFCC\" LINK=\"#00FFAA\" VLINK=\"#FFFF44\">" >>$BBTMP/notification.$$ ;; 1) echo "Subject: Hobbit $BBHOSTNAME:$BBSVCNAME recovered Content-Type: text/html; charset=\"us-ascii\" <BODY BGCOLOR=\"green\" BACKGROUND=\"$bbserveraddress/hobbit/gifs/bkg-green.gif\" TEXT=\"#FFFFCC\" LINK=\"#00FFAA\" VLINK=\"#FFFF44\">" >>$BBTMP/notification.$$ ;; esac cat $BBTMP/temp.$$ >>$BBTMP/notification.$$ echo "<center> <p>Please see: <a href=\"$bbserveraddress/hobbit-cgi/bb-hostsvc.sh?HOSTSVC=$BBHOSTSVCCOMMAS\">Service Details</a> </p> </center>" >>$BBTMP/notification.$$ $sendmail $RCPT <$BBTMP/notification.$$ rm -rf $BBTMP/*.$$ exit 1 Then put the following in your hobbit-alerts.cfg file HOST=* SERVICE=mrtg RECOVERED COLOR=red SCRIPT /home/hobbit/server/ext/html-email-notification.sh <EMAIL ADDRESS> Also, I typically put the HTML alert tests in the EXSERVICE value of my other alerts. That way it doesn't send out the text alerts and only sends out the HTML ones. I am no programmer so there may be better ways to accomplish what I did, but it works great and I am happy with it. Robert Taylor | Senior Manager of Information Systems | Hendrick Automotive Group Mobile Phone (XXX) XXX-XXXX | NC Office (XXX) XXX-XXXX | NC Fax (XXX) XXX-XXXX
▸
-----Original Message----- From: Chris Blank [mailto:user-c3bea850da25@xymon.invalid] Sent: Monday, March 06, 2006 8:39 AM To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] HTML Code in Alerts I am using server custom scripts that return HTML code to the hobbit for displaying. One of which is bbmrtg! I upgraded the latest snapshot because of another e-mail stating that it was patched in RC2. I am still getting the following: red Sun Feb 26 03:12:35 2006 &red<A HREF="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&bars=Cami&pa ge=graph&xgtype=dwmy&xgstyle=l2&if=mrtg.10.32.3.229.mult1&xmtype=options ">Traffic Analysis for Multilink 1 Ranson to Orange:</A> In: 333800 bytes/sec (86.5%) Out: 10590 bytes/sec (2.7%) <CENTER><BR><A HREF="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&bars=Cami&pa ge=graph&xgtype=dwmy&xgstyle=l2&if=mrtg.10.32.3.229.mult1&xmtype=options "><IMG SRC="http://10.32.1.48/cgi-bin/routers2.cgi?rtr=master.cfg&if=mrtg.10.32 .3.229.mult1&xgtype=d&page=image" ALT="Last 24 Hours" BORDER=0></A><BR></CENTER> <TABLE BORDER=1 ALIGN=CENTER> <TR> <TH COLSPAN=6><B>Rules</B></TH> </TR> <TR> <TD><FONT COLOR=#00eb0c><B>In</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=green><FONT COLOR=black><B>0.0% - 60.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>> 60.0%</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>> 80.0%</B></FONT></TD> </TR> <TR> <TD><FONT COLOR=#1000ff><B>Out</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>< 0.0%</B></FONT></TD> <TD BGCOLOR=green><FONT COLOR=black><B>0.0% - 60.0%</B></FONT></TD> <TD BGCOLOR=yellow><FONT COLOR=black><B>> 60.0%</B></FONT></TD> <TD BGCOLOR=red><FONT COLOR=black><B>> 80.0%</B></FONT></TD> </TR> </TABLE> <BR> How can I get the Hobbit to send everything as HTML formatted e-mails vice text? Chris Blank Network Engineer AB&C Group (XXX) XXX-XXXX x 2221
list Rob Munsch
I'll take a stab at this... You have some clients in the DMZ, and the hobbit server is on the internal network, yes? The DMZ must be on a specific subnet(s), so why couldn't the firewall be set to forward 1984 to your server from that subnet only? Instead of client -> server of <anything> -> 1984 -> hobbit server, then if frex your DMZ is 10.0.0.0/8, something like 10.0.0.0/8 -> 1984 -> hobbit server. HTH, unless i've badly misunderstood the issue.
▸
user-bb3e9041f07f@xymon.invalid wrote:
Hello, I'm just writing to you to know if hobbit's clients could use one (and only one) port e.g 1984 like hobbitd ? I got several servers into DMZ and my network administrator asked me for the rules to apply in firewalls... He doesn't want to open port from DMZ to internal network (where my hobbit's server is). So, I hope a workaround exists for this because I think that clients connect to hobbit server. He would to prevent a rule like any -> 1984 or 1984 -> any... Sincerly, Thomas Seglard Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et etabli a l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, CNP Assurances et ses filiales declinent toute responsabilite au titre de ce message, s'il a ete altere, deforme ou falsifie. ***** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither CNP Assurances nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
--
Rob Munsch
Solutions For Progress IT
list Steve Aiello
I believe you can also send hobbit server via http(port 80). Found this snippet under 'man bb': Send the same status message, but using HTTP protocol via the web- servers' bbmessage.cgi script: $ $BB http://bb.foo.com/cgi-bin/bbmessage.cgi "status www,foo,com.http green `date` Web OK" This helps if your firewall/DMZ already allows port 80 traffic.
▸
-----Original Message----- From: Rob Munsch [mailto:user-f39e4aae1456@xymon.invalid] Sent: Thursday, March 09, 2006 3:59 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] network configuration I'll take a stab at this... You have some clients in the DMZ, and the hobbit server is on the internal network, yes? The DMZ must be on a specific subnet(s), so why couldn't the firewall be set to forward 1984 to your server from that subnet only? Instead of client -> server of <anything> -> 1984 -> hobbit server, then if frex your DMZ is 10.0.0.0/8, something like 10.0.0.0/8 -> 1984 -> hobbit server. HTH, unless i've badly misunderstood the issue. user-bb3e9041f07f@xymon.invalid wrote:Hello, I'm just writing to you to know if hobbit's clients could use one (and only one) port e.g 1984 like hobbitd ? I got several servers into DMZ > and my network administrator asked me for the rules to apply in > firewalls... He doesn't want to open port from DMZ to internal network (where my > hobbit's server is). So, I hope a workaround exists for this because I > think that clients connect to hobbit server. He would to prevent a > rule like any -> 1984 or 1984 -> any... Sincerly, Thomas Seglard Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et etabli a l'intention exclusive de ses destinataires. Toute utilisation de ce message non conforme a sa destination, toute > diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, CNP > Assurances et ses filiales declinent toute responsabilite au titre de ce message, s'il a ete altere, deforme ou falsifie. ***** This message and any attachments (the "message") are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither CNP Assurances nor any of its subsidiaries or affiliates shall > be liable for the message if altered, changed or falsified.-- Rob Munsch Solutions For Progress IT