Hi ,
i have defined a command for notifying host and service by sms and mail it works but
how to
notify-host-by-sms when host is in down state and notify-host-by-mail when host is in warning state..
Simlarly
notify-service-by-sms when it is critical and notify-service-by-mail when service warning state
and how do i segregate all this in nagios..
notify host and services by sms and email
-
- Posts: 13
- Joined: Wed Aug 06, 2014 8:01 am
Re: notify host and services by sms and email
Make two checks, one that notifies on warnings and one that notifies on criticals. Or whatever your criteria are.
-
- Posts: 13
- Joined: Wed Aug 06, 2014 8:01 am
Re: notify host and services by sms and email
Hi,
Thanks for the solution .. now if i want send sms for few host and mail for few host means what to do?
how to define that in host..
Thanks in advance...
Thanks for the solution .. now if i want send sms for few host and mail for few host means what to do?
how to define that in host..
Thanks in advance...
Re: notify host and services by sms and email
You define multiple hosts or services (it's unclear to me if you're talking about monitoring a host being up or down or a service being available or not). You have multiple contacts and you have two different commands that send the contacts the appropriate information.
You'll need to look at the following files:
It's kind of hard to say exactly what you need to do, but it should be pretty easy looking at the files and Nagios documentation (http://nagios.sourceforge.net/docs/3_0/ ... tions.html) to duplicate an existing check, change its notification command to be something else, notify only on WARNING or CRITICAL, and use the contact's email address for email but the pager address for SMS notifications.
You'll need to look at the following files:
Code: Select all
hosts.cfg
services.cfg
contacts.cfg
(or maybe contactgroups.cfg)
commands.cfg