You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ni...@apache.org on 2016/05/10 21:26:40 UTC
incubator-metron git commit: METRON-136 Added
/var/log/metron_pcapservice.log to logrotate rules (jjonez via nickwallen)
closes apache/incubator-metron#113
Repository: incubator-metron
Updated Branches:
refs/heads/master deed21e6e -> f851554e0
METRON-136 Added /var/log/metron_pcapservice.log to logrotate rules (jjonez via nickwallen) closes apache/incubator-metron#113
Project: http://git-wip-us.apache.org/repos/asf/incubator-metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metron/commit/f851554e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metron/tree/f851554e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metron/diff/f851554e
Branch: refs/heads/master
Commit: f851554e084b4e7ac79e1ede3d5377e95e9d05e9
Parents: deed21e
Author: jjonez <we...@gmail.com>
Authored: Tue May 10 17:26:03 2016 -0400
Committer: Nick Allen <ni...@nickallen.org>
Committed: Tue May 10 17:26:03 2016 -0400
----------------------------------------------------------------------
.../roles/metron_pcapservice/defaults/main.yml | 3 +++
.../roles/metron_pcapservice/tasks/main.yml | 7 ++++++
.../templates/metron-pcapservice-logrotate.yml | 26 ++++++++++++++++++++
3 files changed, 36 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/f851554e/metron-deployment/roles/metron_pcapservice/defaults/main.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/metron_pcapservice/defaults/main.yml b/metron-deployment/roles/metron_pcapservice/defaults/main.yml
index c19470a..6be114d 100644
--- a/metron-deployment/roles/metron_pcapservice/defaults/main.yml
+++ b/metron-deployment/roles/metron_pcapservice/defaults/main.yml
@@ -24,3 +24,6 @@ pcapservice_port: 8081
hbase_config_path: "/etc/hbase/conf"
query_hdfs_path: "/tmp"
pcap_hdfs_path: "/apps/metron/pcap"
+metron_pcapservice_logrotate_frequency: daily
+metron_pcapservice_logrotate_retention: 30
+
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/f851554e/metron-deployment/roles/metron_pcapservice/tasks/main.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/metron_pcapservice/tasks/main.yml b/metron-deployment/roles/metron_pcapservice/tasks/main.yml
index 9afdc3b..ed33354 100644
--- a/metron-deployment/roles/metron_pcapservice/tasks/main.yml
+++ b/metron-deployment/roles/metron_pcapservice/tasks/main.yml
@@ -16,3 +16,10 @@
#
---
- include: pcapservice.yml
+
+- name: Create Logrotate Script for metron_pcapservice
+ template:
+ src: "metron-pcapservice-logrotate.yml"
+ dest: "/etc/logrotate.d/metron-pcapservice"
+ mode: 0644
+
http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/f851554e/metron-deployment/roles/metron_pcapservice/templates/metron-pcapservice-logrotate.yml
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/metron_pcapservice/templates/metron-pcapservice-logrotate.yml b/metron-deployment/roles/metron_pcapservice/templates/metron-pcapservice-logrotate.yml
new file mode 100644
index 0000000..f6ff271
--- /dev/null
+++ b/metron-deployment/roles/metron_pcapservice/templates/metron-pcapservice-logrotate.yml
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#Metron pcapService
+/var/log/metron_pcapservice.log {
+ {{ metron_pcapservice_logrotate_frequency }}
+ rotate {{ metron_pcapservice_logrotate_retention }}
+ missingok
+ notifempty
+ copytruncate
+}
+