Filippo Giunchedi has submitted this change and it was merged. Change subject: statsite: replace ::txstatsd class and role calls ......................................................................
statsite: replace ::txstatsd class and role calls Bug: T90111 Change-Id: Ifd79edad4bb0a56517dcd5458b6675ecbb03547a --- M manifests/role/cache.pp M manifests/role/labmon.pp A manifests/role/statsite.pp M manifests/role/swift.pp M manifests/role/txstatsd.pp 5 files changed, 32 insertions(+), 101 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp index c704bf7..6c2a413 100644 --- a/manifests/role/cache.pp +++ b/manifests/role/cache.pp @@ -407,20 +407,8 @@ # Installs a local statsd instance for aggregating and serializing # stats before sending them off to a remote statsd instance. class varnish::statsd { - class { '::txstatsd': - settings => { - statsd => { - 'carbon-cache-host' => "graphite-in.eqiad.wmnet", - 'carbon-cache-port' => 2004, - 'listen-port' => 8125, - 'statsd-compliance' => 0, - 'prefix' => '', - 'max-queue-size' => 1000 * 1000, - 'max-datapoints-per-message' => 10 * 1000, - 'instance-name' => "statsd.${::hostname}", - }, - }, - } + class { '::txstatsd::decommission': } + include role::statsite } # == Class varnish::kafka diff --git a/manifests/role/labmon.pp b/manifests/role/labmon.pp index a7cb46c..27b3389 100644 --- a/manifests/role/labmon.pp +++ b/manifests/role/labmon.pp @@ -13,5 +13,6 @@ require => Class['role::graphite::labmon'] } - include role::txstatsd + class { '::txstatsd::decommission': } + include role::statsite } diff --git a/manifests/role/statsite.pp b/manifests/role/statsite.pp new file mode 100644 index 0000000..749d71a --- /dev/null +++ b/manifests/role/statsite.pp @@ -0,0 +1,16 @@ +# == Class: role::statsite +# +# statsite is a network daemon that listens on a socket for metric data (like +# timers and counters) and writes aggregates to a metric storage backend like +# Graphite or Ganglia. See <https://github.com/armon/statsite>. +# +class role::statsite { + system::role { "role::statsite": + description => "statsite server" + } + + class { '::statsite': } + statsite::instance { '8125': } + + diamond::collector { 'UDPCollector': } +} diff --git a/manifests/role/swift.pp b/manifests/role/swift.pp index b0716c0..6cdb80e 100644 --- a/manifests/role/swift.pp +++ b/manifests/role/swift.pp @@ -115,20 +115,8 @@ include ::swift_new::params include ::swift_new::container_sync - class { '::txstatsd': - settings => { - statsd => { - 'carbon-cache-host' => 'graphite-in.eqiad.wmnet', - 'carbon-cache-port' => 2004, - 'listen-port' => 8125, - 'statsd-compliance' => 0, - 'prefix' => '', - 'max-queue-size' => 1000 * 1000, - 'max-datapoints-per-message' => 10 * 1000, - 'instance-name' => "statsd.${::hostname}", - }, - }, - } + class { '::txstatsd::decommission': } + include role::statsite } class storage inherits role::swift::eqiad_prod { include ::swift::storage @@ -137,20 +125,8 @@ include ::swift_new::params include ::swift_new::container_sync - class { '::txstatsd': - settings => { - statsd => { - 'carbon-cache-host' => 'graphite-in.eqiad.wmnet', - 'carbon-cache-port' => 2004, - 'listen-port' => 8125, - 'statsd-compliance' => 0, - 'prefix' => '', - 'max-queue-size' => 1000 * 1000, - 'max-datapoints-per-message' => 10 * 1000, - 'instance-name' => "statsd.${::hostname}", - }, - }, - } + class { '::txstatsd::decommission': } + include role::statsite } } class esams_prod inherits role::swift::base { @@ -253,40 +229,16 @@ } include role::swift::icehouse - class { '::txstatsd': - settings => { - statsd => { - 'carbon-cache-host' => 'graphite-in.eqiad.wmnet', - 'carbon-cache-port' => 2004, - 'listen-port' => 8125, - 'statsd-compliance' => 0, - 'prefix' => '', - 'max-queue-size' => 1000 * 1000, - 'max-datapoints-per-message' => 10 * 1000, - 'instance-name' => "statsd.${::hostname}", - }, - }, - } + class { '::txstatsd::decommission': } + include role::statsite } class storage inherits role::swift::esams_prod { include ::swift::storage include ::swift::storage::monitoring include role::swift::icehouse - class { '::txstatsd': - settings => { - statsd => { - 'carbon-cache-host' => 'graphite-in.eqiad.wmnet', - 'carbon-cache-port' => 2004, - 'listen-port' => 8125, - 'statsd-compliance' => 0, - 'prefix' => '', - 'max-queue-size' => 1000 * 1000, - 'max-datapoints-per-message' => 10 * 1000, - 'instance-name' => "statsd.${::hostname}", - }, - }, - } + class { '::txstatsd::decommission': } + include role::statsite } } @@ -425,20 +377,8 @@ port => 11211, } - class { '::txstatsd': - settings => { - statsd => { - 'carbon-cache-host' => $::swift_new::params::graphite_host, - 'carbon-cache-port' => 2004, - 'listen-port' => 8125, - 'statsd-compliance' => 0, - 'prefix' => '', - 'max-queue-size' => 1000 * 1000, - 'max-datapoints-per-message' => 10 * 1000, - 'instance-name' => "statsd.${::hostname}", - }, - }, - } + class { '::txstatsd::decommission': } + include role::statsite monitoring::service { 'swift-http-frontend': description => 'Swift HTTP frontend', @@ -468,20 +408,8 @@ include ::swift_new::container_sync include ::swift_new::storage::monitoring - class { '::txstatsd': - settings => { - statsd => { - 'carbon-cache-host' => $::swift_new::params::graphite_host, - 'carbon-cache-port' => 2004, - 'listen-port' => 8125, - 'statsd-compliance' => 0, - 'prefix' => '', - 'max-queue-size' => 1000 * 1000, - 'max-datapoints-per-message' => 10 * 1000, - 'instance-name' => "statsd.${::hostname}", - }, - }, - } + class { '::txstatsd::decommission': } + include role::statsite $all_drives = hiera('swift_storage_drives') diff --git a/manifests/role/txstatsd.pp b/manifests/role/txstatsd.pp index 8aa779c..f485c3b 100644 --- a/manifests/role/txstatsd.pp +++ b/manifests/role/txstatsd.pp @@ -19,6 +19,4 @@ }, }, } - - diamond::collector { 'UDPCollector': } } -- To view, visit https://gerrit.wikimedia.org/r/202701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd79edad4bb0a56517dcd5458b6675ecbb03547a Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org> Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits