Commit f1dba924 authored by Łukasz Nowak's avatar Łukasz Nowak

monitor: Review parameter names

parent 28be92cc
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 25aacd9f1f8139fa1a31516eedc7a5eb md5sum = 6c75441c334051d3c7d50f52b14eac0e
[template-monitor] [template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2 _update_hash_filename_ = instance-monitor.cfg.jinja2
...@@ -30,7 +30,7 @@ md5sum = 7f257f581e1e0fdec0dcfedd5ea6ddfd ...@@ -30,7 +30,7 @@ md5sum = 7f257f581e1e0fdec0dcfedd5ea6ddfd
[template-monitor-edgebot] [template-monitor-edgebot]
_update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2 _update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2
md5sum = e4bb096d12b2b82d1f1b743247f5500d md5sum = a5cbf6d4d00a6341e5c3c92b567d8d63
[network-bench-cfg] [network-bench-cfg]
filename = network_bench.cfg.in filename = network_bench.cfg.in
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"type": "object", "type": "object",
"properties": { "properties": {
"nameserver": { "nameserver-list": {
"default": [], "default": [],
"title": "Nameserver", "title": "Nameservers",
"description": "List of name servers to use.", "description": "List of name servers to use.",
"type": "array" "type": "array"
}, },
"check-frontend-ip": { "check-frontend-ip-list": {
"default": [], "default": [],
"title": "Default list of Frontend IPs to check", "title": "Default frontend IPs to check",
"description": "Default list of Frontend IPs to check, if empty no constraint is used.", "description": "Default list of Frontend IPs to check, if empty no constraint is used.",
"type": "array" "type": "array"
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"type": "object", "type": "object",
"default": {} "default": {}
}, },
"check-frontend-ip": { "check-frontend-ip-list": {
"title": "Frontend IPs to check", "title": "Frontend IPs to check",
"description": "List of Frontend IPs to check, if empty no constraint is used (default: comes from master partition).", "description": "List of Frontend IPs to check, if empty no constraint is used (default: comes from master partition).",
"type": "array" "type": "array"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
{%- do slave.setdefault('check-certificate-expiration-days', 15) %} {%- do slave.setdefault('check-certificate-expiration-days', 15) %}
{%- do slave.setdefault('failure-amount', 2) %} {%- do slave.setdefault('failure-amount', 2) %}
{%- do slave.setdefault('check-maximum-elapsed-time', 2) %} {%- do slave.setdefault('check-maximum-elapsed-time', 2) %}
{%- do slave.setdefault('check-frontend-ip', CONFIGURATION['check-frontend-ip']) %} {%- do slave.setdefault('check-frontend-ip-list', CONFIGURATION['check-frontend-ip-list']) %}
{%- if 'url' in slave %} {%- if 'url' in slave %}
{%- set class = slave['check-maximum-elapsed-time'] %} {%- set class = slave['check-maximum-elapsed-time'] %}
{%- if class not in slave_instance_dict %} {%- if class not in slave_instance_dict %}
...@@ -46,7 +46,7 @@ config-http-header-dict = {{ json_module.dumps(slave['check-http-header-dict']) ...@@ -46,7 +46,7 @@ config-http-header-dict = {{ json_module.dumps(slave['check-http-header-dict'])
config-certificate-expiration-days = {{ slave['check-certificate-expiration-days'] }} config-certificate-expiration-days = {{ slave['check-certificate-expiration-days'] }}
config-failure-amount = {{ slave['failure-amount'] }} config-failure-amount = {{ slave['failure-amount'] }}
config-maximum-elapsed-time = {{ slave['check-maximum-elapsed-time'] }} config-maximum-elapsed-time = {{ slave['check-maximum-elapsed-time'] }}
config-ip-list = {{ ' '.join(slave['check-frontend-ip']) }} config-ip-list = {{ ' '.join(slave['check-frontend-ip-list']) }}
config-json-file = ${surykatka-config-{{ class }}:json} config-json-file = ${surykatka-config-{{ class }}:json}
{%- endfor %} {%- endfor %}
...@@ -63,7 +63,7 @@ db = ${directory:srv}/surykatka-{{ class }}.db ...@@ -63,7 +63,7 @@ db = ${directory:srv}/surykatka-{{ class }}.db
rendered = ${directory:etc}/surykatka-{{ class }}.ini rendered = ${directory:etc}/surykatka-{{ class }}.ini
template = {{ template_surykatka_ini }} template = {{ template_surykatka_ini }}
slave_instance_list = {{ dumps(slave_instance_list) }} slave_instance_list = {{ dumps(slave_instance_list) }}
nameserver_list = {{ dumps(CONFIGURATION['nameserver']) }} nameserver_list = {{ dumps(CONFIGURATION['nameserver-list']) }}
json = ${directory:srv}/surykatka-{{ class }}.json json = ${directory:srv}/surykatka-{{ class }}.json
{#- timeout is just a bit bigger than class time #} {#- timeout is just a bit bigger than class time #}
timeout = {{ int(class) + 2 }} timeout = {{ int(class) + 2 }}
......
...@@ -75,8 +75,8 @@ url = $${slap-connection:server-url} ...@@ -75,8 +75,8 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-file} key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file} cert = $${slap-connection:cert-file}
# Defaults # Defaults
configuration.nameserver = configuration.nameserver-list =
configuration.check-frontend-ip = configuration.check-frontend-ip-list =
# use monitor-base-port to have monitor listening on each instance # use monitor-base-port to have monitor listening on each instance
# on different port and also on different port than other services # on different port and also on different port than other services
# it makes it possible to instantiate it correctly on signle IP, for # it makes it possible to instantiate it correctly on signle IP, for
......
...@@ -283,7 +283,7 @@ TIMEOUT = 4 ...@@ -283,7 +283,7 @@ TIMEOUT = 4
SQLITE = %(db_file)s SQLITE = %(db_file)s
URL = URL =
https://www.checkcertificateexpirationdays.org/ https://www.checkcertificateexpirationdays.org/
https://www.checkfrontendip.org/ https://www.checkfrontendiplist.org/
https://www.checkhttpheaderdict.org/ https://www.checkhttpheaderdict.org/
https://www.checkstatuscode.org/ https://www.checkstatuscode.org/
https://www.default.org/ https://www.default.org/
...@@ -389,7 +389,7 @@ URL = ...@@ -389,7 +389,7 @@ URL =
self.surykatka_dict[2]['json-file'],)) self.surykatka_dict[2]['json-file'],))
self.assertPromiseContent( self.assertPromiseContent(
'http-query-checkfrontendip-promise.py', 'http-query-checkfrontendiplist-promise.py',
"""extra_config_dict = { 'certificate-expiration-days': '15', """extra_config_dict = { 'certificate-expiration-days': '15',
'failure-amount': '2', 'failure-amount': '2',
'http-header-dict': '{}', 'http-header-dict': '{}',
...@@ -398,7 +398,7 @@ URL = ...@@ -398,7 +398,7 @@ URL =
'maximum-elapsed-time': '2', 'maximum-elapsed-time': '2',
'report': 'http_query', 'report': 'http_query',
'status-code': '200', 'status-code': '200',
'url': 'https://www.checkfrontendip.org/'}""" % ( 'url': 'https://www.checkfrontendiplist.org/'}""" % (
self.surykatka_dict[2]['json-file'],)) self.surykatka_dict[2]['json-file'],))
def requestEdgetestSlaves(self): def requestEdgetestSlaves(self):
...@@ -435,13 +435,13 @@ URL = ...@@ -435,13 +435,13 @@ URL =
{'url': 'https://www.failureamount.org/', 'failure-amount': '10'}, {'url': 'https://www.failureamount.org/', 'failure-amount': '10'},
) )
self.requestEdgetestSlave( self.requestEdgetestSlave(
'checkfrontendip', 'checkfrontendiplist',
{'url': 'https://www.checkfrontendip.org/', {'url': 'https://www.checkfrontendiplist.org/',
'check-frontend-ip': ['128.129.130.131', '131.134.135.136']}, 'check-frontend-ip-list': ['128.129.130.131', '131.134.135.136']},
) )
class TestEdgeNameserverCheckFrontendIp( class TestEdgeNameserverListCheckFrontendIpList(
EdgeSlaveMixin, SlapOSInstanceTestCase): EdgeSlaveMixin, SlapOSInstanceTestCase):
surykatka_dict = { surykatka_dict = {
2: {'expected_ini': """[SURYKATKA] 2: {'expected_ini': """[SURYKATKA]
...@@ -459,8 +459,8 @@ URL = ...@@ -459,8 +459,8 @@ URL =
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
return {'_': json.dumps({ return {'_': json.dumps({
'nameserver': ['127.0.1.1', '127.0.1.2'], 'nameserver-list': ['127.0.1.1', '127.0.1.2'],
'check-frontend-ip': ['127.0.0.1', '127.0.0.2'], 'check-frontend-ip-list': ['127.0.0.1', '127.0.0.2'],
})} })}
def assertSurykatkaPromises(self): def assertSurykatkaPromises(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment