Elukey has submitted this change and it was merged.
Change subject: Add basic varnishkafka rsyslog config to the varnishkafka
module.
......................................................................
Add basic varnishkafka rsyslog config to the varnishkafka module.
The varnishkafka_rsyslog.conf is stored at the moment in the main
puppet repository and referenced/created by the role cache::kafka.
This patch adds basic rsyslog configuration for the varnishkafka
daemon without relying on any other entity (like roles) that will
have only to deal with varnishkafka instances.
Logrotate configuration for the basic daemon is contained in this
module too.
Bug: T129344
Change-Id: I91a7a10c33ac3c2a64fba0a79f30bef3ead92730
---
M files/varnishkafka_logrotate
A files/varnishkafka_rsyslog.conf
M manifests/init.pp
3 files changed, 14 insertions(+), 0 deletions(-)
Approvals:
Elukey: Looks good to me, approved
Ottomata: Looks good to me, but someone else must approve
Ema: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/files/varnishkafka_logrotate b/files/varnishkafka_logrotate
index 0465c7a..c9c97db 100644
--- a/files/varnishkafka_logrotate
+++ b/files/varnishkafka_logrotate
@@ -1,3 +1,5 @@
+# NOTE: This file is managed by Puppet.
+
/var/log/varnishkafka.log {
daily
rotate 7
diff --git a/files/varnishkafka_rsyslog.conf b/files/varnishkafka_rsyslog.conf
new file mode 100644
index 0000000..ff8f31f
--- /dev/null
+++ b/files/varnishkafka_rsyslog.conf
@@ -0,0 +1,4 @@
+# NOTE: This file is managed by Puppet.
+
+# rsyslogd varnishkafka config.
+if $programname == 'varnishkafka' then /var/log/varnishkafka.log
diff --git a/manifests/init.pp b/manifests/init.pp
index f9620be..4b7d301 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -28,6 +28,14 @@
require => Package['varnishkafka'],
}
+ # Basic rsyslog.d configuration to create /var/log/varnishkafka.log
+ file { '/etc/rsyslog.d/70-varnishkafka.conf':
+ owner => 'root',
+ group => 'root',
+ mode => '0444',
+ source => 'puppet:///modules/varnishkafka/varnishkafka_rsyslog.conf'
+ }
+
# Since we are doing per instance stats.json files, the logrotate
# config that comes with the varnishkafka instance is not sufficient.
# This file will rotate only the daemon log file at
/var/log/varnishkafka.log
--
To view, visit https://gerrit.wikimedia.org/r/279308
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I91a7a10c33ac3c2a64fba0a79f30bef3ead92730
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: Elukey <[email protected]>
Gerrit-Reviewer: Elukey <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits