e- mail notification to differnt email ID ffor different host
Agnello George
agnello.dsouza at gmail.com
Tue Sep 16 14:02:30 CEST 2008
On Tue, Sep 16, 2008 at 3:46 PM, Assaf Flatto <assaf.flatto at ssp.uk.com>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 user_name at gmail.com <user_name at gmail.com>
}
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080916/b7889560/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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=/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
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
More information about the Users
mailing list