Add cron job to clean out old logs from connector machine, SC-1037.

This commit is contained in:
Fredrik Kjellman 2022-07-05 16:22:27 +02:00
parent 4eda768762
commit 50e6cc66ca

View file

@ -597,6 +597,13 @@ class eidas_connector($version="1.0.6",$hostname='localhost',$luna_debug='no') {
"IDP_PRID_SERVICE_URL=$prid_service"],
extra_parameters => ["--log-driver=syslog"]
}
sunet::scriptherder::cronjob { "${name}_clean_logs":
cmd => "/usr/bin/find /var/log/eidas-connector -ctime +180 -type f -name *.log -delete",
minute => '2',
hour => '0',
ok_criteria => ['exit_status=0','max_age=48h'],
warn_criteria => ['exit_status=1','max_age=50h'],
}
ensure_resource('class','webserver',{})
ensure_resource('class','https_server',{})
}