Commit 3ecdfa52 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Tristan Cavelier

introduce errorlog as rss link to slapos-master sr

parent fc8b7a3b
......@@ -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
......@@ -156,10 +156,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]
......
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