hey friends,<br>
<br>
I created some files like
hostgroups.cfg,hosts.cfg,services.cfg,contact.cfg and
contactgroups.cfg.But when I tried to start the nagios service it gave
me error.Then I tried to start with this command nagios -v
/etc/nagios/nagios.cfg it gave me this error.<br>
<br>
Nagios 2.0b4<br>
Copyright (c) 1999-2005 Ethan Galstad (<a href="http://www.nagios.org">http://www.nagios.org</a>)<br>
Last Modified: 08-02-2005<br>
License: GPL<br>
<br>
Reading configuration data...<br>
<br>
Error: Invalid hostgroup object directive 'contact_groups'.<br>
Error: Could not add object property in file '/etc/nagios/hostgroups.cfg' on line 4.<br>
<br>
***> One or more problems was encountered while processing the config files...<br>
<br>
     Check your configuration file(s) to ensure that they contain valid<br>
     directives and data defintions.  If you are upgrading from a previous<br>
     version of Nagios, you should be aware that some variables/definitions<br>
     may have been removed or modified in this version.  Make sure to read<br>
     the HTML documentation regarding the config files, as well as the<br>
     'Whats New' section to find out what has changed.<br>
<br>
<br>
I am using Fedora Core 3 both firewall and SELinux are disabled on my pc.<br>
<br>
Below are my configured files<br>
<br>
Services.cfg file<br>
<br>
define service{<br>
use generic-service<br>
host_name     cluster1<br>
service_description HTTP<br>
is_volatile    0<br>
check_period    24x7<br>
max_check_attempts    3<br>
normal_check_interval    2<br>
retry_check_interval    1<br>
contact_groups    linux-admins<br>
notification_interval    240<br>
notification_period    24x7<br>
notification_options    w,u,c,r<br>
check_command    check_http<br>
}<br>
<br>
Hosts.cfg file<br>
define host{<br>
       
use                    
generic-host <br>
       
host_name              
cluster1<br>
       
alias                  
Apache webserver<br>
       
address                
<a href="http://192.168.1.68">192.168.1.68</a><br>
       
check_command          
check-host-alive<br>
        max_check_attempts      10<br>
        notification_interval   120<br>
        notification_period     24x7<br>
        notification_options    d,u,r,w,c<br>
        }<br>
<br>
 Hostgroups.cfg file<br>
define hostgroup{<br>
        hostgroup_name  www<br>
        alias           Web Servers<br>
        contact_groups  linux-admins<br>
        members         cluster1<br>
        }<br>
<br>
Contacts.cfg file<br>
<br>
define contact{<br>
       
contact_name                   
ankush<br>
       
alias                          
ankush grover<br>
        service_notification_period     24x7<br>
        host_notification_period        24x7<br>
        service_notification_options    w,u,c,r<br>
        host_notification_options       d,u,r<br>
        service_notification_commands   notify-by-email<br>
        host_notification_commands      host-notify-by-email<br>
       
email                          
<a href="mailto:ankush174@gmail.com">ankush174@gmail.com</a><br>
}<br>
<br>
<br>
Ccontactgroups.cfg file<br>
<br>
define contactgroup{<br>
        contactgroup_name      linux-admins <br>
       
alias                 
Linux Admins<br>
       
members               
ankush<br>
}<br>
<br>
I have added /etc/nagios/checkcommands.cfg to nagios.cfg(cfg_file)<br>
and also added /etc/nagios/command-plugins.cfg nagios.cfg(cfg_file)<br>
<br>
I am very new to nagios.<br>
<br>
Please help me.<br>
<br>
Thanks & Regards<br>
<br>
Ankush Grover<br>