Ottomata has submitted this change and it was merged.

Change subject: Fixing sampled mobile filter on gadolinium to account for new 
varnish mobile hosts.
......................................................................


Fixing sampled mobile filter on gadolinium to account for new varnish mobile 
hosts.

Change-Id: I7138ea7f3c9eee23a85095672001bd52d76e11fa
---
M templates/udp2log/filters.gadolinium.erb
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/templates/udp2log/filters.gadolinium.erb 
b/templates/udp2log/filters.gadolinium.erb
index 1277ae5..9b4eb9b 100644
--- a/templates/udp2log/filters.gadolinium.erb
+++ b/templates/udp2log/filters.gadolinium.erb
@@ -12,9 +12,17 @@
 ### All edits
 pipe 1 /usr/bin/udp-filter -F '\t' -p action=submit,action=edit >> <%= 
webrequest_log_directory %>/edits.tsv.log
 
+
+<%
+# pull in $role::cache::configuration::active_nodes
+# to find mobile host names and build a regex on which to grep.
+cache_configuration = 
scope.lookupvar('::role::cache::configuration::active_nodes')
+mobile_hosts_regex = '(' + 
cache_configuration['production']['mobile'].values.flatten.join('|') + ')'
+-%>
+
 ### Mobile traffic filter
-# All mobile traffic goes through cp1041-cp1044 varnish hosts.
-pipe 100 /bin/grep -P '^cp104[1-4]' >> <%= webrequest_log_directory 
%>/mobile-sampled-100.tsv.log
+# All mobile traffic goes through CC-cp1044 varnish hosts.
+pipe 100 /bin/grep -P '<%= mobile_hosts_regex %>' >> <%= 
webrequest_log_directory %>/mobile-sampled-100.tsv.log
 
 ### Fundraising
 ## Landing pages

-- 
To view, visit https://gerrit.wikimedia.org/r/74265
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7138ea7f3c9eee23a85095672001bd52d76e11fa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to