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
Reading email body from Nagios
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Reading email body from Nagios
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.
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.
Re: Reading email body from Nagios
Thanks for your valuable inputs.
I will try your suggestions and get back with the results.
Thanks
Ravi
I will try your suggestions and get back with the results.
Thanks
Ravi
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Reading email body from Nagios
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.
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.