Error: Host 'gateway' has no default contact group(

Nagios 2.03b
Redhat 7.3
Someone has a solution for this? please :frowning:

The error has told you the answer. Put the host “gateway” in some contact group that you have created. Perhaps “contactgroup routers” or whatever you have made.

Be sure to run nagios by hand with the -v option, to make sure you don’t have any more errors.

From the 2.0 docs.
define contactgroup{
contactgroup_name contactgroup_name
alias alias
members members
}
nagios.sourceforge.net/docs/2_0/toc.html

Thank you very much for your answer.
But
it must be some other solutions.

my contacts.cfg
i think this is right?

CONTACT GROUP DEFINITIONS

SYNTAX:

“server-admins

Then the host definition is not setup correctly.
nagios.sourceforge.net/docs/2_0/ 
 .html#host
define host{
host_name host_name
alias alias
address address
contact_groups linux-admins

under contactgroup you define the contacts which get notified.
remember to define the contacts themself (with email and so on)
And for each service you need to define a contactgroup.

Luca

Thank you very much! No error. I miss contact_groups in host.cfg.

But i have a lot of warnings, so if someone has any idea to fix this

i would be very greatful.

Nagios 2.0b3
Copyright © 1999-2005 Ethan Galstad (www.nagios.org)
Last Modified: 04-03-2005
License: GPL

Reading configuration data


Running pre-flight check on configuration data


Checking services

Warning: Service ‘SMTP’ on host ‘gateway’ has no check time period defined!
Warning: Service ‘SMTP’ on host ‘gateway’ has no notification time period defined!
Checked 1 services.
Checking hosts

Checked 1 hosts.
Checking host groups

Checked 1 host groups.
Checking service groups

Checked 0 service groups.
Checking contacts

Warning: Contact ‘gateway’ has no service notification time period defined!
Warning: Contact ‘gateway’ has no host notification time period defined!
Warning: Contact ‘nagios’ has no service notification time period defined!
Warning: Contact ‘nagios’ has no host notification time period defined!
Checked 2 contacts.
Checking contact groups

Checked 1 contact groups.
Checking service escalations

Checked 1 service escalations.
Checking service dependencies

Checked 0 service dependencies.
Checking host escalations

Checked 0 host escalations.
Checking host dependencies

Checked 0 host dependencies.
Checking commands

Checked 22 commands.
Checking time periods

Checked 1 time periods.
Checking extended host info definitions

Checked 0 extended host info definitions.
Checking extended service info definitions

Checked 0 extended service info definitions.
Checking for circular paths between hosts

Checking for circular host and service dependencies

Checking global event handlers

Checking obsessive compulsive processor commands

Checking misc settings


Total Warnings: 6
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Warning: Service ‘SMTP’ on host ‘gateway’ has no check time period defined!
Warning: Service ‘SMTP’ on host ‘gateway’ has no notification time period defined!
Warning: Contact ‘gateway’ has no service notification time period defined!
Warning: Contact ‘gateway’ has no host notification time period defined!
Warning: Contact ‘nagios’ has no service notification time period defined!
Warning: Contact ‘nagios’ has no host notification time period defined!

Well, I have come to the conclusion that you have not read one word in the docs about how to setup the config files.
The errors are telling you in plain english what is wrong, but you want someone to spoon feed you the fix. Well, I’m sorry, I won’t be a part of it. RTFM at least once.
nagios.sourceforge.net/docs/2_0/toc.html
nagios.sourceforge.net/docs/2_0/ 
 bject.html
nagios.sourceforge.net/docs/2_0/xodtemplate.html
nagios.sourceforge.net/docs/2_0/ 
 .html#host