From 771e99602c7920b2473706a8bdf2e8a57e1d2aec Mon Sep 17 00:00:00 2001
From: Ondrej Mular <omular@redhat.com>
Date: Tue, 28 Nov 2017 13:20:16 +0100
Subject: [PATCH] change snmp agent logfile path
---
Makefile | 1 -
pcs/snmp/pcs_snmp_agent.logrotate | 10 ----------
pcs/snmp/settings.py | 2 +-
pcsd/pcsd.logrotate | 2 +-
4 files changed, 2 insertions(+), 13 deletions(-)
delete mode 100644 pcs/snmp/pcs_snmp_agent.logrotate
diff --git a/Makefile b/Makefile
index 04cd62a..5d4aed8 100644
--- a/Makefile
+++ b/Makefile
@@ -129,7 +129,6 @@ install: install_bundled_libs
install -d ${SNMP_MIB_DIR_FULL}
install -m 644 pcs/snmp/mibs/PCMK-PCS*-MIB.txt ${SNMP_MIB_DIR_FULL}
install -m 644 -D pcs/snmp/pcs_snmp_agent.conf ${DESTDIR}/etc/sysconfig/pcs_snmp_agent
- install -m 644 -D pcs/snmp/pcs_snmp_agent.logrotate ${DESTDIR}/etc/logrotate.d/pcs_snmp_agent
install -m 644 -D pcs/snmp/pcs_snmp_agent.8 ${DESTDIR}/${MANDIR}/man8/pcs_snmp_agent.8
ifeq ($(IS_SYSTEMCTL),true)
install -d ${DESTDIR}/${systemddir}/system/
diff --git a/pcs/snmp/pcs_snmp_agent.logrotate b/pcs/snmp/pcs_snmp_agent.logrotate
deleted file mode 100644
index a53c21f..0000000
--- a/pcs/snmp/pcs_snmp_agent.logrotate
+++ /dev/null
@@ -1,10 +0,0 @@
-/var/log/pcs/snmp/pcs_snmp_agent.log {
- rotate 5
- weekly
- missingok
- notifempty
- compress
- delaycompress
- copytruncate
- create 0600 root root
-}
diff --git a/pcs/snmp/settings.py b/pcs/snmp/settings.py
index 0559446..5f054ae 100644
--- a/pcs/snmp/settings.py
+++ b/pcs/snmp/settings.py
@@ -4,7 +4,7 @@ from __future__ import (
print_function,
)
-LOG_FILE = "/var/log/pcs/pcs_snmp_agent.log"
+LOG_FILE = "/var/log/pcsd/pcs_snmp_agent.log"
ENTERPRISES_OID = "1.3.6.1.4.1"
PACEMAKER_OID = ENTERPRISES_OID + ".32723"
PCS_OID = PACEMAKER_OID + ".100"
diff --git a/pcsd/pcsd.logrotate b/pcsd/pcsd.logrotate
index 36d2529..d105cff 100644
--- a/pcsd/pcsd.logrotate
+++ b/pcsd/pcsd.logrotate
@@ -1,4 +1,4 @@
-/var/log/pcsd/pcsd.log {
+/var/log/pcsd/*.log {
rotate 5
weekly
missingok
--
1.8.3.1