Commit 7d8b3029 by Xiaowu Zhang

stack/erp5: add check zope longrequest log promise

1 parent aeaf212b
......@@ -74,7 +74,7 @@ md5sum = d41d8cd98f00b204e9800998ecf8427e
[template-erp5]
filename = instance-erp5.cfg.in
md5sum = eefce8adf37430b63559299699732b31
md5sum = acd108217ff7a1b02b338c01c9c4aa27
[template-zeo]
filename = instance-zeo.cfg.in
......@@ -82,7 +82,7 @@ md5sum = d400c3d449ce437a0ded77ee3d5c5df2
[template-zope]
filename = instance-zope.cfg.in
md5sum = 36f72fcff7b2ebed8343f4ec3f3568f8
md5sum = 1a06ffa9f54e59604d4fedac0f6a99e7
[template-balancer]
filename = instance-balancer.cfg.in
......
......@@ -132,6 +132,8 @@ config-saucelabs-dict = {{ dumps(slapparameter_dict.get('saucelabs-dict', {})) }
config-hosts-dict = {{ dumps(slapparameter_dict.get('hosts-dict', {})) }}
config-hostalias-dict = {{ dumps(slapparameter_dict.get('hostalias-dict', {})) }}
config-id-store-interval = {{ dumps(slapparameter_dict.get('id-store-interval')) }}
config-zope-longrequest-logger-error-threshold = {{ dumps(monitor_dict.get('zope-longrequest-logger-error-threshold', 20)) }}
config-zope-longrequest-logger-maximum-delay = {{ dumps(monitor_dict.get('zope-longrequest-logger-maximum-delay', 0)) }}
config-inituser-login = {{ dumps(inituser_login) }}
config-inituser-password = ${publish-early:inituser-password}
config-kumofs-url = ${request-memcached-persistent:connection-url}
......
......@@ -387,6 +387,20 @@ path = ${directory:promises}/{{ zope_tunnel_base_name }}
{% do publish_list.append((ipv4 ~ ":" ~ port, thread_amount, webdav)) -%}
{% endif -%}
{% if longrequest_logger_interval > 0 -%}
[{{ section('promise-check-' ~name ~ '-longrequest-error-log') }}]
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.toolbox
output = ${directory:plugins}/{{'check-' ~ name ~ '-longrequest-error-log.py'}}
content =
from slapos.promise.plugin.check_error_on_zope_longrequest_log import RunPromise
config-log-file = {{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }}
config-error-threshold = {{ slapparameter_dict["zope-longrequest-logger-error-threshold"] }}
config-maximum-delay = {{ slapparameter_dict["zope-longrequest-logger-maximum-delay"] }}
mode = 600
{% endif -%}
[{{ section('logrotate-entry-' ~ name) }}]
< = logrotate-entry-base
name = {{ name }}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!