notify host and services by sms and email

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
varalakshmi
Posts: 13
Joined: Wed Aug 06, 2014 8:01 am

notify host and services by sms and email

Post by varalakshmi »

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..
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: notify host and services by sms and email

Post by eloyd »

Make two checks, one that notifies on warnings and one that notifies on criticals. Or whatever your criteria are.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
varalakshmi
Posts: 13
Joined: Wed Aug 06, 2014 8:01 am

Re: notify host and services by sms and email

Post by varalakshmi »

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...
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: notify host and services by sms and email

Post by eloyd »

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:

Code: Select all

hosts.cfg
services.cfg
contacts.cfg
(or maybe contactgroups.cfg)
commands.cfg
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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
Locked