429 lines
15 KiB
Makefile
429 lines
15 KiB
Makefile
|
|
active_checks.setdefault('cmk_inv', [])
|
|
|
|
active_checks['cmk_inv'] = [
|
|
{'condition': {'host_labels': {'cmk/docker_object': 'node'}},
|
|
'id': '078cbbf1-dfcb-4a0e-863c-46ba5b373e53',
|
|
'value': {'status_data_inventory': True}},
|
|
] + active_checks['cmk_inv']
|
|
|
|
|
|
active_checks.setdefault('http', [])
|
|
|
|
active_checks['http'] = [
|
|
{'condition': {'host_name': ['epson-xp-8600.realm.local']},
|
|
'id': '5a3560c3-48c1-4834-96a9-cb41869fccfb',
|
|
'options': {'description': 'check webserver status'},
|
|
'value': {'host': {'address': '192.168.0.100', 'port': 443},
|
|
'mode': ('url',
|
|
{'ssl': 'auto',
|
|
'uri': '/PRESENTATION/HTML/TOP/INDEX.HTML',
|
|
'urlize': True}),
|
|
'name': 'Web Check'}},
|
|
{'condition': {'host_name': ['serviceraspi.realm.local']},
|
|
'id': '00472ca8-df94-4bb2-9dde-e0c52d11bae8',
|
|
'options': {'description': 'check gitea status'},
|
|
'value': {'host': {'address': 'gitea.realm.local', 'port': 443},
|
|
'mode': ('url', {'ssl': 'auto', 'urlize': True}),
|
|
'name': 'Web Check Gitea'}},
|
|
{'condition': {'host_name': ['serviceraspi.realm.local']},
|
|
'id': 'cd277099-1fa8-4969-af8e-8a439a04c28c',
|
|
'options': {'description': 'check adguard status'},
|
|
'value': {'host': {'address': 'adguard.realm.local', 'port': 443},
|
|
'mode': ('url',
|
|
{'ssl': 'auto', 'uri': '/login.html', 'urlize': True}),
|
|
'name': 'Web Check ADGuard'}},
|
|
{'condition': {'host_name': ['serviceraspi.realm.local']},
|
|
'id': '40d08b3b-bacc-4594-8cbd-ac8c43cc96ab',
|
|
'options': {'description': 'check portainer status'},
|
|
'value': {'host': {'address': 'portainer.realm.local', 'port': 443},
|
|
'mode': ('url', {'ssl': 'auto', 'urlize': True}),
|
|
'name': 'Web Check Portainer'}},
|
|
{'condition': {'host_name': ['serviceraspi.realm.local']},
|
|
'id': '94856693-93b8-4512-8893-0132012b4bd6',
|
|
'options': {'description': 'check PhotoPrism status'},
|
|
'value': {'host': {'address': 'photoprism.realm.local', 'port': 443},
|
|
'mode': ('url', {'ssl': 'auto', 'urlize': True}),
|
|
'name': 'Web Check PhotoPrism'}},
|
|
{'condition': {'host_name': ['switch.realm.local']},
|
|
'id': 'c805bfff-9ac1-4d31-88cb-7db026b11061',
|
|
'options': {'description': 'check Switch status'},
|
|
'value': {'host': {'address': '192.168.0.3', 'port': 80},
|
|
'mode': ('url', {'urlize': True}),
|
|
'name': 'Web Check Switch'}},
|
|
] + active_checks['http']
|
|
|
|
|
|
active_checks.setdefault('mkevents', [])
|
|
|
|
active_checks['mkevents'] = [
|
|
{'condition': {},
|
|
'id': '118e464e-faca-4b4c-b687-33fd11055265',
|
|
'options': {'docu_url': 'caelebfi'},
|
|
'value': {'hostspec': ['$HOSTNAME$', '$HOSTADDRESS$']}},
|
|
] + active_checks['mkevents']
|
|
|
|
|
|
agent_config.setdefault('cmk_update_agent', [])
|
|
|
|
agent_config['cmk_update_agent'] = [
|
|
{'condition': {'host_name': {'$nor': ['euve130167.solusar.de',
|
|
'syno.realm.local']}},
|
|
'id': 'e9588a9e-4ef1-4fe7-8085-68d4e204d2a5',
|
|
'options': {'description': 'auto-deployment rule'},
|
|
'value': {'activated': True,
|
|
'edition': '64bit',
|
|
'interval': 3600,
|
|
'server_data': {'protocol': 'http',
|
|
'server': '192.168.0.99',
|
|
'site': 'realm',
|
|
'usage': 'always'},
|
|
'signature_keys': ['-----BEGIN CERTIFICATE-----\n'
|
|
'MIIC2DCCAcACAQEwDQYJKoZIhvcNAQEFBQAwMTEcMBoGA1UECgwTQ2hlY2tfTUsg\n'
|
|
'U2l0ZSByZWFsbTERMA8GA1UEAwwIY21rYWRtaW4wIBcNMjAwODIxMDk0NjE0WhgP\n'
|
|
'MjA1MDA4MTQwOTQ2MTRaMDExHDAaBgNVBAoME0NoZWNrX01LIFNpdGUgcmVhbG0x\n'
|
|
'ETAPBgNVBAMMCGNta2FkbWluMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC\n'
|
|
'AQEAvBdk25ubecYpjBvPTuon1X9ZC5VQXbLkCZqMvKazygF/JwTluENnwZlDo4xn\n'
|
|
'CIYcVTg7AP6D2dbX7+jrhlp5TuMyISKR5CuQX4gOwIrOVrufHdI7Bv19LwrFhKjZ\n'
|
|
'Z0i1nycBgZBIlc5RN2fN25pLhMzqQppPHrKBNVEf/ARWjz4iQ4DmwAS+iqnFmw4x\n'
|
|
'BYF0bSA25Cc+T/krptICidmoPJ2YbW8J0S/VBo1LUQ1pavGLgQ0X4cnZ98w86I+I\n'
|
|
'izqOh9fl1BVdJm4j1l8qk87IkEDXLlnm4umUyLG8WBCFrG/Dnfjf0Akk+YQxhrZ8\n'
|
|
'028Sl4ZHJiCHXeyF7BAMl2S+kwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA6j4uL\n'
|
|
'qItEiNZp9RWO+Woon6Nj+zerIjz+ObYC86QLO8mwTSN2oQymssfXXy/iAfSoRsqK\n'
|
|
'dZ6R/Jgc0iWukEnXTsEdWwHE8jGzwXncI6K7hJ+Yb4eaqlPIcAArodVAs6NwQ+BO\n'
|
|
'Su6oKMuuKRZdeF2u7OxZTAG3uuNmFYwK0s32QthUYmqhDD9kuZCHSNfPjIg8Na1H\n'
|
|
'sbmssgGLWZYZU3l4uFjT++F70u/GuQPx1ajE4E/Wjg1n4U4d3FnMIi77ZIS/Bb/R\n'
|
|
'aQr14hY/weN8PXc8rs0+qwdYKfGg1+mxye62obUQt4I6EuAc1Sv5XnNwIefEDxVN\n'
|
|
'wFWG11DIXR5sSb78\n'
|
|
'-----END CERTIFICATE-----\n']}},
|
|
] + agent_config['cmk_update_agent']
|
|
|
|
|
|
agent_config.setdefault('custom_files', [])
|
|
|
|
agent_config['custom_files'] = [
|
|
{'condition': {'host_name': ['serviceraspi.realm.local', 'localhost']},
|
|
'id': 'affad557-22ce-450b-8567-a96e7b896684',
|
|
'options': {'description': 'custom mrpe checks'},
|
|
'value': ['my_mrpe_checks']},
|
|
] + agent_config['custom_files']
|
|
|
|
|
|
agent_config.setdefault('mk_apt', [])
|
|
|
|
agent_config['mk_apt'] = [
|
|
{'condition': {},
|
|
'id': 'b4471dac-d08e-4318-b504-ab2dc05695a0',
|
|
'options': {'description': 'apt updates'},
|
|
'value': {'interval': 86400, 'method': 'upgrade', 'update': True}},
|
|
] + agent_config['mk_apt']
|
|
|
|
|
|
agent_config.setdefault('mk_docker', [])
|
|
|
|
agent_config['mk_docker'] = [
|
|
{'condition': {'host_name': {'$nor': ['euve130167.solusar.de']}},
|
|
'id': 'd56238d4-e233-4f5b-ab4a-d18a23e56be6',
|
|
'options': {'description': 'Docker', 'docu_url': 'caelebfi'},
|
|
'value': {'container_id': 'name', 'containers': [], 'node': []}},
|
|
] + agent_config['mk_docker']
|
|
|
|
|
|
agent_config.setdefault('mk_inventory', [])
|
|
|
|
agent_config['mk_inventory'] = [
|
|
{'condition': {},
|
|
'id': 'f5fd9995-14b5-480a-a38b-b067fb67ca6a',
|
|
'value': {'interval': 14400,
|
|
'reg_paths': ['Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
|
|
'Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall']}},
|
|
] + agent_config['mk_inventory']
|
|
|
|
|
|
agent_config.setdefault('mk_logins', [])
|
|
|
|
agent_config['mk_logins'] = [
|
|
{'condition': {'host_name': ['euve130167.solusar.de']},
|
|
'id': '56115e83-83f6-4a4f-af11-1f86133381d2',
|
|
'options': {'description': 'Logins Check'},
|
|
'value': True},
|
|
] + agent_config['mk_logins']
|
|
|
|
|
|
agent_config.setdefault('mk_mysql', [])
|
|
|
|
agent_config['mk_mysql'] = [
|
|
{'condition': {'host_name': ['euve130167.solusar.de']},
|
|
'id': '8969a38b-54ee-4c80-b2e1-da25add718ef',
|
|
'options': {'description': 'MySQL check'},
|
|
'value': {'credentials': ('monitor', '3TghcItqnx4unPfEY9wa')}},
|
|
] + agent_config['mk_mysql']
|
|
|
|
|
|
agent_config.setdefault('netstat', [])
|
|
|
|
agent_config['netstat'] = [
|
|
{'condition': {}, 'id': '4f18c90f-021f-4267-8249-1cdf2e60eb2d', 'value': {}},
|
|
] + agent_config['netstat']
|
|
|
|
|
|
agent_config.setdefault('nginx_status', [])
|
|
|
|
agent_config['nginx_status'] = [
|
|
{'condition': {'host_name': ['euve130167.solusar.de',
|
|
'serviceraspi.realm.local']},
|
|
'id': '79825c5b-95c1-44df-96d5-e1b05bd63c97',
|
|
'options': {'description': 'Nginx Checks', 'docu_url': 'caelebfi'},
|
|
'value': ('static',
|
|
[{'address': '127.0.0.1', 'port': 80, 'protocol': 'http'}])},
|
|
] + agent_config['nginx_status']
|
|
|
|
|
|
agent_config.setdefault('smart', [])
|
|
|
|
agent_config['smart'] = [
|
|
{'condition': {'host_name': ['localhost']},
|
|
'id': '0e9b9e70-0dd2-41c8-b19f-680502d47ea5',
|
|
'options': {'description': 'S.M.A.R.T. Check'},
|
|
'value': True},
|
|
] + agent_config['smart']
|
|
|
|
|
|
globals().setdefault('bulkwalk_hosts', [])
|
|
|
|
bulkwalk_hosts = [
|
|
{'condition': {'host_tags': {'snmp': 'snmp', 'snmp_ds': {'$ne': 'snmp-v1'}}},
|
|
'id': '17f65e16-29c0-4321-904c-418862aa1edf',
|
|
'options': {'description': 'Hosts with the tag "snmp-v1" must not use '
|
|
'bulkwalk'},
|
|
'value': True},
|
|
] + bulkwalk_hosts
|
|
|
|
|
|
checkgroup_parameters.setdefault('agent_update', [])
|
|
|
|
checkgroup_parameters['agent_update'] = [
|
|
{'condition': {'host_name': ['euve130167.solusar.de',
|
|
'v2202207178809194556.luckysrv.de']},
|
|
'id': '51df97f0-4f88-4a5d-b7d9-40283d6b193c',
|
|
'options': {'comment': '2022-05-25 caelebfi: created rule\n',
|
|
'description': 'tls not active',
|
|
'disabled': False},
|
|
'value': {'legacy_pull_mode': 0}},
|
|
] + checkgroup_parameters['agent_update']
|
|
|
|
|
|
checkgroup_parameters.setdefault('if', [])
|
|
|
|
checkgroup_parameters['if'] = [
|
|
{'condition': {},
|
|
'id': '26e4e1b3-e84d-4ace-bd2e-b08275f4a6ae',
|
|
'value': {'unit': 'bit'}},
|
|
] + checkgroup_parameters['if']
|
|
|
|
|
|
checkgroup_parameters.setdefault('logwatch_ec', [])
|
|
|
|
checkgroup_parameters['logwatch_ec'] = [
|
|
{'condition': {'host_name': ['syno.realm.local']},
|
|
'id': 'ff0f4c77-aa55-4696-9d3e-24b30d2467c9',
|
|
'options': {'docu_url': 'caelebfi'},
|
|
'value': {'facility': 17, 'method': '', 'monitor_logfilelist': False}},
|
|
] + checkgroup_parameters['logwatch_ec']
|
|
|
|
|
|
checkgroup_parameters.setdefault('ssllabs_grade', [])
|
|
|
|
checkgroup_parameters['ssllabs_grade'] = [
|
|
{'condition': {},
|
|
'id': '5c24c39d-16ca-49a0-a858-0c1b6acd7646',
|
|
'options': {'disabled': True, 'docu_url': 'caelebfi'},
|
|
'value': {'score': ('A', 'B|C', 'D|E|F|M|T')}},
|
|
] + checkgroup_parameters['ssllabs_grade']
|
|
|
|
|
|
globals().setdefault('cmc_host_rrd_config', [])
|
|
|
|
cmc_host_rrd_config = [
|
|
{'condition': {},
|
|
'id': '6f0de5d6-c82e-4282-9df1-6e9d083edec9',
|
|
'options': {'description': 'Default RRD configuration, using new single RRD '
|
|
'format'},
|
|
'value': {'cfs': ['MIN', 'MAX', 'AVERAGE'],
|
|
'format': 'cmc_single',
|
|
'rras': [(50.0, 1, 2880),
|
|
(50.0, 5, 2880),
|
|
(50.0, 30, 4320),
|
|
(50.0, 360, 5840)],
|
|
'step': 60}},
|
|
] + cmc_host_rrd_config
|
|
|
|
|
|
globals().setdefault('cmc_service_rrd_config', [])
|
|
|
|
cmc_service_rrd_config = [
|
|
{'condition': {},
|
|
'id': '9a3a69c8-29b1-445f-82d3-44d7eb54f016',
|
|
'options': {'description': 'Default RRD configuration, using new single RRD '
|
|
'format'},
|
|
'value': {'cfs': ['MIN', 'MAX', 'AVERAGE'],
|
|
'format': 'cmc_single',
|
|
'rras': [(50.0, 1, 2880),
|
|
(50.0, 5, 2880),
|
|
(50.0, 30, 4320),
|
|
(50.0, 360, 5840)],
|
|
'step': 60}},
|
|
] + cmc_service_rrd_config
|
|
|
|
|
|
globals().setdefault('datasource_programs', [])
|
|
|
|
datasource_programs = [
|
|
{'condition': {'host_name': ['syno.realm.local']},
|
|
'id': '589c32e9-d014-4035-bf8f-a2a57a2725d5',
|
|
'options': {'description': 'access cmk via ssh on syno',
|
|
'docu_url': 'caelebfi'},
|
|
'value': 'ssh -p 2002 -T gorden@192.168.0.40'},
|
|
] + datasource_programs
|
|
|
|
|
|
extra_host_conf.setdefault('notification_options', [])
|
|
|
|
extra_host_conf['notification_options'] = [
|
|
{'condition': {},
|
|
'id': '8c0aa135-6c56-483e-a02a-9d5a07ac942a',
|
|
'value': 'd,r,f,s'},
|
|
] + extra_host_conf['notification_options']
|
|
|
|
|
|
extra_service_conf.setdefault('check_interval', [])
|
|
|
|
extra_service_conf['check_interval'] = [
|
|
{'condition': {'service_description': [{'$regex': 'Check_MK HW/SW '
|
|
'Inventory$'}]},
|
|
'id': '6d3c5e95-f2a0-465f-869b-d5df38095308',
|
|
'options': {'description': 'Restrict HW/SW-Inventory to once a day'},
|
|
'value': 1440.0},
|
|
] + extra_service_conf['check_interval']
|
|
|
|
|
|
globals().setdefault('host_check_commands', [])
|
|
|
|
host_check_commands = [
|
|
{'condition': {'host_labels': {'cmk/docker_object': 'container'}},
|
|
'id': '4c533a26-a8b8-48d9-8d46-db776225a86c',
|
|
'options': {'description': 'Make all docker container host states base on the '
|
|
'"Docker container status" service'},
|
|
'value': ('service', 'Docker container status')},
|
|
] + host_check_commands
|
|
|
|
|
|
globals().setdefault('host_contactgroups', [])
|
|
|
|
host_contactgroups = [
|
|
{'condition': {},
|
|
'id': '6c4ac064-a117-4246-9a63-66f86db48930',
|
|
'options': {'description': 'Put all hosts into the contact group "all"'},
|
|
'value': 'all'},
|
|
] + host_contactgroups
|
|
|
|
|
|
globals().setdefault('host_groups', [])
|
|
|
|
host_groups = [
|
|
{'condition': {'host_name': ['syno.realm.local']},
|
|
'id': 'a86798ad-f6cd-4d06-838a-a1d0499c9ebf',
|
|
'options': {'comment': '2022-05-31 caelebfi: created rule\n',
|
|
'description': 'syno',
|
|
'disabled': False},
|
|
'value': 'syno'},
|
|
] + host_groups
|
|
|
|
|
|
globals().setdefault('inventory_df_rules', [])
|
|
|
|
inventory_df_rules = [
|
|
{'condition': {'host_labels': {'cmk/check_mk_server': 'yes'}},
|
|
'id': '9b3e15f7-eff9-4ffa-8deb-7c768c57fdb9',
|
|
'value': {'ignore_fs_types': ['tmpfs', 'nfs', 'smbfs', 'cifs', 'iso9660'],
|
|
'never_ignore_mountpoints': ['~.*/omd/sites/[^/]+/tmp$']}},
|
|
] + inventory_df_rules
|
|
|
|
|
|
globals().setdefault('inventory_if_rules', [])
|
|
|
|
inventory_if_rules = [
|
|
{'condition': {},
|
|
'id': '0add408f-2243-45b0-aa2a-0c29ee5d337d',
|
|
'options': {'description': 'interfaces'},
|
|
'value': {'discovery_single': (True,
|
|
{'item_appearance': 'alias',
|
|
'pad_portnumbers': True}),
|
|
'matching_conditions': (True, {})}},
|
|
] + inventory_if_rules
|
|
|
|
|
|
globals().setdefault('only_hosts', [])
|
|
|
|
if only_hosts is None:
|
|
only_hosts = []
|
|
|
|
only_hosts = [
|
|
{'condition': {'host_tags': {'criticality': {'$ne': 'offline'}}},
|
|
'id': '5020d388-2319-45ad-8f73-c40e8927bc41',
|
|
'options': {'description': 'Do not monitor hosts with the tag "offline"'},
|
|
'value': True},
|
|
] + only_hosts
|
|
|
|
|
|
globals().setdefault('periodic_discovery', [])
|
|
|
|
periodic_discovery = [
|
|
{'condition': {},
|
|
'id': '218a9cb6-7134-4bfc-b2f9-2657fa6ca1fb',
|
|
'options': {'description': 'Perform every two hours a service discovery'},
|
|
'value': {'check_interval': 120.0,
|
|
'inventory_check_do_scan': True,
|
|
'severity_new_host_label': 1,
|
|
'severity_unmonitored': 1,
|
|
'severity_vanished': 0}},
|
|
] + periodic_discovery
|
|
|
|
|
|
globals().setdefault('ping_levels', [])
|
|
|
|
ping_levels = [
|
|
{'condition': {'host_tags': {'networking': 'wan'}},
|
|
'id': 'cf1db287-5f50-406f-a011-bb1eec1417d3',
|
|
'options': {'description': 'Allow longer round trip times when pinging WAN '
|
|
'hosts'},
|
|
'value': {'loss': (80.0, 100.0),
|
|
'packets': 6,
|
|
'rta': (1500.0, 3000.0),
|
|
'timeout': 20}},
|
|
] + ping_levels
|
|
|
|
|
|
special_agents.setdefault('fritzbox', [])
|
|
|
|
special_agents['fritzbox'] = [
|
|
{'condition': {'host_name': ['fritz.box']},
|
|
'id': '04f3e578-4e29-460f-bd9d-713a57f94154',
|
|
'options': {'description': 'Fritz Checks'},
|
|
'value': {'timeout': 10}},
|
|
] + special_agents['fritzbox']
|
|
|
|
|
|
special_agents.setdefault('ssllabs', [])
|
|
|
|
special_agents['ssllabs'] = [
|
|
{'condition': {},
|
|
'id': '989de85d-e8b1-4668-a639-6d50c9aba1dd',
|
|
'options': {'description': 'www.solusar.de ssl check',
|
|
'disabled': True,
|
|
'docu_url': 'caelebfi'},
|
|
'value': {'sslhost': 'www.solusar.de', 'timeout': 60}},
|
|
] + special_agents['ssllabs']
|
|
|
|
|