From 6bc0a350fdccdf8f663af02e69ea0467c3ddbfc5 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 20 Jun 2014 18:51:34 +0100 Subject: [PATCH 3/4] [auditd] fix log size limiting --- sos/plugins/auditd.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sos/plugins/auditd.py b/sos/plugins/auditd.py index 7dd4cad..ebca055 100644 --- a/sos/plugins/auditd.py +++ b/sos/plugins/auditd.py @@ -18,10 +18,16 @@ class auditd(sos.plugintools.PluginBase): """Auditd related information """ - optionList = [("syslogsize", "max size (MiB) to collect per syslog file", "", 15)] + optionList = [("logsize", "max size (MiB) to collect per syslog file", "", 15), + ("all_logs", "collect all logs regardless of size", "", False)] def setup(self): self.addCopySpec("/etc/audit/auditd.conf") self.addCopySpec("/etc/audit/audit.rules") - self.addCopySpecLimit("/var/log/audit*", sizelimit = self.getOption("syslogsize")) + if not self.getOption("all_logs"): + limit = self.getOption("logsize") + self.addCopySpecLimit("/var/log/audit/audit.log", sizelimit = limit) + else: + self.addCopySpec("/var/log/audit") + return -- 1.9.3