Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SlapOS Develop
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
Eric Zheng
SlapOS Develop
Commits
28be92cc
Commit
28be92cc
authored
Apr 09, 2021
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: Indent and annotate profiles
parent
d095be0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
31 deletions
+31
-31
software/monitor/buildout.hash.cfg
software/monitor/buildout.hash.cfg
+2
-2
software/monitor/instance-monitor-edgebot.cfg.jinja2
software/monitor/instance-monitor-edgebot.cfg.jinja2
+19
-19
software/monitor/instance-monitor-edgetest.cfg.jinja2
software/monitor/instance-monitor-edgetest.cfg.jinja2
+10
-10
No files found.
software/monitor/buildout.hash.cfg
View file @
28be92cc
...
@@ -26,11 +26,11 @@ md5sum = 2eb5596544d9c341acf653d4f7ce2680
...
@@ -26,11 +26,11 @@ md5sum = 2eb5596544d9c341acf653d4f7ce2680
[template-monitor-edgetest]
[template-monitor-edgetest]
_update_hash_filename_ = instance-monitor-edgetest.cfg.jinja2
_update_hash_filename_ = instance-monitor-edgetest.cfg.jinja2
md5sum =
a57106ee88ff3295b9ffce84105da79b
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 =
92a064916843a92d6c756804cee70248
md5sum =
e4bb096d12b2b82d1f1b743247f5500d
[network-bench-cfg]
[network-bench-cfg]
filename = network_bench.cfg.in
filename = network_bench.cfg.in
...
...
software/monitor/instance-monitor-edgebot.cfg.jinja2
View file @
28be92cc
...
@@ -10,22 +10,22 @@
...
@@ -10,22 +10,22 @@
{%- if extra_slave_instance_list %}
{%- if extra_slave_instance_list %}
{#- Create slaves to process with setting up defaults #}
{#- Create slaves to process with setting up defaults #}
{%- for slave in json_module.loads(extra_slave_instance_list) | sort(attribute='slave_title') %}
{%- for slave in json_module.loads(extra_slave_instance_list) | sort(attribute='slave_title') %}
{%- if '_' in slave %}
{%- if '_' in slave %}
{%- do slave.update(json_module.loads(slave.pop('_'))) %}
{%- do slave.update(json_module.loads(slave.pop('_'))) %}
{%- do slave.setdefault('check-status-code', 200) %}
{%- do slave.setdefault('check-status-code', 200) %}
{%- do slave.setdefault('check-http-header-dict', {}) %}
{%- do slave.setdefault('check-http-header-dict', {}) %}
{%- 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', CONFIGURATION['check-frontend-ip']) %}
{%- 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 %}
{%- do slave_instance_dict.__setitem__(class, []) %}
{%- do slave_instance_dict.__setitem__(class, []) %}
{%- endif %}
{%- do slave_instance_dict[class].append(slave) %}
{%- endif %}
{%- endif %}
{%- endif %}
{%- do slave_instance_dict[class].append(slave) %}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- endfor %}
{%- endif %}
{%- endif %}
{%- set part_list = [] %}
{%- set part_list = [] %}
...
@@ -101,9 +101,9 @@ cron-entries = ${directory:etc}/cron.d
...
@@ -101,9 +101,9 @@ cron-entries = ${directory:etc}/cron.d
name = surykatka-status-{{ class }}
name = surykatka-status-{{ class }}
frequency = */2 * * * *
frequency = */2 * * * *
command = ${surykatka-status-json-{{ class }}:rendered}
command = ${surykatka-status-json-{{ class }}:rendered}
{%- do part_list.append('surykatka-%i'% (class,)) %}
{%-
do part_list.append('surykatka-%i'% (class,)) %}
{%- do part_list.append('surykatka-bot-promise-%i' % (class,)) %}
{%-
do part_list.append('surykatka-bot-promise-%i' % (class,)) %}
{%- do part_list.append('cron-entry-surykatka-status-%i' % (class,)) %}
{%-
do part_list.append('cron-entry-surykatka-status-%i' % (class,)) %}
{%- endfor %}
{%- endfor %}
[buildout]
[buildout]
...
@@ -154,4 +154,4 @@ key = ${slap-connection:key-file}
...
@@ -154,4 +154,4 @@ key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
cert = ${slap-connection:cert-file}
[slap-parameter]
[slap-parameter]
{%- endif %}
{%- endif %}
{#- if slap_software_type == software_type #}
software/monitor/instance-monitor-edgetest.cfg.jinja2
View file @
28be92cc
...
@@ -16,7 +16,7 @@ extensions = jinja2.ext.do
...
@@ -16,7 +16,7 @@ extensions = jinja2.ext.do
extra-context =
extra-context =
section slave_information slap-configuration
section slave_information slap-configuration
{% set part_list = [] -%}
{%
set part_list = [] -%}
# Publish information for each slave
# Publish information for each slave
{%- set edgebot_software_type = 'edgebot' %}
{%- set edgebot_software_type = 'edgebot' %}
{%- set edgebot_quantity = slapparameter_dict.pop('edgebot-quantity', '1') | int %}
{%- set edgebot_quantity = slapparameter_dict.pop('edgebot-quantity', '1') | int %}
...
@@ -56,7 +56,7 @@ software-url = ${slap-connection:software-release-url}
...
@@ -56,7 +56,7 @@ software-url = ${slap-connection:software-release-url}
software-type = {{edgebot_software_type}}
software-type = {{edgebot_software_type}}
return = monitor-base-url
return = monitor-base-url
{% for section, edgebot_request in request_dict.items() %}
{%
for section, edgebot_request in request_dict.items() %}
[{{section}}]
[{{section}}]
<= replicate
<= replicate
name = {{ edgebot_request.get('name') }}
name = {{ edgebot_request.get('name') }}
...
@@ -68,7 +68,7 @@ state = {{ edgebot_request.get('state') }}
...
@@ -68,7 +68,7 @@ state = {{ edgebot_request.get('state') }}
{%- do slave_configuration_dict.__setitem__(slave_list_name, json_module.dumps(authorized_slave_list)) %}
{%- do slave_configuration_dict.__setitem__(slave_list_name, json_module.dumps(authorized_slave_list)) %}
{%- for config_key, config_value in slave_configuration_dict.items() %}
{%- for config_key, config_value in slave_configuration_dict.items() %}
config-{{ config_key }} = {{ dumps(config_value) }}
config-{{ config_key }} = {{ dumps(config_value) }}
{% endfor -%}
{%
endfor -%}
{%- if edgebot_request.get('sla') %}
{%- if edgebot_request.get('sla') %}
{%- for parameter, value in edgebot_request.get('sla').items() %}
{%- for parameter, value in edgebot_request.get('sla').items() %}
sla-{{ parameter }} = {{ value }}
sla-{{ parameter }} = {{ value }}
...
@@ -76,8 +76,8 @@ sla-{{ parameter }} = {{ value }}
...
@@ -76,8 +76,8 @@ sla-{{ parameter }} = {{ value }}
{%- else %}
{%- else %}
# As no SLA was provided, by default it is requested on the same computer
# As no SLA was provided, by default it is requested on the same computer
sla-computer_guid = ${slap-connection:computer-id}
sla-computer_guid = ${slap-connection:computer-id}
{% endif %}
{%
endif %}
{%- do monitor_base_url_dict.__setitem__(section, '${' ~ section ~ ':connection-monitor-base-url}') -%}
{%-
do monitor_base_url_dict.__setitem__(section, '${' ~ section ~ ':connection-monitor-base-url}') -%}
{%- endfor %}
{%- endfor %}
{%- set directory_list = [] -%}
{%- set directory_list = [] -%}
{%- for slave_instance in slave_instance_list -%}
{%- for slave_instance in slave_instance_list -%}
...
@@ -86,22 +86,22 @@ sla-computer_guid = ${slap-connection:computer-id}
...
@@ -86,22 +86,22 @@ sla-computer_guid = ${slap-connection:computer-id}
[{{ publish_section_title }}]
[{{ publish_section_title }}]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
-slave-reference = {{ slave_instance.get('slave_reference') }}
-slave-reference = {{ slave_instance.get('slave_reference') }}
{% endfor %}
{%
endfor %}
[monitor-conf-parameters]
[monitor-conf-parameters]
monitor-title = Monitor
monitor-title = Monitor
password = ${monitor-htpasswd:passwd}
password = ${monitor-htpasswd:passwd}
[monitor-base-url-dict]
[monitor-base-url-dict]
{% for key, value in monitor_base_url_dict.items() -%}
{%
for key, value in monitor_base_url_dict.items() -%}
{{ key }} = {{ value }}
{{ key }} = {{ value }}
{% endfor %}
{%
endfor %}
[buildout]
[buildout]
extends = {{ instance_base_monitor }}
extends = {{ instance_base_monitor }}
parts +=
parts +=
slave-test-configuration
slave-test-configuration
{% for part in part_list %}
{%
for part in part_list %}
{{ ' %s' % part }}
{{ ' %s' % part }}
{%- endfor %}
{%- endfor %}
{%- endif %}
{%- endif %}
{#- if slap_software_type == software_type #}
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