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
Justin
slapos
Commits
1b0ebcc8
Commit
1b0ebcc8
authored
Jan 07, 2023
by
Justin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/monitor: Added node-monitoring
parent
064d95ee
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
175 additions
and
2 deletions
+175
-2
software/monitor/buildout.hash.cfg
software/monitor/buildout.hash.cfg
+5
-1
software/monitor/instance-node-monitoring.jinja2.cfg
software/monitor/instance-node-monitoring.jinja2.cfg
+106
-0
software/monitor/instance.cfg
software/monitor/instance.cfg
+18
-1
software/monitor/software.cfg
software/monitor/software.cfg
+46
-0
No files found.
software/monitor/buildout.hash.cfg
View file @
1b0ebcc8
...
...
@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg
md5sum =
072b276e0b0dd4b4a96a50348a04c7a7
md5sum =
1aed15ab8ef224c5a37947b7dcce25ff
[template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2
...
...
@@ -28,6 +28,10 @@ md5sum = 2eb5596544d9c341acf653d4f7ce2680
_update_hash_filename_ = instance-monitor-edgetest-basic.cfg.jinja2
md5sum = efc528296ddf7fade335d5f4241c1828
[template-node-monitoring]
_update_hash_filename_ = instance-node-monitoring.jinja2.cfg
md5sum = a894ae223687d56bc86aaeb08d25e9e7
[network-bench-cfg]
filename = network_bench.cfg.in
md5sum = 4f4d1a0afc225656278154e453587aea
...
...
software/monitor/instance-node-monitoring.jinja2.cfg
0 → 100644
View file @
1b0ebcc8
[buildout]
parts =
directory
check-disk-space.py
check-partition-space.py
check-cpu-temperature.py
check-ram-usage.py
check-network-errors.py
check-network-transit.py
check-cpu-load.py
publish-connection-information
extends = {{ monitor_template }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }}
partition = {{ slap_connection['partition-id'] }}
url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
[directory]
recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }}
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
etc = ${:home}/etc
bin = ${:home}/bin
run = ${:var}/run
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
[publish-connection-information]
recipe = slapos.cookbook:publish.serialised
<= monitor-publish
[macro.promise]
<= monitor-promise-base
name = ${:_buildout_section_name_}
[check-disk-space.py]
<= macro.promise
eggs = slapos.toolbox[prediction]
promise = check_free_disk_space
config-collectordb = ${monitor-instance-parameter:collector-db}
config-frequency = {{ slapparameter_dict.get("promise_free_disk_space_frequency", 3) }}
config-threshold = {{ slapparameter_dict.get("promise_free_disk_space_threshold", 0.08) }}
config-nb-days-predicted = {{ slapparameter_dict.get("promise_free_disk_space_nb_days_predicted", 10) }}
config-display-partition = {{ int(slapparameter_dict.get("promise_free_disk_space_display_partition", 1)) }}
config-display-prediction = {{ int(slapparameter_dict.get("promise_free_disk_space_display_prediction", 1)) }}
[check-partition-space.py]
<= macro.promise
eggs = slapos.toolbox[pandas]
promise = monitor_partition_space
config-collectordb = ${monitor-instance-parameter:collector-db}
config-frequency = {{ slapparameter_dict.get("promise_monitor_space_frequency", 5) }}
config-threshold-ratio = {{ slapparameter_dict.get("promise_partition_space_threshold", 0.08) }}
[check-cpu-temperature.py]
<= macro.promise
promise = check_cpu_temperature
config-testing = false
config-frequency = {{ slapparameter_dict.get("promise_cpu_temperature_frequency", 5) }}
config-max-spot-temp = {{ slapparameter_dict.get("promise_cpu_temperature_threshold", 90) }}
config-max-avg-temp = {{ slapparameter_dict.get("promise_cpu_avg_temperature_threshold", 80) }}
config-avg-temp-duration = {{ slapparameter_dict.get("promise_cpu_avg_temperature_threshold_duration", 600) }}
config-last-avg-computation-file = ${directory:var}/promise_cpu_temperature_last_avg_file
[check-ram-usage.py]
<= macro.promise
promise = check_ram_usage
config-frequency = {{ slapparameter_dict.get("promise_ram_available_frequency", 2) }}
config-min-threshold-ram = {{ slapparameter_dict.get("promise_ram_available_threshold", 500) }}
config-min-avg-ram = {{ slapparameter_dict.get("promise_ram_avg_available_threshold", 1e3) }}
config-avg-ram-period = {{ slapparameter_dict.get("promise_ram_avg_available_threshold_duration", 600) }}
config-last-avg-ram-file = ${directory:var}/promise_ram_space_last_avg_file
[check-network-errors.py]
<= macro.promise
promise = check_network_errors_packets
config-frequency = {{ slapparameter_dict.get("promise_network_errors_frequency", 5) }}
config-max-error-messages-per-MB = {{ slapparameter_dict.get("promise_network_errors_threshold", 100) }}
config-max-lost-packets-per-MB = {{ slapparameter_dict.get("promise_network_lost_packets_threshold", 100) }}
[check-network-transit.py]
<= macro.promise
promise = check_network_transit
config-frequency = {{ slapparameter_dict.get("promise_network_transit_frequency", 5) }}
config-max-data-amount = {{ slapparameter_dict.get("promise_network_transit_max_data_threshold", 1e6) }}
config-min-data-amount = {{ slapparameter_dict.get("promise_network_transit_min_data_threshold", 0) }}
config-transit-period = {{ slapparameter_dict.get("promise_network_transit_duration", 600) }}
config-last-transit-file = ${directory:var}/promise_network_last_transit_file
[check-cpu-load.py]
<= macro.promise
promise = check_server_cpu_load
config-cpu-load-threshold = {{ slapparameter_dict.get("promise_cpu_load_threshold", 1.5) }}
software/monitor/instance.cfg
View file @
1b0ebcc8
...
...
@@ -7,10 +7,27 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = instance-
base-monitor
:output
default = instance-
node-monitoring
:output
edgetest-basic = instance-edgetest-basic:output
RootSoftwareInstance = $${:default}
[instance-node-monitoring]
recipe = slapos.recipe.template:jinja2
url = ${template-node-monitoring:target}
output = $${buildout:directory}/template-node-monitoring.cfg
extensions = jinja2.ext.do
context =
import json_module json
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
raw buildout_directory ${buildout:directory}
section slap_connection slap-connection
key slapparameter_dict slap-configuration:configuration
raw monitor_template ${monitor2-template:output}
raw network_benck_cfg_output ${network-bench-cfg:output}
raw monitor_collect_csv_dump ${monitor-collect-csv-dump:target}
[instance-base-monitor]
recipe = slapos.recipe.template:jinja2
url = ${template-monitor:target}
...
...
software/monitor/software.cfg
View file @
1b0ebcc8
...
...
@@ -7,6 +7,10 @@ extends =
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
../../component/python3/buildout.cfg
../../component/pandas/buildout.cfg
../../component/scipy/buildout.cfg
../../component/statsmodels/buildout.cfg
../../component/defaults.cfg
parts =
slapos-cookbook
...
...
@@ -32,6 +36,10 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template-node-monitoring]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
[json-test-template]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
...
...
@@ -69,3 +77,41 @@ miniupnpc = 2.0.2
peewee = 3.14.4
python-whois = 0.7.3
future = 0.18.2
# For node-monitoring
statsmodels = 0.11.1
patsy = 0.5.1
# Build GCC with Fortran for OpenBLAS (scipy & numpy)
[gcc]
max_version = 0
# Part below shall be removed after new promises are
# merged into slapos.toolbox master
# >>>>>>>>>>>>
[slapos.toolbox-repository]
recipe = slapos.recipe.build:gitclone
# Change this url once merge to nexedi/slapos.toolbox
repository = https://lab.nexedi.com/Just1/slapos.toolbox
branch = json-promise
git-executable = ${git:location}/bin/git
[slapos-toolbox-dependencies]
eggs +=
${pandas:egg}
${statsmodels:egg}
${scipy:egg}
[slapos-toolbox-dev]
<= slapos-toolbox
recipe = zc.recipe.egg:develop
setup = ${slapos.toolbox-repository:location}
[slapos-toolbox]
prerequisite = ${slapos-toolbox-dev:recipe}
eggs = slapos.toolbox
[versions]
slapos.toolbox =
# <<<<<<<<<<<<
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