Reading email body from Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
gravis70
Posts: 2
Joined: Thu May 11, 2017 8:08 am

Reading email body from Nagios

Post by gravis70 »

Hi,

I have a scenario to read the email body which has the planned outage sent from OTRS.

Change Request is raised for planned maintenance. This Change Request creates ticket in OTRS.

OTRS triggers an email notification to email-id configured in Nagios with maintenance start and end time.

How to read the email body which has maintenance start and end time from Nagios?

Appreciate your help.

Thanks
Ravi
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Reading email body from Nagios

Post by dwhitfield »

You could use check_http to check for the string in OTRS (instead of an email) and then use an event handler to edit these cron jobs https://exchange.nagios.org/directory/A ... on/details

If you don't need/want that check in your Nagios interface, then you could run the whole thing in cron, but have two different crons probably makes sense from a management perspective.

If you really want nagios to read an email, then the email will need to go to an inbox Nagios has access to.
gravis70
Posts: 2
Joined: Thu May 11, 2017 8:08 am

Re: Reading email body from Nagios

Post by gravis70 »

Thanks for your valuable inputs.

I will try your suggestions and get back with the results.

Thanks
Ravi
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Reading email body from Nagios

Post by dwhitfield »

Another suggestion would be to set up some of the Web checks in Nagios XI and use the commands created there in your Core setup. Nagios XI comes with a 60-day trial. If it's easy to spin up a VM, then this is a great option. If you have to jump through hoops to make that happen, then it may not be worth it. You may also find that the setup with XI is easier and just want to move to that. Website, Website Defacement, and Web Transaction would be the three wizards I would look at.

Something like https://exchange.nagios.org/directory/P ... ut/details might give you some ideas for the actual text checking if you decide to go the email route. Despite the similar username, I did not write that plugin.
Locked