My nagios environment is setup to send alerts to a MS Exchange distribution group email address. In nagios I monitor quite a few items on the exchange server. The issue I have is if there is a problem with our Exchange server (say the information store service crashes) I cannot receive the nagios alerts for the problem and take action. I have to wait until I am alerted by an end user, which is never good.
Is it possible to configure Nagios to send Alerts for anything related to our Exchange server to an alternate email address, say a gmail address?
If you'd like further information feel free ask.
Thank you for your assistance.
Alternate alert email address
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Alternate alert email address
You might not need a different place to send them, but rather a different transport mechanism. If you are currently relaying all of your mail (using SMTP) with that Exchange box sending to an alternate address won't help.
The answer is 1 of 2 things:
For Exchange related stuff simply change your contacts:
contacts: This is a list of the short names of the contacts that should be notified whenever there are problems (or recoveries) with this service. Multiple contacts should be separated by commas. Useful if you want notifications to go to just a few people and don't want to configure contact groups. You must specify at least one contact or contact group in each service definition.
Or if what I said earlier is correct and your mailing relies on Exchange you'll need to do a combination of the former and also adjust your notify command for those special contacts to something that works:
service_notification_commands: This directive is used to define a list of the short names of the commands used to notify the contact of a service problem or recovery. Multiple notification commands should be separated by commas. All notification commands are executed when the contact needs to be notified. The maximum amount of time that a notification command can run is controlled by the notification_timeout option.
Both of these definitions found in the objects documentation:
http://nagios.sourceforge.net/docs/nagi ... tions.html
The answer is 1 of 2 things:
For Exchange related stuff simply change your contacts:
contacts: This is a list of the short names of the contacts that should be notified whenever there are problems (or recoveries) with this service. Multiple contacts should be separated by commas. Useful if you want notifications to go to just a few people and don't want to configure contact groups. You must specify at least one contact or contact group in each service definition.
Or if what I said earlier is correct and your mailing relies on Exchange you'll need to do a combination of the former and also adjust your notify command for those special contacts to something that works:
service_notification_commands: This directive is used to define a list of the short names of the commands used to notify the contact of a service problem or recovery. Multiple notification commands should be separated by commas. All notification commands are executed when the contact needs to be notified. The maximum amount of time that a notification command can run is controlled by the notification_timeout option.
Both of these definitions found in the objects documentation:
http://nagios.sourceforge.net/docs/nagi ... tions.html
Re: Alternate alert email address
Thanks for the input. We are not relaying with Exchange. The issue I ran into this morning is one of the services I monitor on the Exchange server crashed, and I could not access my email due to the outage. Nagios is setup to send emails using the mail engine on the openSUSE server. I have confirmed we are not relaying. I want to configure only my alerts setup for Exchange to go to an alternate address. All other alerts should continue to be sent to the Exchange distribution group.
I will look into your suggestions.
thanks.
I will look into your suggestions.
thanks.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Alternate alert email address
Sounds good - setting this up should be trivial. Generally speaking I'd expect your current contacts to come from a template. To change the behavior of those services just add the contacts or contact_groups line. If it's not the same line as in the template it will actually just compliment the other setting, if it's the same it will override at the service level.
You may want to adjust the host setting for the Exchange server also.
Let us know if you run into any roadblocks.
You may want to adjust the host setting for the Exchange server also.
Let us know if you run into any roadblocks.