Brian Gerard wrote:
Hi all-
Hello,
I'm about to start a project that goes a little something like this...
Right now, alerts get automatically emailed to a central address which due to the volume is largely ignored. You know the drill: "Ooo! It would be great if we got notified when resource X is running low! Then we could anticipate the need for it and get ahead of the game." Repeat for resources A-Z, AA-ZZ, etc, etc and you get a mailbox that quickly becomes filled with alerts that no one reads, largely due to the fact that the reading alone would be a full time job. We can receive anywhere from a couple of hundred to a couple of thousand of these per day.
So I'm planning to set up the address to forward to a backline server, where my Brilliantly Written(tm) perl script will crunch said alerts. I'd like it to chop them up into little bits and insert the bits into an intelligently-structured database of some sort. I'm planning on Postgres at this point.
Then there will be another script, available to the proper people via an internal website, where queries can be made against the database according to a yet-to-be-designed web interface. The main thing I want is a simplification of the alert viewing. So you might see "3245 instances of alert Y", which could be drilled down into based on various criteria, rather than the first page (out of 65) of 50 alerts all of the same type. Statistical trending and other such pie-chart-able things may show up in the future, but not for now.
So my questions are these:
1) Does this sound like a reasonable approach to the problem, given the relatively low amount of detail I've provided? Anyone dealt with this type of thing before and have any gotchas for me?
2) From what I've read, Postgres beats MySQL performance-wise, which is why I
Where'd you read that, postgres.org ? :)
chose it, but IANADBA. Any votes on a free DB to use for this? Obviously, it
MySQL is my .02 :) its always been there for me and soem quite hefty assignments..
needs to have a perl interface or CPAN module available. Regardless of which DB you like, what's your favorite module for interacting with it? ...and, umm, if you could point me to any "Getting Started" docs, that would be just lovely. <:)
3) Which module would you suggest for parsing email? There are a few of them out there, and I really don't have the time to try each one out until I find the one I like the best. :)
I'm a little bit away from a module that has an nice email parsing function.
It uses Mail::Internet underneath but take its a step further by simplifying the calling and returning other useful values like a plain text version and an attachement-less version (text or multipart with HTML)
It works like this:
my %email = emailhash(\*STDIN);
$email{FROM} $email{SUBJECT}
etc..
The only thing left is to parse the attachements into a nice hashref that can be used with the internal mailing function.
That might be for version 2 :) Other than that its quite handy..
Watch for SimpleMood.pm :) Odd name, easy to use and handy (I hope ;p)
Answers to any or all of the above gratefully received!
HTH
Lee.M - JupiterHost.Net
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>