Announcement

Collapse
No announcement yet.

Services not being read

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Services not being read

    Centreon seems to be having a problem with my services.cfg file. When I load it, I get:
    Manual Filling File loading OK
    Data recovery OK
    Service : 6 recorded entrie(s)
    But the Configuration-Services page is blank.

    Code:
    define service{
         name      generic-service
         active_checks_enabled      1 
         passive_checks_enabled 1 
         parallelize_check      1 
         obsess_over_service      1 
         check_freshness      0 
         notifications_enabled      1 
         event_handler_enabled      1 
         flap_detection_enabled      1 
         failure_prediction_enabled      1 
         process_perf_data      1 
         retain_status_information      1 
         retain_nonstatus_information      1
         register      0
    }
    
    define service{
         use     generic-service
         host_name      *
         service_description      PING
         is_volatile      0
         check_period      24x7
         max_check_attempts      5
         normal_check_interval      5
         retry_check_interval      1
         contact_groups      admins
         notification_interval      120
         notification_period      24x7
         notification_options      w,u,c,r
         check_command      check_icmp!750.0,60%!1000.0,80%
         }
    
    define service{
         name nrpe-service
         is_volatile 0
         active_checks_enabled 1
         passive_checks_enabled 1
         parallelize_check 1
         obsess_over_service 1
         check_freshness 0
         notifications_enabled 1
         event_handler_enabled 1
         flap_detection_enabled 1
         failure_prediction_enabled 1
         process_perf_data 1
         retain_status_information 1
         retain_nonstatus_information 1
         register 0
         check_period 24x7
         contact_groups admins
         notification_period 24x7
         }
    
    define service{
         use nrpe-service
         name nrpe-disk-root
         check_command check_nrpe!check_disk_root
         service_description ROOT SPACE FREE
         register 0
         normal_check_interval 60
         retry_check_interval 1
         notification_interval 180
         max_check_attempts 3
         notification_options w,u,c,r
         }
    
    define service{
         use nrpe-service
         name nrpe-disk-var
         check_command check_nrpe!check_disk_var
         service_description VAR SPACE FREE
         register 0
         normal_check_interval 60
         retry_check_interval 1
         notification_interval 180
         max_check_attempts 3
         notification_options w,u,c,r
         }
    
    define service{
         use nrpe-service
         name nrpe-disk-tmp
         check_command check_nrpe!check_disk_tmp
         service_description TMP SPACE FREE
         register 0
         normal_check_interval 60
         retry_check_interval 1
         notification_interval 180
         max_check_attempts 3
         notification_options w,u,c,r
         }
    
    define service{
         use nrpe-service
         name nrpe-win-disk-c
         check_command check_nrpe!nt_check_disk_c
         service_description C SPACE FREE
         register 0
         normal_check_interval 60
         retry_check_interval 1
         notification_interval 180
         max_check_attempts 3
         notification_options w,u,c,r
         }
    
    define service{
         use nrpe-disk-root
         host_name blah1.example.com
         }
    
    define service{
         use nrpe-disk-var
         host_name blah1.example.com
         }
    
    define service{
         use nrpe-disk-tmp
         host_name blah1.example.com
         }
    
    define service{
         use nrpe-win-disk-c
         host_name blah2.example.com
         }
    If I try exporting the Nagios config in Centreon, I get:

    Code:
    Nagios 2.9
    Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
    Last Modified: 04-10-2007
    License: GPL
    
    Reading configuration data...
    
    Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 37)
    Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 54)
    Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 71)
    Warning: Duplicate definition found for service 'nrpe-disk-root' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 101)
    Warning: Duplicate definition found for service 'nrpe-disk-root' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 114)
    Warning: Duplicate definition found for service 'nrpe-disk-root' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 127)
    Warning: Duplicate definition found for service 'nrpe-disk-tmp' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 153)
    Warning: Duplicate definition found for service 'nrpe-disk-tmp' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 166)
    Warning: Duplicate definition found for service 'nrpe-disk-tmp' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 179)
    Warning: Duplicate definition found for service 'nrpe-disk-var' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 205)
    Warning: Duplicate definition found for service 'nrpe-disk-var' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 218)
    Warning: Duplicate definition found for service 'nrpe-disk-var' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 231)
    Warning: Duplicate definition found for service 'nrpe-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 264)
    Warning: Duplicate definition found for service 'nrpe-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 284)
    Warning: Duplicate definition found for service 'nrpe-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 304)
    Warning: Duplicate definition found for service 'nrpe-win-disk-c' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 337)
    Warning: Duplicate definition found for service 'nrpe-win-disk-c' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 350)
    Warning: Duplicate definition found for service 'nrpe-win-disk-c' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 363)
    Running pre-flight check on configuration data...
    
    Checking services...
    Error: There are no services defined!
    Checked 0 services.
    Checking hosts...
    Warning: Host 'blah1.example.com' has no services associated with it!
    Error: Host 'blah1.example.com' has no default contact group(s) defined!
    Warning: Host 'blah2.example.com' has no services associated with it!
    Error: Host 'blah2.example.com' has no default contact group(s) defined!
    Checking host groups...
    Checked 6 host groups.
    Checking service groups...
    Checked 0 service groups.
    Checking contacts...
    Error: There are no contacts defined!
    Checked 0 contacts.
    Checking contact groups...
    Error: There are no contact groups defined!
    Checked 0 contact groups.
    Checking service escalations...
    Checked 0 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 57 commands.
    Checking time periods...
    Checked 5 time periods.
    Checking extended host info definitions...
    Checked 142 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: 142
    Total Errors: 145
    
    ***> One or more problems was encountered while running the pre-flight check...
    Obviously something is wrong, as I DO have contacts and contact groups defined, and I DO NOT have 142 extended host info definitions.

    Any ideas?
Working...
X