Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

*nix

*nix forum sponsored by
*nix Forum Sponsored by Navaho

Powering the backend of many of our networks, unbeknown to many. Linux, Solaris, Unix...

Go Back   EduGeek.net Forums > Technical > *nix
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 26-11-2009, 10:48 AM   #1
 
epsone's Avatar
 
Join Date: Nov 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 epsone is an unknown quantity at this point
Default nagios problem

Good Day

i m Checking my config file and i havethe following errors :


Code:
Checking hosts...
Warning: Host 'W2K3DC1' has no default contacts or contactgroups defined!
	
Checking contacts...
Error: Service notification command 'notify-by-email' specified for contact 'nagios' is not defined anywhere!
Error: Host notification command 'host-notify-by-email' specified for contact 'nagios' is not defined anywhere!
if you have an idea i will be thankful

many thanks
  Reply With Quote
Old 26-11-2009, 11:25 AM   #2
 
Willott's Avatar
 
Join Date: Dec 2008
Location: Nottingham
Posts: 145
uk uk england
Thanks: 16
Thanked 31 Times in 29 Posts
Rep Power: 10 Willott has a spectacular aura about Willott has a spectacular aura about Willott has a spectacular aura about
Default

As it says, you have notification commands specified for a contact, and the commands are not defined. I would suggest removing the notification bits until you've got monitoring working, then add them back in, working through the config slowly. It may be worth grabbing a web gui for it if you're having difficulties with the config files. Grep for "notify-be-email" to find the file you're looking for.

Cheers

Will
  Reply With Quote
Old 26-11-2009, 12:39 PM   #3
 
epsone's Avatar
 
Join Date: Nov 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 epsone is an unknown quantity at this point
Default

sorry i dont understand , now i can't monitore nothing so if i remove will be worst than befor

yhank you
  Reply With Quote
Old 26-11-2009, 01:47 PM   #4
 
Willott's Avatar
 
Join Date: Dec 2008
Location: Nottingham
Posts: 145
uk uk england
Thanks: 16
Thanked 31 Times in 29 Posts
Rep Power: 10 Willott has a spectacular aura about Willott has a spectacular aura about Willott has a spectacular aura about
Default

OK,

Are you trying to use the nagios web interface to see the status, or are you just looking to use nagios to send you alerts when there's a service issue?

Regards
  Reply With Quote
Old 26-11-2009, 06:35 PM   #5
 
epsone's Avatar
 
Join Date: Nov 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 epsone is an unknown quantity at this point
Default

I use the nagios web interface to see the status now the problem that i have :

Code:
Checking hosts...
Warning: Host 'SERV1' has no default contacts or contactgroups defined!
now ican see just localhost but other server i can't (SERV1)

i have this in my nagios.cfg

Code:
# You can specify individual object config files as shown below:
cfg_file=/etc/nagios/objects/commands.cfg
cfg_file=/etc/nagios/objects/contacts.cfg
cfg_file=/etc/nagios/objects/timeperiods.cfg
cfg_file=/etc/nagios/objects/templates.cfg
cfg_file=/etc/nagios/hosts.cfg 
cfg_file=/etc/nagios/services.cfg
cfg_file=/etc/nagios/contactgroups.cfg
in my contacts.cfg file
Code:
###############################################################################
###############################################################################
#
# 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                    nagios
	alias                           Nagios Admin
	service_notification_period     24x7
	host_notification_period        24x7
	service_notification_options    w,u,c,r
	host_notification_options       d,u,r
	service_notification_commands   notify-service-by-email
	host_notification_commands      notify-host-by-email
        email                           test@domain.com
        pager                           
        }

###############################################################################
###############################################################################
#
# 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
        }
contactgroups.cfg file

Code:
define contactgroup{
        contactgroup_name       srvprd
        alias                   contactes
        members                 nagios
        }
hosts.cfg file

Code:

define host{
	use                     generic-host
	host_name               SERV1
	alias                   ACTIVE-DIRECTORY
	address                 10.5.1.20
	check_command           check-host-alive
	max_check_attempts      20
	notification_interval   60
	notification_period     24x7
	notification_options    d,u,r
        }
i don't no what can i do to solve this problem , if you have an idea i will be thankful
many Thanks
  Reply With Quote
Old 26-11-2009, 08:18 PM   #6
 
powdarrmonkey's Avatar
 
Join Date: Feb 2008
Location: Alcester, Warwickshire
Posts: 3,553
uk uk england
Thanks: 223
Thanked 494 Times in 421 Posts
Rep Power: 106 powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute
Default

Add a 'contactgroups' line to your host entry, with a valid contact group listed. (You know, like the error message says.)
  Reply With Quote
Old 27-11-2009, 09:54 AM   #7
 
epsone's Avatar
 
Join Date: Nov 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 epsone is an unknown quantity at this point
Default

but when in the host i can added the contactgroups ? can you show me please .

Thank you
  Reply With Quote
Old 27-11-2009, 11:53 AM   #8
 
powdarrmonkey's Avatar
 
Join Date: Feb 2008
Location: Alcester, Warwickshire
Posts: 3,553
uk uk england
Thanks: 223
Thanked 494 Times in 421 Posts
Rep Power: 106 powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute
Default

Template-Based Object Configuration
  Reply With Quote
Old 27-11-2009, 11:57 AM   #9
 
mac_shinobi's Avatar
 
Join Date: Aug 2005
Posts: 4,172
uk
Thanks: 307
Thanked 310 Times in 290 Posts
Rep Power: 64 mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of mac_shinobi has much to be proud of
Default

Quote:
Originally Posted by powdarrmonkey View Post
(You know, like the error message says.)
Love the sarcasm in your voice lol
  Reply With Quote
Old 27-11-2009, 12:00 PM   #10
 
powdarrmonkey's Avatar
 
Join Date: Feb 2008
Location: Alcester, Warwickshire
Posts: 3,553
uk uk england
Thanks: 223
Thanked 494 Times in 421 Posts
Rep Power: 106 powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute powdarrmonkey has a reputation beyond repute
Default

/me expects people to make an effort with the documentation, then ask for help.
  Reply With Quote
Old 27-11-2009, 12:52 PM   #11
 
james_yale's Avatar
 
Join Date: Oct 2008
Location: Hedge End, Southampton
Posts: 44
uk
Thanks: 0
Thanked 7 Times in 7 Posts
Rep Power: 4 james_yale is on a distinguished road
Send a message via MSN to james_yale
Default

The no contact group problem is only a warning however, the thing stopping nagios is the missing command definition:

Quote:
Checking contacts...
Error: Service notification command 'notify-by-email' specified for contact 'nagios' is not defined anywhere!
Error: Host notification command 'host-notify-by-email' specified for contact 'nagios' is not defined anywhere!
The commands.cfg should contain something like:
Code:
# 'host-notify-by-email' command definition
define command{
        command_name    host-notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios 2.11 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
        }

# 'notify-by-email' command definition
define command{
        command_name    notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios 2.11 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }
edit: Should have read the whole thread, nevermind

Last edited by james_yale; 27-11-2009 at 12:55 PM..
  Reply With Quote
Old 27-11-2009, 01:16 PM   #12
 
epsone's Avatar
 
Join Date: Nov 2009
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 epsone is an unknown quantity at this point
Default

Quote:
Originally Posted by powdarrmonkey View Post
/me expects people to make an effort with the documentation, then ask for help.
Thanks i already find the solution but when someone ask for somthing because is bloked but anyway thanks again
  Reply With Quote
Reply

EduGeek.net Forums > Technical > *nix

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios - do you use it? somabc *nix 20 20-08-2008 08:19 PM
Nagios Headache evrydayzawrkday *nix 6 13-06-2008 11:33 PM
Quick Nagios Problem DanW *nix 6 21-05-2008 04:56 PM
nagios error dezt *nix 13 13-03-2008 03:02 PM
Nagios Problem sqdge *nix 10 25-04-2007 09:11 PM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:00 PM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2009 EduGeek.net
SERVER: 4
no new posts