<commit_before>
# Configure

## Default Configuration

Default "shinken object" (servicegroups, hosts, etc) configuration.

    init = ->
      {shinken} = @config.ryba
      hostgroups = shinken.config.hostgroups ?= {}
      hosts = shinken.config.hosts ?= {}
      servicegroups = shinken.config.servicegroups ?= {}
      services = shinken.config.services ?= {}
      commands = shinken.config.commands ?= {}
      realms = shinken.config.realms ?= {}
      realms.All ?= {}
      clusters = shinken.config.clusters ?= {}
      contactgroups = shinken.config.contactgroups ?= {}
      contacts = shinken.config.contacts ?= {}
      dependencies = shinken.config.dependencies ?= {}
      escalations = shinken.config.escalations ?= {}
      serviceescalations = shinken.config.serviceescalations ?= {}
      timeperiods = shinken.config.timeperiods ?= {}
      # Hostgroups
      hostgroups['by_roles'] ?= {}
      hostgroups['by_roles'].alias ?= 'Role View'
      hostgroups['by_roles'].hostgroup_members ?= []
      hostgroups['by_topology'] ?= {}
      hostgroups['by_topology'].alias ?= 'Topological View'
      hostgroups['by_topology'].hostgroup_members ?= []
      hostgroups['watcher'] ?= {}
      hostgroups['watcher'].alias ?= 'Cluster Watchers'
      hostgroups['watcher'].hostgroup_members ?= []

### Templates

Templates are generic (abstract) objects that can define commons properties by heritage.
They must have register set to 0 to not be instanciated

      # Hosts
      hosts['generic-host'] ?= {}
      hosts['generic-host'].use ?= ''
      hosts['generic-host'].check_command ?= 'check_host'
      hosts['generic-host'].max_check_attempts ?= '2'
      hosts['generic-host'].check_interval ?= '300'
      hosts['generic-host'].retry_interval ?= '60'
      hosts['generic-host'].active_checks_enabled ?= '1'
      hosts['generic-host'].check_period ?= '24x7'
      hosts['generic-host'].event_handler_enabled ?= '0'
      hosts['generic-host'].flap_detection_enabled ?= '1'
      hosts['generic-host'].process_perf_data ?= '1'
      hosts['generic-host'].retain_status_information ?= '1'
      hosts['generic-host'].retain_nonstatus_information ?= '1'
      hosts['generic-host'].contactgroups ?= ['admins']
      hosts['generic-host'].notification_interval ?= '3600'
      hosts['generic-host'].notification_period ?= '24x7'
      hosts['generic-host'].notification_options ?= 'd,u,r,f'
      hosts['generic-host'].notification_enabled ?= '1'
      hosts['generic-host'].register = '0' # IT'S A TEMPLATE !
      hosts['linux-server'] ?= {}
      hosts['linux-server'].use ?= 'generic-host'
      hosts['linux-server'].check_interval ?= '60'
      hosts['linux-server'].retry_interval ?= '20'
      hosts['linux-server'].register = '0'
      hosts['aggregates'] ?= {}
      hosts['aggregates'].use ?= 'generic-host'
      hosts['aggregates'].check_command ?= 'ok'
      hosts['aggregates'].register = '0'
      # Services
      services['generic-service'] ?= {}
      services['generic-service'].use ?= ''
      services['generic-service'].active_checks_enabled ?= '1'
      services['generic-service'].passive_checks_enabled ?= '1'
      services['generic-service'].parallelize_check ?= '1'
      services['generic-service'].obsess_over_service ?= '1'
      services['generic-service'].check_freshness ?= '1'
      services['generic-service'].first_notification_delay ?= '0'
      services['generic-service'].freshness_threshold ?= '3600'
      services['generic-service'].notifications_enabled ?= '1'
      services['generic-service'].flap_detection_enabled ?= '0'
      services['generic-service'].failure_prediction_enabled ?= '1'
      services['generic-service'].process_perf_data ?= '1'
      services['generic-service'].retain_status_information ?= '1'
      services['generic-service'].retain_nonstatus_information ?= '1'
      services['generic-service'].is_volatile ?= '0'
      services['generic-service'].check_period ?= '24x7'
      services['generic-service'].max_check_attempts ?= '2'
      services['generic-service'].check_interval ?= '300'
      services['generic-service'].retry_interval ?= '60'
      services['generic-service'].contactgroups ?= 'admins'
      services['generic-service'].notifications_options ?= 'w,u,c,r'
      services['generic-service'].notification_interval ?= '3600'
      services['generic-service'].notification_period ?= '24x7'
      services['generic-service'].register = '0'
      services['unit-service'] ?= {}
      services['unit-service'].use ?= 'generic-service'
      services['unit-service'].register = '0'
      services['unit-service'].check_interval = '30'
      services['unit-service'].retry_interval = '10'
      services['process-service'] ?= {}
      services['process-service'].use ?= 'unit-service'
      services['process-service'].register = '0'
      services['functional-service'] ?= {}
      services['functional-service'].use ?= 'generic-service'
      services['functional-service'].register = '0'
      # ContactGroups
      contactgroups['admins'] ?= {}
      contactgroups['admins'].alias ?= '<NAME>'
      # Contacts
      contacts['generic-contact'] ?= {}
      contacts['generic-contact'].use ?= ''
      contacts['generic-contact'].service_notification_period ?= '24x7'
      contacts['generic-contact'].host_notification_period ?= '24x7'
      contacts['generic-contact'].service_notification_options ?= 'w,u,c,r,f'
      contacts['generic-contact'].host_notification_options ?= 'd,u,r,f,s'
      contacts['generic-contact'].service_notification_commands ?= 'notify-service-by-email'
      contacts['generic-contact'].host_notification_commands ?= 'notify-host-by-email'
      contacts['generic-contact'].host_notifications_enabled ?= '1'
      contacts['generic-contact'].service_notifications_enabled ?= '1'
      contacts['generic-contact'].register = '0'
      contacts['shinken'] ?= {}
      contacts['shinken'].contactgroups ?= []<commit_msg>shinken: add admin contact template<commit_after>
# Configure

## Default Configuration

Default "shinken object" (servicegroups, hosts, etc) configuration.

    init = ->
      {shinken} = @config.ryba
      hostgroups = shinken.config.hostgroups ?= {}
      hosts = shinken.config.hosts ?= {}
      servicegroups = shinken.config.servicegroups ?= {}
      services = shinken.config.services ?= {}
      commands = shinken.config.commands ?= {}
      realms = shinken.config.realms ?= {}
      realms.All ?= {}
      clusters = shinken.config.clusters ?= {}
      contactgroups = shinken.config.contactgroups ?= {}
      contacts = shinken.config.contacts ?= {}
      dependencies = shinken.config.dependencies ?= {}
      escalations = shinken.config.escalations ?= {}
      serviceescalations = shinken.config.serviceescalations ?= {}
      timeperiods = shinken.config.timeperiods ?= {}
      # Hostgroups
      hostgroups['by_roles'] ?= {}
      hostgroups['by_roles'].alias ?= 'Role View'
      hostgroups['by_roles'].hostgroup_members ?= []
      hostgroups['by_topology'] ?= {}
      hostgroups['by_topology'].alias ?= 'Topological View'
      hostgroups['by_topology'].hostgroup_members ?= []
      hostgroups['watcher'] ?= {}
      hostgroups['watcher'].alias ?= 'Cluster Watchers'
      hostgroups['watcher'].hostgroup_members ?= []

### Templates

Templates are generic (abstract) objects that can define commons properties by heritage.
They must have register set to 0 to not be instanciated

      # Hosts
      hosts['generic-host'] ?= {}
      hosts['generic-host'].use ?= ''
      hosts['generic-host'].check_command ?= 'check_host'
      hosts['generic-host'].max_check_attempts ?= '2'
      hosts['generic-host'].check_interval ?= '300'
      hosts['generic-host'].retry_interval ?= '60'
      hosts['generic-host'].active_checks_enabled ?= '1'
      hosts['generic-host'].check_period ?= '24x7'
      hosts['generic-host'].event_handler_enabled ?= '0'
      hosts['generic-host'].flap_detection_enabled ?= '1'
      hosts['generic-host'].process_perf_data ?= '1'
      hosts['generic-host'].retain_status_information ?= '1'
      hosts['generic-host'].retain_nonstatus_information ?= '1'
      hosts['generic-host'].contactgroups ?= ['admins']
      hosts['generic-host'].notification_interval ?= '3600'
      hosts['generic-host'].notification_period ?= '24x7'
      hosts['generic-host'].notification_options ?= 'd,u,r,f'
      hosts['generic-host'].notification_enabled ?= '1'
      hosts['generic-host'].register = '0' # IT'S A TEMPLATE !
      hosts['linux-server'] ?= {}
      hosts['linux-server'].use ?= 'generic-host'
      hosts['linux-server'].check_interval ?= '60'
      hosts['linux-server'].retry_interval ?= '20'
      hosts['linux-server'].register = '0'
      hosts['aggregates'] ?= {}
      hosts['aggregates'].use ?= 'generic-host'
      hosts['aggregates'].check_command ?= 'ok'
      hosts['aggregates'].register = '0'
      # Services
      services['generic-service'] ?= {}
      services['generic-service'].use ?= ''
      services['generic-service'].active_checks_enabled ?= '1'
      services['generic-service'].passive_checks_enabled ?= '1'
      services['generic-service'].parallelize_check ?= '1'
      services['generic-service'].obsess_over_service ?= '1'
      services['generic-service'].check_freshness ?= '1'
      services['generic-service'].first_notification_delay ?= '0'
      services['generic-service'].freshness_threshold ?= '3600'
      services['generic-service'].notifications_enabled ?= '1'
      services['generic-service'].flap_detection_enabled ?= '0'
      services['generic-service'].failure_prediction_enabled ?= '1'
      services['generic-service'].process_perf_data ?= '1'
      services['generic-service'].retain_status_information ?= '1'
      services['generic-service'].retain_nonstatus_information ?= '1'
      services['generic-service'].is_volatile ?= '0'
      services['generic-service'].check_period ?= '24x7'
      services['generic-service'].max_check_attempts ?= '2'
      services['generic-service'].check_interval ?= '300'
      services['generic-service'].retry_interval ?= '60'
      services['generic-service'].contactgroups ?= 'admins'
      services['generic-service'].notifications_options ?= 'w,u,c,r'
      services['generic-service'].notification_interval ?= '3600'
      services['generic-service'].notification_period ?= '24x7'
      services['generic-service'].register = '0'
      services['unit-service'] ?= {}
      services['unit-service'].use ?= 'generic-service'
      services['unit-service'].register = '0'
      services['unit-service'].check_interval = '30'
      services['unit-service'].retry_interval = '10'
      services['process-service'] ?= {}
      services['process-service'].use ?= 'unit-service'
      services['process-service'].register = '0'
      services['functional-service'] ?= {}
      services['functional-service'].use ?= 'generic-service'
      services['functional-service'].register = '0'
      # ContactGroups
      contactgroups['admins'] ?= {}
      contactgroups['admins'].alias ?= '<NAME>'
      # Contacts
      contacts['generic-contact'] ?= {}
      contacts['generic-contact'].use ?= ''
      contacts['generic-contact'].service_notification_period ?= '24x7'
      contacts['generic-contact'].host_notification_period ?= '24x7'
      contacts['generic-contact'].service_notification_options ?= 'w,u,c,r,f'
      contacts['generic-contact'].host_notification_options ?= 'd,u,r,f,s'
      contacts['generic-contact'].service_notification_commands ?= 'notify-service-by-email'
      contacts['generic-contact'].host_notification_commands ?= 'notify-host-by-email'
      contacts['generic-contact'].host_notifications_enabled ?= '1'
      contacts['generic-contact'].service_notifications_enabled ?= '1'
      contacts['generic-contact'].register = '0'
      contacts['admin-contact'] ?= {}
      contacts['admin-contact'].use ?= 'generic-contact'
      contacts['admin-contact'].can_submit_commands ?= '1'
      contacts['admin-contact'].is_admin ?= '1'
      contacts['admin-contact'].contactgroups ?= ['admins']
      contacts['admin-contact'].register = '0'
      contacts['shinken'] ?= {}
      contacts['shinken'].contactgroups ?= []
{'fraction_non_alphanumeric': 0.16856045123845337, 'fraction_numerical': 0.013488105942941225, 'mean_word_length': 3.799529227147901, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3741197', 'n_tokens_mistral': 3737, 'n_tokens_neox': 3683, 'n_words': 479}