On Tue, Sep 16, 2008 at 3:46 PM, Assaf Flatto <[EMAIL PROTECTED]>wrote:

> look in the contact and escalations sections:
>
> http://nagios.sourceforge.net/docs/3_0/configobject.html
>
>
>

I was able to solve this simle query

 There are cases when you want to send email notification  to specific email
ID for specific host.

there is a configuration file called as contacts.cfg , here we need to add
the following :

define contact{
        contact_name                    cocubes
        use                             generic-contact-1
        alias                           cocubes
        email                     [EMAIL PROTECTED] <[EMAIL PROTECTED]>
        }
contact_name is a general name you give to this contact.
use --- this  the set template mentioned in template.cfg
alias is a general user  name
email is the email id

NOTE:  open the   templeate.cfg

we create a new template called generic-contact-1 , which has the following
template

define contact{
  name              generic-contact-1         ; The name of this contact
template
  host_notification_period        24x7                    ; host
notifications can be sent anytime
  host_notification_options       d,u,r,f,s               ; send
notifications for all host states, flapping events, and scheduled downtime
events
  service_notification_commands   notify-service-by-email ; send service
notifications via email
  host_notification_commands      notify-host-by-email    ; send host
notifications via email
  register                        0                       ; DONT REGISTER
THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
        }

This template basically tell nagios to only send notification if the server
is down and not to send service warning.


Now that we have set the email address we have to set  the host that we want
to monitor
lets open the file windows.cfg

we add *contacts* variable to the host object

vi /usr/local/nagios/etc/objects/windows.cfg

define host{
        use             windows-server
        host_name      cocubes
        alias           cocubes.qualispace.com
        *contacts        cocubes
*        address       202.XX.XXX.XX
        }

now restart nagios



-- 
Regards
Agnello D'souza
www.linux-vashi.blogspot.com
www.bible-study-india.blogspot.com
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null

Reply via email to