urlize - how to prevent from use in notifications?

Tedman Eng teng at dataway.com
Sat Nov 29 06:48:17 CET 2003


That WAS a serious reply.  It is the method I use in my shop.

The original Nagios munged output you get probably looks something like
this:
A HREF=/nagios/cgi-bin/cgi.cgi?host=somehost: CPU:80 /A

Edit your mail notification command to format however you want, without
<A..../A> tags if your mail reader strips tags.  Do this by inserting a few
sed  or cut commands in there to make $OUTPUT$ look like this:

<A HREF=/nagios/cgi-bin/cgi.cgi?host=somehost> CPU:80 </A>

or this:
CPU:80

A simplified notify-by-email example using the "cut" method:
printf '$SERVICEDESC$ is $SERVICESTATE$ on host $HOSTALIAS$\n\nMore
info:`echo $OUTPUT$ | cut " " -f 3` | /usr/bin/mail $CONTACTEMAIL$'

HTH,
Tedman


"Joe Rhett" <jrhett at isite.net> wrote in message
news:20031129000548.GA2802 at isite.net...
> They are stripped from $OUTPUT$ by Nagios, not by my commands.
>
> Also, no mail readers will create a link from an anchor tag in the middle
of
> a plain text message.  It just won't work.
>
> Serious replies?
>
> On Thu, Nov 27, 2003 at 08:28:40PM -0800, Tedman Eng wrote:
> > Edit the email notification command to put the (< > & and other) bad
shell
> > characters back into the original email, so that the readers of the
email
> > can click the link from within email also.
> >
> > "Joe Rhett" <jrhett at isite.net> wrote in message
> > news:20031127234432.GA5804 at isite.net...
> > > I've got urlize working just fine for the web interface, but this has
an
> > > unintended side effect of putting HTML into the e-mail notifications.
> > > (with < > & and other bad shell characters stripped out naturally)
> > >
> > > Before I go digging into the code to determine how to split up the web
and
> > > notification output, has someone already solved this problem?
> > >
> > > -- 
> > > Joe Rhett                                                      Chief
Geek
> > > JRhett at Isite.Net                                      Isite Services,
Inc.
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > Does SourceForge.net help you be more productive?  Does it
> > > help you create better code?  SHARE THE LOVE, and help us help
> > > YOU!  Click Here: http://sourceforge.net/donate/
> > > _______________________________________________
> > > Nagios-users mailing list
> > > Nagios-users at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > > ::: Please include Nagios version, plugin version (-v) and OS when
> > reporting any issue.
> > > ::: Messages without supporting info will risk being sent to /dev/null
> > >
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > Does SourceForge.net help you be more productive?  Does it
> > help you create better code?  SHARE THE LOVE, and help us help
> > YOU!  Click Here: http://sourceforge.net/donate/
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
> > ::: Messages without supporting info will risk being sent to /dev/null
>
> -- 
> Joe Rhett                                                      Chief Geek
> JRhett at Isite.Net                                      Isite Services, Inc.
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> Does SourceForge.net help you be more productive?  Does it
> help you create better code?  SHARE THE LOVE, and help us help
> YOU!  Click Here: http://sourceforge.net/donate/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list