INSERT INTO `nagios_server` (`id`, `name`, `localhost`, `is_default`, `last_restart`, `ns_ip_address`, `ns_activate`, `ns_status`, `engine_start_command`, `engine_stop_command`, `engine_restart_command`, `engine_reload_command`, `broker_reload_command`, `nagios_bin`, `nagiostats_bin`, `nagios_perfdata`, `centreonbroker_cfg_path`, `centreonbroker_module_path`, `centreonconnector_path`, `ssh_port`, `gorgone_communication_type`, `gorgone_port`, `init_script_centreontrapd`, `snmp_trapd_path_conf`) VALUES
(1, 'Central', '1', 1, 0, '127.0.0.1', '1', '0', 'systemctl start centengine', 'systemctl stop centengine', 'systemctl restart centengine', 'systemctl reload centengine', 'systemctl reload cbd', '@monitoring_binary@', '@centreon_engine_stats_binary@', '@monitoring_varlog@/service-perfdata', '', NULL, '@centreon_engine_connectors@', 22, '1',  5556, 'centreontrapd', '/etc/snmp/centreon_traps/');

INSERT INTO `cfg_nagios` (`nagios_id`, `nagios_name`) VALUES (1, 'Centreon Engine Central');
UPDATE `cfg_nagios` SET `log_file` = '@monitoring_varlog@/centengine.log',
    `cfg_dir` = '@monitoring_etc@',
    `status_file` = '@monitoring_varlog@/status.dat',
    `status_update_interval` = '60',
    `enable_notifications` = '1',
    `execute_service_checks` = '1',
    `accept_passive_service_checks` = '1',
    `execute_host_checks` = '1',
    `accept_passive_host_checks` = '1',
    `enable_event_handlers` = '1',
    `check_external_commands` = '1',
    `external_command_buffer_slots` = '4096',
    `command_check_interval` = '1s',
    `command_file` = '@monitoring_var_lib@/rw/centengine.cmd',
    `retain_state_information` = '1',
    `state_retention_file` = '@monitoring_varlog@/retention.dat',
    `retention_update_interval` = '60',
    `use_retained_program_state` = '1',
    `use_retained_scheduling_info` = '1',
    `use_syslog` = '0',
    `log_notifications` = '1',
    `log_service_retries` = '1',
    `log_host_retries` = '1',
    `log_event_handlers` = '1',
    `log_notifications` = '1',
    `log_service_retries` = '1',
    `log_host_retries` = '1',
    `log_event_handlers` = '1',
    `log_external_commands` = '1',
    `log_passive_checks` = '1',
    `service_inter_check_delay_method` = 's',
    `host_inter_check_delay_method` = 's',
    `service_interleave_factor` = 's',
    `max_concurrent_checks` = '0',
    `max_service_check_spread` = '15',
    `max_host_check_spread` = '15',
    `check_result_reaper_frequency` = '5',
    `auto_reschedule_checks` = '0',
    `auto_rescheduling_interval` = NULL,
    `auto_rescheduling_window` = NULL,
    `enable_flap_detection` = '0',
    `low_service_flap_threshold` = '25.0',
    `high_service_flap_threshold` = '50.0',
    `low_host_flap_threshold` = '25.0',
    `high_host_flap_threshold` = '50.0',
    `soft_state_dependencies` = '0',
    `service_check_timeout` = '60',
    `host_check_timeout` = '12',
    `event_handler_timeout` = '30',
    `notification_timeout` = '30',
    `check_for_orphaned_services` = '1',
    `check_for_orphaned_hosts` = '1',
    `check_service_freshness` = '0',
    `service_freshness_check_interval` = NULL,
    `freshness_check_interval` = NULL,
    `check_host_freshness` = '0',
    `host_freshness_check_interval` = NULL,
    `date_format` = 'euro',
    `illegal_object_name_chars` = '~!$%^&*"|\'<>?,()=',
    `illegal_macro_output_chars` = '`~$^&"|\'<>',
    `use_regexp_matching` = '0',
    `use_true_regexp_matching` = '0',
    `admin_email` = 'admin@localhost',
    `admin_pager` = 'admin@localhost',
    `nagios_comment` = 'Centreon Engine configuration file for a central instance',
    `nagios_activate` = '1',
    `event_broker_options` = '-1',
    `nagios_server_id` = '1',
    `enable_predictive_host_dependency_checks` = '1',
    `enable_predictive_service_dependency_checks` = '1',
    `host_down_disable_service_checks` = '0',
    `cached_host_check_horizon` = '15',
    `cached_service_check_horizon` = '15',
    `enable_environment_macros` = '0',
    `additional_freshness_latency` = '15',
    `debug_file` = '@monitoring_varlog@/centengine.debug',
    `debug_level` = '0',
    `debug_level_opt` = '0',
    `debug_verbosity` = '1',
    `max_debug_file_size` = '1000000000',
    `log_pid` = '1',
    `cfg_file` = 'centengine.cfg',
    `logger_version` = 'log_v2_enabled',
    `broker_module_cfg_file` = '@centreonbroker_etc@/central-module.json';

INSERT INTO `cfg_nagios_logger`
(`cfg_nagios_id`, `log_v2_logger`, `log_level_functions`, `log_level_config`, `log_level_events`, `log_level_checks`, `log_level_notifications`, `log_level_eventbroker`, `log_level_external_command`, `log_level_commands`, `log_level_downtimes`, `log_level_comments`, `log_level_macros`, `log_level_process`, `log_level_runtime`) VALUES
(1, 'file', 'warning', 'info', 'info', 'info', 'info', 'warning', 'info', 'warning', 'info', 'info', 'warning', 'info', 'warning');

INSERT INTO `cfg_nagios_broker_module` (`cfg_nagios_id`, `broker_module`) VALUES (1, '@centreon_engine_lib@/externalcmd.so');

INSERT INTO `cfg_resource` (`resource_id`, `resource_name`, `resource_line`, `resource_comment`, `resource_activate`) VALUES
(1, '$USER1$', '@plugin_dir@', 'Nagios Plugins Path', '1'),
(2, '$CENTREONPLUGINS$', '@centreonplugins@', 'Centreon Plugins Path', '1');

INSERT INTO `cfg_resource_instance_relations` (`resource_id`, `instance_id` ) VALUES (1, 1), (2, 1);
INSERT INTO `options` (`key`, `value`) VALUES ('cengine_path_connectors','@centreon_engine_connectors@/');
