[sysadmin-bin] Added a little script to removed older than 5 days nagios logs on signal
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Added a little script to removed older than 5 days nagios logs on signal
- Date: Mon, 6 Feb 2012 13:56:18 +0000 (UTC)
commit 179614a078f62568a0958b8b6ccc16fbca095e6c
Author: Andrea Veri <av src gnome org>
Date: Mon Feb 6 14:56:22 2012 +0100
Added a little script to removed older than 5 days nagios logs on signal
clean_nagios_logs.sh | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/clean_nagios_logs.sh b/clean_nagios_logs.sh
new file mode 100755
index 0000000..bb3a1d7
--- /dev/null
+++ b/clean_nagios_logs.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+LOGS_DIR=/var/log/nagios3/archives
+
+# Cleanup older than 5 days nagios logs
+find $LOGS_DIR/* -mtime +5 -exec rm {} \;
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]