Ema has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391199 )
Change subject: varnish-slowreqs: reduce program length ...................................................................... varnish-slowreqs: reduce program length The feature introduced in a3f280e does not work properly for varnish frontends if the varnishncsa pid is greater than 9999. Messages produced by varnishncsa with pid > 9999 do end up in logstash without the pid and program fields. This is because the syslog tag ($programname[$pid]) must be less than 32 characters long. len("varnish-frontend-slowreqs[20040]") -> 32 len("varnish-frontend-slowreqs[9022]") -> 31 Change program names to 'varnish-fe-slowreqs' and 'varnish-be-slowreqs'. Change-Id: Iaa12f39c93c12a40f7a763ec0338638b59cab406 --- M modules/varnish/manifests/instance.pp M modules/varnish/templates/initscripts/varnish-slowreqs.systemd.erb 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/391199/1 diff --git a/modules/varnish/manifests/instance.pp b/modules/varnish/manifests/instance.pp index 8546942..559a808 100644 --- a/modules/varnish/manifests/instance.pp +++ b/modules/varnish/manifests/instance.pp @@ -169,6 +169,12 @@ } # Log slow requests to syslog + if $instance_name == '' { + $slow_requests_programname = "varnish-be-slowreqs" + } else { + $slow_requests_programname = "varnish-fe-slowreqs" + } + systemd::service { "varnish${instancesuffix}-slowreqs": ensure => present, content => systemd_template('varnish-slowreqs'), diff --git a/modules/varnish/templates/initscripts/varnish-slowreqs.systemd.erb b/modules/varnish/templates/initscripts/varnish-slowreqs.systemd.erb index 2386294..17977d3 100644 --- a/modules/varnish/templates/initscripts/varnish-slowreqs.systemd.erb +++ b/modules/varnish/templates/initscripts/varnish-slowreqs.systemd.erb @@ -6,7 +6,7 @@ [Service] StandardOutput=syslog StandardError=syslog -SyslogIdentifier=varnish<%= @instancesuffix %>-slowreqs +SyslogIdentifier=<%= @slow_requests_programname %> Restart=always # Note the usage of the %% specifier here. # See systemd.unit(5), section SPECIFIERS. -- To view, visit https://gerrit.wikimedia.org/r/391199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa12f39c93c12a40f7a763ec0338638b59cab406 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ema <e...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits