How to fetch email, parse it and create an alert

Hello,
This is my first post here. :slight_smile: I was a Nagios Core user and looking into deploying Icinga instead.
I need to evaluate possibility to react on an email. In our Java application we have an exception handling that sends out an email. It is a Springboot application written in Camel.
Do you please know any plugin that would fetch that email from an Exchange sever and parse it ?
For the Java application monitoring I plan to use Jmx4Perl …
Thank you,
Radovan

I would be a lot easier, if you forward the mail to the Icinga server and check the right file there then.
Alternatively, is IMAP/POP3 enabled on the Exchange server? I would be managble to write a script to fetch Mail then.

Thank you for suggestions. I have not realized I could forward emails to icinga server. We are in Proof Of Concept phase.

Well, I assume, that the machine is a “normal” linux which could easily run a mail server. Install postfix or exim (to name two of the most popular pieces of software in the area and configure them to accept mails.

I know sendmail better than any other MTA, but I assume the others have a
similar facility - sendmail can easily accept an incoming email and then pipe
it into a script, shich means you can then process the headers and the body in
any way you like.

In /etc/mail/aliases, you simply put something like:

timing: “| /usr/local/bin/email.timing.sh”

That will pipe any email sent to timing@ser.ver into the named script (which
of course can be written in bash, perl, python, or anything else you care to
use).

Regards,

Antony.