Commit b075f9cd authored by Jérome Perrin's avatar Jérome Perrin

stack/erp5: do not enforce a minimal apachedex score by default

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.
parent 93374140
......@@ -798,8 +798,8 @@
},
"apachedex-promise-threshold": {
"type": "number",
"title": "Promise fails if the overall Apdex score for the previous day is below than this value.",
"default": 70,
"title": "Promise fails if the overall Apdex score for the previous day is below than this value. A value of 0 (the default) disable the promise.",
"default": 0,
"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'],
......
......@@ -74,7 +74,7 @@ md5sum = 8e452bd32fc0d4d858b275a2b3ee790b
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = 1333d2fc21f64da4010a4eafea59d141
md5sum = 714f8f3786b61b9fb36c5a5245687eec
[template-zeo]
filename = instance-zeo.cfg.in
......@@ -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
......
......@@ -469,7 +469,7 @@ config-allow-redirects = 0
'frontend-parameter-dict': frontend_parameter_dict,
'ssl-authentication-dict': ssl_authentication_dict,
'timeout-dict': balancer_timeout_dict,
'apachedex-promise-threshold': monitor_dict.get('apachedex-promise-threshold', 70),
'apachedex-promise-threshold': monitor_dict.get('apachedex-promise-threshold', 0),
'apachedex-configuration': monitor_dict.get(
'apachedex-configuration',
[
......
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