Commit 7e291188 authored by Lisa Casino's avatar Lisa Casino

software/monitor: add new modules and promises

parent f836d702
......@@ -18,7 +18,7 @@ md5sum = 2114ae8c1e92bd33ef1347f36f567c74
[template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2
md5sum = 165a15672fc85981f68b9af2d6253254
md5sum = a87bc7d11496b0b0ee13d04ff4d0d6b4
[json-test-template]
_update_hash_filename_ = json-test-template.json.in.jinja2
......
{% set parameter_dict = dict(slapparameter_dict) %}
[buildout]
extends = {{ monitor_template_output }}
......@@ -13,7 +15,9 @@ parts =
monitor-check-memory-usage
monitor-check-cpu-usage
publish-connection-information
{%- if parameter_dict.get('display-anomaly') in ('True', 'on', '1') %}
promise-monitor-partition-space
{%- endif %}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
......@@ -59,6 +63,8 @@ bytes = 16
[monitor-instance-parameter]
monitor-httpd-port = {{ slap_configuration['configuration.monitor-base-port'] }}
# by default the prediction will be for the next 10 days
days-check-free-disk-space =
[monitor-directory]
service = ${buildout:directory}/etc/service
......@@ -97,6 +103,22 @@ output = ${directory:plugins}/system-CPU-load-check.py
mode = 600
config-cpu-load-threshold = ${slap-parameter:cpu-load-threshold}
[promise-check-free-disk-space]
eggs = slapos.toolbox[prediction]
config-nb-days-predicted = ${monitor-instance-parameter:days-check-free-disk-space}
# change "display-prediction" to decide if we use ARIMA
config-display-prediction = {{ parameter_dict.get('display-prediction', 1) }}
# change "display-partition" to decide if we display the three biggest partitions in case of error
config-display-partition = {{ parameter_dict.get('display-partition', 1) }}
[promise-monitor-partition-space]
<= monitor-promise-base
eggs = slapos.toolbox[pandas]
module = monitor_partition_space
name = monitor-partition-space.py
config-collectordb = ${monitor-instance-parameter:collector-db}
config-threshold-ratio =
[publish-connection-information]
recipe = slapos.cookbook:publish
monitor-setup-url = https://monitor.app.officejs.com/#page=settings_configurator&url=${monitor-publish-parameters:monitor-url}&username=${monitor-publish-parameters:monitor-user}&password=${monitor-publish-parameters:monitor-password}
......
......@@ -4,6 +4,9 @@ extends =
buildout.hash.cfg
../../component/pycurl/buildout.cfg
../../component/python-cryptography/buildout.cfg
../../component/pandas/buildout.cfg
../../component/statsmodels/buildout.cfg
../../component/scipy/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
../../component/python3/buildout.cfg
......@@ -16,6 +19,23 @@ parts =
template-monitor-edgetest
template-monitor
monitor-collect-csv-dump
slapos-toolbox-dependencies
[gcc]
max_version = 0
[python3]
<= python3.6
[slapos-toolbox-dependencies]
eggs =
${lxml-python:egg}
${pycurl:egg}
${python-cryptography:egg}
${backports.lzma:egg}
${pandas:egg}
${statsmodels:egg}
${scipy:egg}
[python]
part = python3
......@@ -85,3 +105,7 @@ dnspython = 1.16.0
forcediphttpsadapter = 1.0.1
miniupnpc = 2.0.2
peewee = 3.13.1
scipy = 1.0.1
statsmodels = 0.8.0
patsy = 0.4.1
pandas = 0.19.2
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