Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tom Niget
slapos
Commits
f1dba924
Commit
f1dba924
authored
Apr 09, 2021
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: Review parameter names
parent
28be92cc
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
21 deletions
+21
-21
software/monitor/buildout.hash.cfg
software/monitor/buildout.hash.cfg
+2
-2
software/monitor/instance-edgetest-input-schema.json
software/monitor/instance-edgetest-input-schema.json
+4
-4
software/monitor/instance-edgetest-slave-input-schema.json
software/monitor/instance-edgetest-slave-input-schema.json
+1
-1
software/monitor/instance-monitor-edgebot.cfg.jinja2
software/monitor/instance-monitor-edgebot.cfg.jinja2
+3
-3
software/monitor/instance.cfg
software/monitor/instance.cfg
+2
-2
software/monitor/test/test.py
software/monitor/test/test.py
+9
-9
No files found.
software/monitor/buildout.hash.cfg
View file @
f1dba924
...
...
@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg
md5sum =
25aacd9f1f8139fa1a31516eedc7a5eb
md5sum =
6c75441c334051d3c7d50f52b14eac0e
[template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2
...
...
@@ -30,7 +30,7 @@ md5sum = 7f257f581e1e0fdec0dcfedd5ea6ddfd
[template-monitor-edgebot]
_update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2
md5sum =
e4bb096d12b2b82d1f1b743247f5500d
md5sum =
a5cbf6d4d00a6341e5c3c92b567d8d63
[network-bench-cfg]
filename = network_bench.cfg.in
...
...
software/monitor/instance-edgetest-input-schema.json
View file @
f1dba924
...
...
@@ -2,15 +2,15 @@
"$schema"
:
"http://json-schema.org/draft-04/schema#"
,
"type"
:
"object"
,
"properties"
:
{
"nameserver"
:
{
"nameserver
-list
"
:
{
"default"
:
[],
"title"
:
"Nameserver"
,
"title"
:
"Nameserver
s
"
,
"description"
:
"List of name servers to use."
,
"type"
:
"array"
},
"check-frontend-ip"
:
{
"check-frontend-ip
-list
"
:
{
"default"
:
[],
"title"
:
"Default
list of F
rontend IPs to check"
,
"title"
:
"Default
f
rontend IPs to check"
,
"description"
:
"Default list of Frontend IPs to check, if empty no constraint is used."
,
"type"
:
"array"
}
...
...
software/monitor/instance-edgetest-slave-input-schema.json
View file @
f1dba924
...
...
@@ -35,7 +35,7 @@
"type"
:
"object"
,
"default"
:
{}
},
"check-frontend-ip"
:
{
"check-frontend-ip
-list
"
:
{
"title"
:
"Frontend IPs to check"
,
"description"
:
"List of Frontend IPs to check, if empty no constraint is used (default: comes from master partition)."
,
"type"
:
"array"
...
...
software/monitor/instance-monitor-edgebot.cfg.jinja2
View file @
f1dba924
...
...
@@ -17,7 +17,7 @@
{%- do slave.setdefault('check-certificate-expiration-days', 15) %}
{%- do slave.setdefault('failure-amount', 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 %}
{%- set class = slave['check-maximum-elapsed-time'] %}
{%- if class not in slave_instance_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-failure-amount = {{ slave['failure-amount'] }}
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}
{%- endfor %}
...
...
@@ -63,7 +63,7 @@ db = ${directory:srv}/surykatka-{{ class }}.db
rendered = ${directory:etc}/surykatka-{{ class }}.ini
template = {{ template_surykatka_ini }}
slave_instance_list = {{ dumps(slave_instance_list) }}
nameserver_list = {{ dumps(CONFIGURATION['nameserver']) }}
nameserver_list = {{ dumps(CONFIGURATION['nameserver
-list
']) }}
json = ${directory:srv}/surykatka-{{ class }}.json
{#- timeout is just a bit bigger than class time #}
timeout = {{ int(class) + 2 }}
...
...
software/monitor/instance.cfg
View file @
f1dba924
...
...
@@ -75,8 +75,8 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
# Defaults
configuration.nameserver =
configuration.check-frontend-ip =
configuration.nameserver
-list
=
configuration.check-frontend-ip
-list
=
# use monitor-base-port to have monitor listening on each instance
# on different port and also on different port than other services
# it makes it possible to instantiate it correctly on signle IP, for
...
...
software/monitor/test/test.py
View file @
f1dba924
...
...
@@ -283,7 +283,7 @@ TIMEOUT = 4
SQLITE = %(db_file)s
URL =
https://www.checkcertificateexpirationdays.org/
https://www.checkfrontendip.org/
https://www.checkfrontendip
list
.org/
https://www.checkhttpheaderdict.org/
https://www.checkstatuscode.org/
https://www.default.org/
...
...
@@ -389,7 +389,7 @@ URL =
self
.
surykatka_dict
[
2
][
'json-file'
],))
self
.
assertPromiseContent
(
'http-query-checkfrontendip-promise.py'
,
'http-query-checkfrontendip
list
-promise.py'
,
"""extra_config_dict = { 'certificate-expiration-days': '15',
'failure-amount': '2',
'http-header-dict': '{}',
...
...
@@ -398,7 +398,7 @@ URL =
'maximum-elapsed-time': '2',
'report': 'http_query',
'status-code': '200',
'url': 'https://www.checkfrontendip.org/'}"""
%
(
'url': 'https://www.checkfrontendip
list
.org/'}"""
%
(
self
.
surykatka_dict
[
2
][
'json-file'
],))
def
requestEdgetestSlaves
(
self
):
...
...
@@ -435,13 +435,13 @@ URL =
{
'url'
:
'https://www.failureamount.org/'
,
'failure-amount'
:
'10'
},
)
self
.
requestEdgetestSlave
(
'checkfrontendip'
,
{
'url'
:
'https://www.checkfrontendip.org/'
,
'check-frontend-ip'
:
[
'128.129.130.131'
,
'131.134.135.136'
]},
'checkfrontendip
list
'
,
{
'url'
:
'https://www.checkfrontendip
list
.org/'
,
'check-frontend-ip
-list
'
:
[
'128.129.130.131'
,
'131.134.135.136'
]},
)
class
TestEdgeNameserver
CheckFrontendIp
(
class
TestEdgeNameserver
ListCheckFrontendIpList
(
EdgeSlaveMixin
,
SlapOSInstanceTestCase
):
surykatka_dict
=
{
2
:
{
'expected_ini'
:
"""[SURYKATKA]
...
...
@@ -459,8 +459,8 @@ URL =
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
{
'_'
:
json
.
dumps
({
'nameserver'
:
[
'127.0.1.1'
,
'127.0.1.2'
],
'check-frontend-ip'
:
[
'127.0.0.1'
,
'127.0.0.2'
],
'nameserver
-list
'
:
[
'127.0.1.1'
,
'127.0.1.2'
],
'check-frontend-ip
-list
'
:
[
'127.0.0.1'
,
'127.0.0.2'
],
})}
def
assertSurykatkaPromises
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment