Cleanup config.nodes_of
[check_mk.git] / cmk_base / default_config / base.py
blobea134323d6eef256cbdbfe5fba504360d34b08e0
1 #!/usr/bin/python
2 # -*- encoding: utf-8; py-indent-offset: 4 -*-
3 # +------------------------------------------------------------------+
4 # | ____ _ _ __ __ _ __ |
5 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
6 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
7 # | | |___| | | | __/ (__| < | | | | . \ |
8 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
9 # | |
10 # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
11 # +------------------------------------------------------------------+
13 # This file is part of Check_MK.
14 # The official homepage is at http://mathias-kettner.de/check_mk.
16 # check_mk is free software; you can redistribute it and/or modify it
17 # under the terms of the GNU General Public License as published by
18 # the Free Software Foundation in version 2. check_mk is distributed
19 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
20 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
22 # tails. You should have received a copy of the GNU General Public
23 # License along with GNU Make; see the file COPYING. If not, write
24 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
25 # Boston, MA 02110-1301 USA.
27 import typing as _typing # pylint: disable=unused-import
29 # This file contains the defaults settings for almost all configuration
30 # variables that can be overridden in main.mk. Some configuration
31 # variables are preset in checks/* as well.
33 # TODO: Remove the duplication with cmk_base.config
34 _ALL_HOSTS = ['@all'] # physical and cluster hosts
35 _NEGATE = '@negate' # negation in boolean lists
37 monitoring_core = "nagios" # other option: "cmc"
38 mkeventd_enabled = False # Set by OMD hook
39 # TODO: Is this one deprecated for a long time?
40 agent_port = 6556
41 agent_ports = []
42 agent_encryption = []
43 snmp_ports = [] # UDP ports used for SNMP
44 tcp_connect_timeout = 5.0
45 tcp_connect_timeouts = []
46 use_dns_cache = True # prevent DNS by using own cache file
47 delay_precompile = False # delay Python compilation to Nagios execution
48 restart_locking = "abort" # also possible: "wait", None
49 check_submission = "file" # alternative: "pipe"
50 agent_min_version = 0 # warn, if plugin has not at least version
51 default_host_group = 'check_mk'
53 check_max_cachefile_age = 0 # per default do not use cache files when checking
54 cluster_max_cachefile_age = 90 # secs.
55 piggyback_max_cachefile_age = 3600 # secs
56 piggyback_translation = [] # Ruleset for translating piggyback host names
57 service_description_translation = [] # Ruleset for translating service descriptions
58 simulation_mode = False
59 fake_dns = None # type: _typing.Optional[str]
60 agent_simulator = False
61 perfdata_format = "pnp" # also possible: "standard"
62 check_mk_perfdata_with_times = True
63 # TODO: Remove these options?
64 debug_log = False # deprecated
65 monitoring_host = None # deprecated
66 max_num_processes = 50
67 fallback_agent_output_encoding = 'latin1'
68 stored_passwords = {}
69 # Collection of predefined rule conditions. For the moment this setting is only stored
70 # in this config domain but not used by the base code. The WATO logic for writing out
71 # rule.mk files is resolving the predefined conditions.
72 predefined_conditions = {}
73 http_proxies = {} # Global setting for managing HTTP proxy configs
75 # SNMP communities and encoding
76 use_inline_snmp = True
77 non_inline_snmp_hosts = [] # Ruleset to disable Inline-SNMP per host when
78 # use_inline_snmp is enabled.
80 snmp_limit_oid_range = [] # Ruleset to recduce fetched OIDs of a check, only inline SNMP
81 snmp_bulk_size = [] # Ruleset to customize bulk size
82 record_inline_snmp_stats = False
83 snmp_default_community = 'public'
84 snmp_communities = []
85 explicit_snmp_communities = {} # override the rule based configuration
86 snmp_timing = []
87 snmp_character_encodings = []
89 # Custom variables
90 explicit_service_custom_variables = {}
92 # Management board settings
93 management_board_config = [] # Ruleset to specify management board settings
94 management_protocol = {} # Mapping from hostname to management board protocol
95 management_snmp_credentials = {} # Mapping from hostname to SNMP credentials
96 management_ipmi_credentials = {} # Mapping from hostname to IPMI credentials
98 # RRD creation (only with CMC)
99 cmc_log_rrdcreation = None # also: "terse", "full"
100 cmc_host_rrd_config = [] # Rule for per-host configuration of RRDs
101 cmc_service_rrd_config = [] # Rule for per-service configuration of RRDs
103 # Inventory and inventory checks
104 inventory_check_interval = None # Nagios intervals (4h = 240)
105 inventory_check_severity = 1 # warning
106 inventory_check_do_scan = True # include SNMP scan for SNMP devices
107 inventory_max_cachefile_age = 120 # seconds
108 inventory_check_autotrigger = True # Automatically trigger inv-check after automation-inventory
109 # TODO: Remove this already deprecated option
110 always_cleanup_autochecks = None # For compatiblity with old configuration
112 periodic_discovery = []
114 # Nagios templates and other settings concerning generation
115 # of Nagios configuration files. No need to change these values.
116 # Better adopt the content of the templates
117 host_template = 'check_mk_host'
118 cluster_template = 'check_mk_cluster'
119 pingonly_template = 'check_mk_pingonly'
120 active_service_template = 'check_mk_active'
121 inventory_check_template = 'check_mk_inventory'
122 passive_service_template = 'check_mk_passive'
123 passive_service_template_perf = 'check_mk_passive_perf'
124 summary_service_template = 'check_mk_summarized'
125 service_dependency_template = 'check_mk'
126 generate_hostconf = True
127 generate_dummy_commands = True
128 dummy_check_commandline = 'echo "ERROR - you did an active check on this service - please disable active checks" && exit 1'
129 nagios_illegal_chars = '`;~!$%^&*|\'"<>?,()='
131 # Data to be defined in main.mk
132 checks = []
133 static_checks = {}
134 check_parameters = []
135 checkgroup_parameters = {}
136 inv_parameters = {} # for HW/SW-Inventory
137 legacy_checks = [] # non-WATO variant of legacy checks
138 active_checks = {} # WATO variant for fully formalized checks
139 special_agents = {} # WATO variant for datasource_programs
140 custom_checks = [] # WATO variant for free-form custom checks without formalization
141 all_hosts = []
142 host_tags = {} # store host tag config per host
143 host_labels = {} # store explicit host labels per host
144 host_label_rules = [] # Assign labels via ruleset to hosts
145 service_label_rules = [] # Asssing labels via ruleset to services
146 # TODO: This is a derived variable. Should be handled like others
147 # (hosttags, service_service_levels, ...)
148 host_paths = {}
149 snmp_hosts = [
150 (['snmp'], _ALL_HOSTS),
152 tcp_hosts = [
153 (['tcp'], _ALL_HOSTS),
154 (_NEGATE, ['snmp'], _ALL_HOSTS),
155 # Match all those that don't have ping and don't have no-agent set
156 (['!ping', '!no-agent'], _ALL_HOSTS),
158 bulkwalk_hosts = []
159 snmpv2c_hosts = []
160 snmp_without_sys_descr = []
161 snmpv3_contexts = []
162 usewalk_hosts = []
163 dyndns_hosts = [] # use host name as ip address for these hosts
164 primary_address_family = []
165 ignored_checktypes = [] # exclude from inventory
166 ignored_services = [] # exclude from inventory
167 ignored_checks = [] # exclude from inventory
168 host_groups = []
169 service_groups = []
170 service_contactgroups = []
171 service_notification_periods = [] # deprecated, will be removed soon.
172 host_notification_periods = [] # deprecated, will be removed soon.
173 host_contactgroups = []
174 parents = []
175 define_hostgroups = None
176 define_servicegroups = None
177 define_contactgroups = None
178 contactgroup_members = {}
179 contacts = {}
180 timeperiods = {} # needed for WATO
181 clusters = {}
182 clustered_services = []
183 clustered_services_of = {} # new in 1.1.4
184 clustered_services_mapping = [] # new for 1.2.5i1 Wato Rule
185 datasource_programs = []
186 service_dependencies = []
187 ipaddresses = {} # mapping from hostname to IPv4 address
188 ipv6addresses = {} # mapping from hostname to IPv6 address
189 additional_ipv4addresses = {} # mapping from hostname to addtional IPv4 addresses
190 additional_ipv6addresses = {} # mapping from hostname to addtional IPv6 addresses
191 only_hosts = None
192 distributed_wato_site = None # used by distributed WATO
193 is_wato_slave_site = False
194 extra_host_conf = {}
195 extra_service_conf = {}
196 extra_nagios_conf = ""
197 service_descriptions = {}
198 scanparent_hosts = [(_ALL_HOSTS)]
199 host_attributes = {} # needed by WATO, ignored by Check_MK
200 ping_levels = [] # special parameters for host/PING check_command
201 host_check_commands = [] # alternative host check instead of check_icmp
202 check_mk_exit_status = [] # Rule for specifying CMK's exit status in case of various errors
203 check_mk_agent_target_versions = [] # Rule for defining expected version for agents
204 check_periods = []
205 snmp_check_interval = []
206 inv_exports = {} # Rulesets for inventory export hooks
207 notification_parameters = {} # Rulesets for parameters of notification scripts
208 use_new_descriptions_for = []
209 host_icons_and_actions = [] # Custom user icons / actions to be configured
210 service_icons_and_actions = [] # Custom user icons / actions to be configured
211 custom_service_attributes = [] # Match all ruleset to assign custom service attributes
212 service_tag_rules = [] # Assign tags to services
214 # Rulesets for agent bakery
215 agent_config = {}
216 bake_agents_on_restart = False
218 # Kept for compatibility, but are deprecated and not used anymore
219 extra_summary_host_conf = {}
220 extra_summary_service_conf = {}
221 summary_host_groups = []
222 summary_service_groups = [] # service groups for aggregated services
223 summary_service_contactgroups = [] # service contact groups for aggregated services
224 summary_host_notification_periods = []
225 summary_service_notification_periods = []
226 service_aggregations = []
227 non_aggregated_hosts = []
228 aggregate_check_mk = False
229 aggregation_output_format = "multiline" # new in 1.1.6. Possible also: "multiline"
230 aggr_summary_hostname = "%s-s"
231 status_data_inventory = []