apollo-13
asked on
nagios3 monitoring remote linux server
i have nagios3 and i monitor windows and linux server. My nagios server send mails if warning and criticaly something. But both mails send to only one mail address.
i would like nagios sends mails two diffrent mails addresses if windows meassages then windowswarning@domain.com ,if linux server messages then linuxwarning@domain.com
please help me to configure
thanks
i would like nagios sends mails two diffrent mails addresses if windows meassages then windowswarning@domain.com ,if linux server messages then linuxwarning@domain.com
please help me to configure
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Warning: Duplicate definition found for contact 'nagiosadmin' (config file '/etc/nagios3/objects/cont acts.cfg', starting on line 30)
Error: Could not add object property in file '/etc/nagios3/objects/cont acts.cfg' on line 31.
Error processing object config files!
Error: Could not add object property in file '/etc/nagios3/objects/cont
Error processing object config files!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
#contact.cfg
########################## ########## ########## ########## ########## ########## ###
########################## ########## ########## ########## ########## ########## ###
#
# CONTACTS
#
########################## ########## ########## ########## ########## ########## ###
########################## ########## ########## ########## ########## ########## ###
# Just one contact defined by default - the Nagios admin (that's you)
# This contact definition inherits a lot of default values from the 'generic-contact'
# template which is defined elsewhere.
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define contact{
contact_name linux_contact
use linux_contact
alias Linux admin
email mail@domain.com
}
define contactgroup{
contactgroup_name linux-admins
alias Linux Administrators
members linux_contact
}
##########################
##########################
#
# CONTACTS
#
##########################
##########################
# Just one contact defined by default - the Nagios admin (that's you)
# This contact definition inherits a lot of default values from the 'generic-contact'
# template which is defined elsewhere.
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define contact{
contact_name linux_contact
use linux_contact
alias Linux admin
email mail@domain.com
}
define contactgroup{
contactgroup_name linux-admins
alias Linux Administrators
members linux_contact
}
ASKER
i changed before server1 to pass my hostname of server
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey guys , I am not success yet But i would like to say that YOU ARE SUPER!!! with yours comments.
I AM VERY HAPPY TO ASK MY QUESTION HERE.
I will let you know result
I AM VERY HAPPY TO ASK MY QUESTION HERE.
I will let you know result
ASKER
Error: Could not expand hostgroups and/or hosts specified in service (config fil e '/etc/nagios3/objects/wind
Error processing object config files!
#contacts.cfg
##########################
##########################
#
# CONTACT GROUPS
#
##########################
##########################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
define contact{
contact_name linux_contact
use linux_contact
alias Linux admin
email mailaddress
}
define contactgroup{
contactgroup_name linux-admins
alias Linux Administrators
members linux_contact
}