plugin to send email when scheduled maintenance set

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
FTL
Posts: 72
Joined: Fri Oct 21, 2011 7:23 am

plugin to send email when scheduled maintenance set

Post by FTL »

Hello.

Is there a plugin out there that will fire off an email notification to alert contacts when hosts / hostgroups are put into scheduled maintenance?

I have a pdf temPlate that I want to manually edit with the details and then have nagios send that via email automatically when scheduled maintenance is set.

Thankyou
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: plugin to send email when scheduled maintenance set

Post by slansing »

Nagios should already send emails for your scheduled downtime, when your hosts/services enter and exit it.
I have a pdf temPlate that I want to manually edit with the details and then have nagios send that via email automatically when scheduled maintenance is set.
Not quite sure what you say saying here, can you be a bit more verbose? What is this template you speak of?
FTL
Posts: 72
Joined: Fri Oct 21, 2011 7:23 am

Re: plugin to send email when scheduled maintenance set

Post by FTL »

Hi,

Yes sorry i was typing on my phone and a little vague.

Right i have created this document here - https://drive.google.com/file/d/0B0VE1Y ... sp=sharing

Every time i want to put; say a SQL Server into maintenance i want to fill this document out for the relevant SQL Server and customer who it belongs too.

Then when i put the server into Scheduled maintenance - i want Nagios to fire out an email to the relevant customer with this above document attached which outlines the maintenance and its time window etc.

Is this possible please?

Thankyou
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: plugin to send email when scheduled maintenance set

Post by tmcdonald »

Is this possible? Probably. Will it be easy? Probably not.

Editing a PDF is not going to be as easy as editing a flat text file. You'll need to write a script to do either of these things yourself. I would imagine python or perl would be good candidate languages for such a task.
Former Nagios employee
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: plugin to send email when scheduled maintenance set

Post by slansing »

This is certainly not a feature of XI or Core, you might be able to do something like this by passing notification macros but you would be getting an email with no special fonts, colors, etc.
FTL
Posts: 72
Joined: Fri Oct 21, 2011 7:23 am

Re: plugin to send email when scheduled maintenance set

Post by FTL »

Hi TMcd and Slansing,

Thankyou for your thoughts.

Sorry i havnt been clear enough with what id like to achieve and that appears to have caused some confusion.

I will be manually editing the PDF file with whatever details need to go in it - as and when i need to send out the maintenance notification.

All i want is Nagios to send the email with that PDF attachment (which is already pre completed with the info by me) when soemthing is put into scheduled maintenance.

Could i use something like sendmail (which I read can send attachements) to pass it to Postfix (which is my MTA on my Nagios box) - which then passes the email to my Exchange server to actually send it?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: plugin to send email when scheduled maintenance set

Post by tmcdonald »

At this point Nagios doesn't really have much to do with it. The time it takes you to make the changes to the PDF would seem like an eternity in the eyes of Nagios.

If you have the PDF ready to go before the incident occurs, then what you described will work just fine. But making edits on the fly and having Nagios deal with them will not likely work.
Former Nagios employee
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: plugin to send email when scheduled maintenance set

Post by slansing »

Yes you can use sendmail for this, we use Sendmail in nagios XI to pass attached PDF copies of reports as one of our main reporting features!
Locked