Commit 1b6cecec authored by Alain Takoudjou's avatar Alain Takoudjou

introduce errorlog as rss link to slapos-master sr

parent 515e9daf
......@@ -9,9 +9,9 @@
{% set monitor_port = monitor_dict.get('port-base', 2600) %}
{% if mariadb_dict.get('monitor', False) -%}
{% do mariadb_request_dict.__setitem__('monitor-port', mariadb_dict.get('monitor-port', monitor_port)) -%}
{% set monitor_count = 2 -%}
{% set monitor_port_balancer = monitor_port + 1 -%}
{% endif -%}
{% set port_count = 2 -%}
[request-common]
recipe = slapos.cookbook:request.serialised
......@@ -127,10 +127,10 @@ config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
config-monitor = {{ dumps(zope_parameter_dict.get('monitor', False)) }}
{% if zope_parameter_dict.get('monitor', False) -%}
config-monitor-port = {{ zope_parameter_dict.get('monitor-port', monitor_port + monitor_count) }}
config-monitor-port = {{ zope_parameter_dict.get('monitor-port', monitor_port + port_count) }}
{% endif -%}
sla-computer_guid = {{ dumps(zope_parameter_dict.get('computer-guid', computer_id)) }}
{% set monitor_count = monitor_count + 1 -%}
{% set port_count = port_count + 1 -%}
{% endfor -%}
{# We need to concatenate lists that we cannot read as lists, so this gets hairy. -#}
......
......@@ -100,6 +100,31 @@ source = ${directory:logrotate-backup}
[monitor-parameters]
port = {{ slapparameter_dict['monitor-port'] }}
# Enable Log As RSS for all zope event log file
{% do part_list.append('log-as-rss-symlink') %}
[error-log-{{ node_id_base }}]
<= error-log-rss-base
script-name = {{ node_id_base }}_Log_AsRSS
extra-context =
section log_file_list zopelog-{{ node_id_base }}-list
raw item_limit 10
raw hour_interval 1
raw rotate_time 24
raw type zope
[zopelog-{{ node_id_base }}-list]
{% for i in range(slapparameter_dict['instance-count']) -%}
{% set name = 'zope-' ~ i -%}
{{ node_id_base ~ '-' ~ i }} = ${directory:log}/{{ name }}-event.log
{% endfor -%}
[{{ section('cron-entry-' ~ node_id_base ~ '-logAsRss') }}]
<= cron
recipe = slapos.cookbook:cron.d
name = ${error-log-{{ node_id_base }}:script-name}
frequency = 30 * * * *
command = ${error-log-{{ node_id_base }}:rendered}
{% endif -%}
[certificate-authority-common]
......
......@@ -72,7 +72,7 @@ mode = 644
[template-erp5]
< = download-base-part
filename = instance-erp5.cfg.in
md5sum = f4fe085a0d1f09718a9456df2af8ff79
md5sum = cf1fc493af0513e02ab106bc864b5d28
[template-balancer]
< = download-base-part
......@@ -82,7 +82,7 @@ md5sum = 95f4f8f4b9cbd438a43678af05b3aaeb
[template-zope]
< = download-base-part
filename = instance-zope.cfg.in
md5sum = 01cc08950b7f4358576dd049290c8cee
md5sum = 78c84c121d9f3c5eaf83c48686a4bcca
[template-apache-conf]
< = download-base-part
......
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