Commit ff5f63ef authored by Nicolas Wavrant's avatar Nicolas Wavrant

resilient: adds a logrotate for notifier's feed

parent 16cf7d3a
...@@ -41,7 +41,7 @@ eggs = ...@@ -41,7 +41,7 @@ eggs =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg output = ${buildout:directory}/pbsready.cfg
md5sum = 3dddf84daf5db8ff4ffc3878e206b467 md5sum = 6e3bd92750407c8d6eaffde2fc94d000
mode = 0644 mode = 0644
[pbsready-import] [pbsready-import]
...@@ -50,7 +50,7 @@ mode = 0644 ...@@ -50,7 +50,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg output = ${buildout:directory}/pbsready-import.cfg
md5sum = 10264fe1cfb7ebe567d50ebabbd93a43 md5sum = 8b4d5288f18b5404a8d87279e5dd1fde
mode = 0644 mode = 0644
[pbsready-export] [pbsready-export]
...@@ -59,14 +59,14 @@ mode = 0644 ...@@ -59,14 +59,14 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-export.cfg.in url = ${:_profile_base_location_}/pbsready-export.cfg.in
output = ${buildout:directory}/pbsready-export.cfg output = ${buildout:directory}/pbsready-export.cfg
md5sum = 793f1843a643b3c91b658eca2bad5abc md5sum = 195ab54f73883d150e45cd3339b91
mode = 0644 mode = 0644
[template-pull-backup] [template-pull-backup]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg output = ${buildout:directory}/instance-pull-backup.cfg
md5sum = 3ef8f98ff013f06fcd81bba18872e561 md5sum = 71c24e37426910af05ac484f5e206388
mode = 0644 mode = 0644
[template-replicated] [template-replicated]
......
...@@ -4,6 +4,7 @@ parts = ...@@ -4,6 +4,7 @@ parts =
publish-connection-information publish-connection-information
pbs pbs
logrotate logrotate
logrotate-entry-notifier
cron cron
cron-entry-logrotate cron-entry-logrotate
pbs-sshkeys-authority pbs-sshkeys-authority
...@@ -201,6 +202,18 @@ log = $${cron-simplelogger:log} ...@@ -201,6 +202,18 @@ log = $${cron-simplelogger:log}
frequency = daily frequency = daily
rotate-num = 30 rotate-num = 30
[logrotate-entry-notifier]
recipe = collective.recipe.template
mode = 600
input = inline:
$${directory:notifier-feeds}/* {
rotate 5
weekly
nocompress
missingok
olddir $${directory:logrotate-backup}
}
output = $${logrotate:logrotate-entries}/notifier
#---------------- #----------------
#-- #--
......
...@@ -59,6 +59,9 @@ notify = $${slap-parameter:notify} ...@@ -59,6 +59,9 @@ notify = $${slap-parameter:notify}
pidfile = $${resilient-directory:pid}/$${:name}.pid pidfile = $${resilient-directory:pid}/$${:name}.pid
max-run = 3 max-run = 3
[logrotate-entry-notifier]
output = $${rootdirectory:etc}/logrotate_notifier.conf
[notifier-exporter-promise] [notifier-exporter-promise]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 700 mode = 700
...@@ -79,7 +82,7 @@ recipe = slapos.cookbook:cron.d ...@@ -79,7 +82,7 @@ recipe = slapos.cookbook:cron.d
name = backup name = backup
frequency = $${slap-parameter:resiliency-backup-periodicity} frequency = $${slap-parameter:resiliency-backup-periodicity}
once-a-day = true once-a-day = true
command = $${notifier-exporter:wrapper} --transaction-id `date +%s` command = ${logrotate:location}/sbin/logrotate -s $${basedirectory:run}/logrotate.status $${logrotate-entry-notifier:output}; $${notifier-exporter:wrapper} --transaction-id `date +%s`
[slap-parameter] [slap-parameter]
# In cron.d format (i.e things like */15 * * * * are accepted). # In cron.d format (i.e things like */15 * * * * are accepted).
......
...@@ -8,6 +8,7 @@ parts = ...@@ -8,6 +8,7 @@ parts =
logrotate logrotate
logrotate-entry-cron logrotate-entry-cron
logrotate-entry-equeue logrotate-entry-equeue
logrotate-entry-notifier
cron cron
cron-entry-logrotate cron-entry-logrotate
resilient-sshkeys-authority resilient-sshkeys-authority
...@@ -179,4 +180,4 @@ curl_path = ${curl:location}/bin/curl ...@@ -179,4 +180,4 @@ curl_path = ${curl:location}/bin/curl
########### ###########
[backup-signature-link] [backup-signature-link]
recipe = cns.recipe.symlink recipe = cns.recipe.symlink
symlink = $${post-notification-run:proof-signature-file} = $${directory:monitor-resilient}/backup.signature symlink = $${post-notification-run:proof-signature-file} = $${directory:monitor-resilient}/backup.signature
\ No newline at end of file
...@@ -4,6 +4,7 @@ parts = ...@@ -4,6 +4,7 @@ parts =
logrotate logrotate
logrotate-entry-cron logrotate-entry-cron
logrotate-entry-equeue logrotate-entry-equeue
logrotate-entry-notifier
cron cron
cron-entry-logrotate cron-entry-logrotate
resilient-sshkeys-authority resilient-sshkeys-authority
...@@ -126,6 +127,18 @@ log = $${equeue:log} $${sshd-server:log} ...@@ -126,6 +127,18 @@ log = $${equeue:log} $${sshd-server:log}
frequency = daily frequency = daily
rotate-num = 30 rotate-num = 30
[logrotate-entry-notifier]
recipe = collective.recipe.template
mode = 600
input = inline:
$${notifier:feeds}/* {
rotate 5
weekly
nocompress
missingok
olddir $${directory:logrotate-backup}
}
output = $${logrotate:logrotate-entries}/notifier
#---------------- #----------------
#-- #--
......
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