Monitor an Email's content
Monitor an Email's content
I have searched for this for quite some time now, and have not found an answer. My subject is mildly misleading. I do not wish to watch the members of my organisation's email with Nagios. What I would like to do is essentially grep through all of the emails that get sent from various sources to a single address stating a job has completed. Or even Nagios's emails its self stating there is a problem. Then that way instead of having hundreds of emails saying "I have completed my task with no errors" to watch for the one that says "There was an error". I can ignore all of the "No error" emails and have Nagios alert me if an email in said account has a key word, such as "error" or "failed". Then send me that email only. Thank you in advance
Re: Monitor an Email's content
I wrote a tutorial for receiving Nagios alerts via email: http://roshamboot.org/main/?p=86
You could probably take the script in my tutorial and use it as a base for creating something that will do the job you are after. The basic functionality is: you create a user for receiving emails on your Nagios server, configure procmail for this user that will execute a perl script and this perl script munges the received email and puts it into the Nagios processing queue. Hopefully this might help
You could probably take the script in my tutorial and use it as a base for creating something that will do the job you are after. The basic functionality is: you create a user for receiving emails on your Nagios server, configure procmail for this user that will execute a perl script and this perl script munges the received email and puts it into the Nagios processing queue. Hopefully this might help
Re: Monitor an Email's content
I'm not a programmer, I have written some shell and VBS scripts, but nothing high level. I had just hoped someone had already done this.
Re: Monitor an Email's content
Unfortunately I think this is probably about as close to some one already having done this as you are likely to get. The script changes necessary aren't as scary as they sound, even duplicating it in shell wouldn't be too hard if you feel more comfortable with that.
You could even use my solution without changing anything if you can change the format of the emails being sent.
But if this still sounds untenable then maybe some one else around here has had to solve the exact same problem in the exact same way, though it isn't likely
You could even use my solution without changing anything if you can change the format of the emails being sent.
But if this still sounds untenable then maybe some one else around here has had to solve the exact same problem in the exact same way, though it isn't likely