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 @@
},
"apachedex-promise-threshold": {
"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,
"minimum": 0,
"maximum": 100
......
......@@ -104,7 +104,7 @@ class BalancerTestCase(ERP5InstanceTestCase):
'--js-embed',
'--quiet',
],
'apachedex-promise-threshold': 100,
'apachedex-promise-threshold': 0,
'haproxy-server-check-path': '/',
'zope-family-dict': {
'default': ['dummy_http_server'],
......
......@@ -94,7 +94,7 @@ md5sum = 9c580be982d8c63ec06fc273ef3cb971
[template-balancer]
filename = instance-balancer.cfg.in
md5sum = 409a7505548576ebf0e4d5cc218e0753
md5sum = f7a9b3450f9682ef11195fe2a7c3dad6
[template-haproxy-cfg]
filename = haproxy.cfg.in
......
......@@ -525,11 +525,13 @@ apache-log-list = ${rsyslogd-cfg-parameter-dict:access-log-file}
configuration = ${monitor-apachedex-report-config:output}
promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
{%if slapparameter_dict['apachedex-promise-threshold'] %}
[{{ section('monitor-promise-apachedex-result') }}]
<= monitor-promise-base
promise = check_command_execute
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}"
{% endif %}
[{{ section('promise-check-computer-memory') }}]
<= 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