Commit 5862b60b authored by Tristan Cavelier's avatar Tristan Cavelier

stack/erp5: fix launch of apachedex and slowquery report

parent 7a322576
......@@ -26,7 +26,7 @@ md5sum = 1af531c51f575a1d1362f2ca2d61620d
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 488b9410da5f23f9af177f81d847c930
md5sum = 93f4f4c27d9302977752240acefd4530
[template-kumofs]
filename = instance-kumofs.cfg.in
......@@ -86,7 +86,7 @@ md5sum = a4dda17c1671ead45ac92b7decc32228
[template-balancer]
filename = instance-balancer.cfg.in
md5sum = 55fce4e96d844cc418c586d8d9a67c29
md5sum = 89872075cd2f31d824369447aaf0532f
[template-haproxy-cfg]
filename = haproxy.cfg.in
......
......@@ -285,10 +285,19 @@ crl = ${:ca-dir}/crl
apachedex = ${monitor-directory:private}/apachedex
[{{ section('monitor-generate-apachedex-report') }}]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = generate-apachedex-report
# The goal is to be executed before logrotate log rotation.
# Here, logrotate-entry-base:frequency = daily, so we run at 23 o'clock every day.
frequency = 0 23 * * *
command = ${monitor-generate-apachedex-report-wrapper:wrapper-path}
[monitor-generate-apachedex-report-wrapper]
recipe = slapos.cookbook:wrapper
wrapper-path = ${monitor-directory:reports}/${:command}
wrapper-path = ${directory:bin}/${:command}
command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_dict['apachedex-location'] }}" "${directory:apachedex}" ${monitor-publish-parameters:monitor-base-url}/private/apachedex --apache-log-list "${apachedex-parameters:apache-log-list}" --configuration "${apachedex-parameters:configuration}"
command = apachedex_every_23_hour
command = generate-apachedex-report
[apachedex-parameters]
# XXX - Sample log file with curent date: apache_access.log-%(date)s.gz
......
......@@ -308,10 +308,19 @@ context =
key update_executable update-mysql:output
[{{ section('monitor-generate-mariadb-slow-query-report') }}]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = generate-mariadb-slow-query-report
# The goal is to be executed before logrotate log rotation.
# Here, logrotate-entry-base:frequency = daily, so we run at 23 o'clock every day.
frequency = 0 23 * * *
command = ${monitor-generate-mariadb-slow-query-report-wrapper:rendered}
[monitor-generate-mariadb-slow-query-report-wrapper]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['mariadb-slow-query-report-script'] }}
rendered = ${monitor-directory:reports}/${:filename}
filename = mariadb_slow_query_every_23_hour
rendered = ${directory:bin}/${:filename}
filename = generate-mariadb-slow-query-report
mode = 755
context =
raw slow_query_path ${directory:srv}/backup/logrotate/mariadb_slowquery.log
......
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