Commit 8cb007c9 authored by Jérome Perrin's avatar Jérome Perrin

stack/erp5: supports disable apachedex score promise

This was sometimes causing false positives, for example if site have
only one hit and this hit takes more than one second, apdex is 0% and
promise failed, it seems useful to at least have a way to disable.

We are discussed on !1716 (comment 225941)
an idea of introducing a "minimal number of hits" parameter to not
detect this false positive on sites that are not accessed enough to
calculate a meaningful apdex.
parent 93374140
...@@ -798,7 +798,7 @@ ...@@ -798,7 +798,7 @@
}, },
"apachedex-promise-threshold": { "apachedex-promise-threshold": {
"type": "number", "type": "number",
"title": "Promise fails if the overall Apdex score for the previous day is below than this value.", "title": "Promise fails if the overall Apdex score for the previous day is below than this value. A value of 0 disables the promise.",
"default": 70, "default": 70,
"minimum": 0, "minimum": 0,
"maximum": 100 "maximum": 100
......
...@@ -104,7 +104,7 @@ class BalancerTestCase(ERP5InstanceTestCase): ...@@ -104,7 +104,7 @@ class BalancerTestCase(ERP5InstanceTestCase):
'--js-embed', '--js-embed',
'--quiet', '--quiet',
], ],
'apachedex-promise-threshold': 100, 'apachedex-promise-threshold': 0,
'haproxy-server-check-path': '/', 'haproxy-server-check-path': '/',
'zope-family-dict': { 'zope-family-dict': {
'default': ['dummy_http_server'], 'default': ['dummy_http_server'],
......
...@@ -94,7 +94,7 @@ md5sum = 9c580be982d8c63ec06fc273ef3cb971 ...@@ -94,7 +94,7 @@ md5sum = 9c580be982d8c63ec06fc273ef3cb971
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 409a7505548576ebf0e4d5cc218e0753 md5sum = f7a9b3450f9682ef11195fe2a7c3dad6
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -525,11 +525,13 @@ apache-log-list = ${rsyslogd-cfg-parameter-dict:access-log-file} ...@@ -525,11 +525,13 @@ apache-log-list = ${rsyslogd-cfg-parameter-dict:access-log-file}
configuration = ${monitor-apachedex-report-config:output} configuration = ${monitor-apachedex-report-config:output}
promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }} promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
{%if slapparameter_dict['apachedex-promise-threshold'] %}
[{{ section('monitor-promise-apachedex-result') }}] [{{ section('monitor-promise-apachedex-result') }}]
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = check-apachedex-result.py name = check-apachedex-result.py
config-command = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}" config-command = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}"
{% endif %}
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
......
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