Link to home
Start Free TrialLog in
Avatar of apollo-13
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
SOLUTION
Avatar of sda100
sda100
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of apollo-13
apollo-13

ASKER

Error: Could not find any host matching 'server1' (config file '/etc                       /nagios3/objects/windows.cfg', starting on line 546)
Error: Could not expand hostgroups and/or hosts specified in service (config fil                       e '/etc/nagios3/objects/windows.cfg', starting on line 546)
   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
}
Warning: Duplicate definition found for contact 'nagiosadmin' (config file '/etc/nagios3/objects/contacts.cfg', starting on line 30)
Error: Could not add object property in file '/etc/nagios3/objects/contacts.cfg' on line 31.
   Error processing object config files!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
#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
}
i changed before server1 to pass my hostname of server
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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