Alerting depending on host!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nberetta
Posts: 3
Joined: Fri Aug 07, 2020 8:40 am

Alerting depending on host!

Post by nberetta »

Good morning hope everyone is doing well in. I have been given the task of auditing our monitoring system Nagios and setting it up to be more functional for our expanding company. The main issue that we are having is with alerting, THERE are too many alerts going out and being ignored.

The main goal is to set an alert specific for each host depending on its priority. One host we might need to send a text alert 24/7 while for another host email during the workday would be fine. I would also like it so that when a device has a warning nothing gets sent out unless specified.

Is there a way to select how a group gets alerted depending on the host.

Any help would be greatly appreciated
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Alerting depending on host!

Post by cdienger »

It sounds like you'll want to take a look at the Alert Settings tab found on hosts and services(Edit a host or service under Configure > Core Config Manager > Monitoring). Here you can enable/disable notifications for a host or service, specify a notification time period, and the statuses that will trigger a notification among other options.

There are a few default time periods but you can also create custom periods under Configure > Core Config Manager > Alerting > Time periods. Some examples can be found at:

https://assets.nagios.com/downloads/nag ... riods.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nberetta
Posts: 3
Joined: Fri Aug 07, 2020 8:40 am

Re: Alerting depending on host!

Post by nberetta »

Thank you for reaching out to me, I am more in need of the changing the medium that a group is contacted over, example would be if server A goes down send a text while if Server B goes down email the group.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Alerting depending on host!

Post by cdienger »

This is achievable but would require a lot of extra setup.

Essentially it would breakdown to these steps:

1. Configure the XI server with an MTA so that you can use the command line "mail" command to send emails.
2. Configure each host and/or service to use a custom macro (_enabletext for example). Set it to 1 if you wish for the host/service to send a text and 0 if you want it to send just an email.
3. Give the contact a custom macro that holds the phone number/email address ([email protected] for example. You can see the format XI uses for various carriers under Admin > System Config > Mobile Carriers).
4. Create a custom command that checks the _enabletext variable and sends an email to the phone number if _enabletext is set to 1 or sends an email to the regular contact email if it is set to 0.
5. Assign the custom command to your contact.


Here are some good links to look at if you're still interested in setting this up:

https://support.nagios.com/forum/viewto ... =6&t=54363
https://assets.nagios.com/downloads/nag ... acros.html
https://assets.nagios.com/downloads/nag ... iables.pdf
https://stackoverflow.com/questions/172 ... e/17203203

I can provide more details if needed, but the first step though is setting up the MTA and I would focus on that first and foremost. Setup will depend on your environment and the OS so you may need to do some research to set that up. Please provide us with details if you need assistance.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked