Filippo Giunchedi has submitted this change and it was merged.
Change subject: graphite: split uwsgi logs to separate files
......................................................................
graphite: split uwsgi logs to separate files
Change-Id: Id2e6fbad72e7aecb22d9a402f1ab8730b1af14d5
---
A modules/graphite/files/logrotate.conf
A modules/graphite/files/rsyslog.conf
M modules/graphite/manifests/init.pp
3 files changed, 23 insertions(+), 0 deletions(-)
Approvals:
Filippo Giunchedi: Verified; Looks good to me, approved
diff --git a/modules/graphite/files/logrotate.conf
b/modules/graphite/files/logrotate.conf
new file mode 100644
index 0000000..d314cc3
--- /dev/null
+++ b/modules/graphite/files/logrotate.conf
@@ -0,0 +1,13 @@
+/var/log/uwsgi-graphite-web.log {
+ daily
+ dateext
+ dateyesterday
+ rotate 14
+ missingok
+ nocreate
+ delaycompress
+ sharedscripts
+ postrotate
+ service rsyslog rotate >/dev/null 2>&1 || true
+ endscript
+}
diff --git a/modules/graphite/files/rsyslog.conf
b/modules/graphite/files/rsyslog.conf
new file mode 100644
index 0000000..b7d8780
--- /dev/null
+++ b/modules/graphite/files/rsyslog.conf
@@ -0,0 +1,2 @@
+if $programname == "uwsgi-graphite-web" then /var/log/uwsgi-graphite-web.log
+& stop
diff --git a/modules/graphite/manifests/init.pp
b/modules/graphite/manifests/init.pp
index 862fc30..8e70093 100644
--- a/modules/graphite/manifests/init.pp
+++ b/modules/graphite/manifests/init.pp
@@ -167,6 +167,14 @@
group => 'root',
}
+ rsyslog::conf { 'graphite':
+ source => 'puppet:///modules/graphite/rsyslog.conf',
+ }
+
+ logrotate::conf { 'graphite':
+ source => 'puppet:///modules/graphite/logrotate.conf',
+ }
+
base::service_unit { 'carbon-cache@':
ensure => present,
systemd => true,
--
To view, visit https://gerrit.wikimedia.org/r/290455
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id2e6fbad72e7aecb22d9a402f1ab8730b1af14d5
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits