Xymon Mailing List Archive search

Web page to subscribe to Hobbit email alerts

3 messages in this thread

list Shawn Maschino · Wed, 9 Nov 2005 16:46:04 -0500 ·
            Hello follow Hobbit admins (hobmins?).  I'm fairly new to
the list but have been running Hobbit for a while now.  I've had a
request come to me to put a web page together to let people register for
getting Hobbit email alerts.  It would just need to allow someone to
select a server (or servers), the tests they want alerts for, and then
enter their email address.  When they submit the form it would
automatically add a line in hobbit-alerts.cfg so they would get the
alerts.  

 
It wouldn't need to be anything fancy, or support unsubscribing to
alerts (although that would be nice). Before I tried my hand at hacking
together something to do this I thought I'd check if anyone here has
something already since it seemed like this probably has come up for
someone before.  I took a look at the code for the Enable/Disable alerts
cgi page and thought I may be able to use that as a starting point, but
if anyone here has already done something like this and wouldn't mind
sharing it would be appreciated.  Thanks!

 
Shawn Maschino 
Technical Services - Server Operations
GE Plastics
user-518eb92a87d3@xymon.invalid
list Jeff Stoner · Thu, 10 Nov 2005 21:42:18 -0500 ·
On Wed, 2005-11-09 at 16:46 -0500, Maschino, Shawn (GE Advanced 
quoted from Shawn Maschino
            Hello follow Hobbit admins (hobmins?).  I’m fairly new to
the list but have been running Hobbit for a while now.  I’ve had a
request come to me to put a web page together to let people register
for getting Hobbit email alerts.  It would just need to allow someone
to select a server (or servers), the tests they want alerts for, and
then enter their email address.  When they submit the form it would
automatically add a line in hobbit-alerts.cfg so they would get the
alerts.  
It would probably be much easier to manage this through your mailer than
with Hobbit. A couple thoughts:

- have script edit the /etc/mail/aliases (or whatever your mail handling
program uses)
- set up a user account, configure procmail with that account then have
your script modify that

Considerations:

1. The first approach above would possibly require root privs somewhere
along the line (either modifying the file or rebuilding the aliases
database) Again, this depends entirely on your mail handling software.

2. Approach number 2 helps isolate failures with malformed email
addresses to the procmail facility. When Hobbit gets an alert, it will
never be adversely affected by a bad email address. Procmail might so
you need to be careful writing the .procmailrc file.

3. Editing the hobbit-alerts.cfg directly from a cgi script leaves you
vulnerable. People screw up. If they screw up bad enough, they could
really futz up your alerting which would be a really Bad Thing(tm) all
around. Avoid doing this if possible, especially when you may not know
who is utilizing your system.

A better solution would be to use a listserv. There are several mailing
list software packages out there that can be employed...which would
provide:

- possibly a web interface already exists for people to
subscribe/unsucscribe (why reinvent the wheel?)
- the ability to make a moderated list so people couldn't spam everyone
else unnecessarily (think: Out of Office notices or bounce messages)
- archiving of the alerts for auditing purposes
- more clear division between alerting by Hobbit and mail handling by
the list software

Choose your fate.

-- 
--Jeff
"Go to Jail. Do not pass Go. Do not collect $200."
list Shawn Maschino · Mon, 21 Nov 2005 09:52:37 -0500 ·
	Thanks Jeff, I didn't think of those alternatives.  They could
work out better, and be easier to set up, I'm all up for that!
quoted from Jeff Stoner

-----Original Message-----
From: Jeff Stoner [mailto:user-e519abf6e436@xymon.invalid] 
Sent: Thursday, November 10, 2005 9:42 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] Web page to subscribe to Hobbit email alerts

On Wed, 2005-11-09 at 16:46 -0500, Maschino, Shawn (GE Advanced 
            Hello follow Hobbit admins (hobmins?).  I'm fairly new to
the list but have been running Hobbit for a while now.  I've had a
request come to me to put a web page together to let people register
for getting Hobbit email alerts.  It would just need to allow someone
to select a server (or servers), the tests they want alerts for, and
then enter their email address.  When they submit the form it would
automatically add a line in hobbit-alerts.cfg so they would get the
alerts.  
It would probably be much easier to manage this through your mailer than
with Hobbit. A couple thoughts:

- have script edit the /etc/mail/aliases (or whatever your mail handling
program uses)
- set up a user account, configure procmail with that account then have
your script modify that

Considerations:

1. The first approach above would possibly require root privs somewhere
along the line (either modifying the file or rebuilding the aliases
database) Again, this depends entirely on your mail handling software.

2. Approach number 2 helps isolate failures with malformed email
addresses to the procmail facility. When Hobbit gets an alert, it will
never be adversely affected by a bad email address. Procmail might so
you need to be careful writing the .procmailrc file.

3. Editing the hobbit-alerts.cfg directly from a cgi script leaves you
vulnerable. People screw up. If they screw up bad enough, they could
really futz up your alerting which would be a really Bad Thing(tm) all
around. Avoid doing this if possible, especially when you may not know
who is utilizing your system.

A better solution would be to use a listserv. There are several mailing
list software packages out there that can be employed...which would
provide:

- possibly a web interface already exists for people to
subscribe/unsucscribe (why reinvent the wheel?)
- the ability to make a moderated list so people couldn't spam everyone
else unnecessarily (think: Out of Office notices or bounce messages)
- archiving of the alerts for auditing purposes
- more clear division between alerting by Hobbit and mail handling by
the list software

Choose your fate.

-- 
--Jeff
"Go to Jail. Do not pass Go. Do not collect $200."