urlize - how to prevent from use in notifications?
Joe Rhett
jrhett at isite.net
Tue Dec 9 02:53:50 CET 2003
Look, I'm really not sure why you are misreading me yet again, but
seriously -- I wasn't asking for advice. I was asking if anyone had
already written code to solve this problem.
It's not personal, it's just not the question I asked. I asked about code,
not workarounds.
On Tue, Dec 02, 2003 at 06:17:45PM -0800, Tedman Eng wrote:
> I'm sorry I couldn't help you 'hack' nagios to do what you want.
> I offered what works for me. No need to flame.
>
> Advice is free -- you get what you pay for.
> -Tedman
>
>
> "Joe Rhett" <jrhett at isite.net> wrote in message
> news:20031202014919.GA26763 at isite.net...
> > > That WAS a serious reply. It is the method I use in my shop.
> >
> > No, it wasn't a serious reply. It's a hack that doesn't solve the general
> > problem, only a single instance. A bandaid isn't a "serious" response to
> a
> > sword wound. It may stem the bleeding long enough to get to the hospital,
> > but you're still going to die.
> >
> > The problem isn't how to mangle output for e-mail notification, the
> > problem is that HTML-ized output is only useful for one output. Hacking
> > the input at 1 place and then hacking the output at N places where N
> equals
> > the total number of output mechanisms is wasteful.
> >
> > The generalized problem is that NO output EXCEPT for the web interface
> > wants urlized output. The database shouldn't be storing URLs that
> > must be decoded before use. These URLs will also suddenly become invalid
> > after an interface change, or an IP address change or anything else.
> >
> > The HTML-modified output should be done closer to the web interface, not
> > altering the input mechanism.
> >
> > As stated in my original post: (which was quoted but apparently ignored)
> > > Before I go digging into the code to determine how to split up the web
> > > and notification output, has someone already solved this problem?
> >
> > The apparent solution (without having finished review of the code) is that
> > the URLize syntax should be stored as another attribute, and performed by
> > the web interface prior to output. The data is stored in raw form, and
> > formated appropriated for the web output. (or any other output mechanism
> > that requests urlized output)
> >
> > That is a serious response. A quick fix isn't a serious response.
> >
> > On Fri, Nov 28, 2003 at 09:48:17PM -0800, Tedman Eng wrote:
> > > 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
> >
> > --
> > 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
More information about the Users
mailing list