Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/74806
Change subject: Clean-up of 'eventlogging::monitor' class.
......................................................................
Clean-up of 'eventlogging::monitor' class.
This is a last in a series of clean-up commits to the EventLogging Puppet
module. This patch updates the module to reflect changes in the Ganglia metric
module which is bundled with EventLogging. Rather than hard-code stream URIs in
the metric module's .pyconf file, the updated metric module automatically
infers stream URIs and declares metrics by reading EventLogging's configuration
files.
Change-Id: I1691bdfbf627169b1709017aefdd5a7be92cfbd1
---
A modules/eventlogging/files/eventlogging_mon.pyconf
D modules/eventlogging/files/zpubmon.pyconf
M modules/eventlogging/manifests/init.pp
M modules/eventlogging/manifests/monitor.pp
M modules/eventlogging/manifests/service/multiplexer.pp
M modules/eventlogging/manifests/service/processor.pp
6 files changed, 32 insertions(+), 63 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/06/74806/1
diff --git a/modules/eventlogging/files/eventlogging_mon.pyconf
b/modules/eventlogging/files/eventlogging_mon.pyconf
new file mode 100644
index 0000000..8b80a16
--- /dev/null
+++ b/modules/eventlogging/files/eventlogging_mon.pyconf
@@ -0,0 +1,18 @@
+# Ganglia metric module for EventLogging ZeroMQ publishers.
+# Counts messages per second. This file is managed by Puppet.
+modules {
+ module {
+ name = "eventlogging_mon"
+ language = "python"
+ }
+}
+
+collection_group {
+ collect_every = 10
+ time_threshold = 60
+ metric {
+ name_match = "zeromq_(.+)"
+ title = "\\1"
+ value_threshold = 0
+ }
+}
diff --git a/modules/eventlogging/files/zpubmon.pyconf
b/modules/eventlogging/files/zpubmon.pyconf
deleted file mode 100644
index fe49f4f..0000000
--- a/modules/eventlogging/files/zpubmon.pyconf
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * ZeroMQ publisher throughput (messages / sec) monitor for EventLogging
- * File managed by Puppet: puppet:///files/eventlogging/zpubmon.pyconf
- */
-
-modules {
- module {
- name = "zpubmon"
- language = "python"
- param groups {
- value = "EventLogging"
- }
- param server-generated-raw {
- value = "tcp://127.0.0.1:8421"
- }
- param client-generated-raw {
- value = "tcp://127.0.0.1:8422"
- }
- param valid-events {
- value = "tcp://127.0.0.1:8600"
- }
- }
-}
-
-
-collection_group {
-
- collect_every = 15
- time_threshold = 30
-
- metric {
- name = "server-generated-raw"
- title = "Server-generated events"
- value_threshold = 1
- }
- metric {
- name = "client-generated-raw"
- title = "Client-generated events"
- value_threshold = 1
- }
- metric {
- name = "valid-events"
- title = "Total valid events"
- value_threshold = 1
- }
-}
diff --git a/modules/eventlogging/manifests/init.pp
b/modules/eventlogging/manifests/init.pp
index a4a4e62..60e849a 100644
--- a/modules/eventlogging/manifests/init.pp
+++ b/modules/eventlogging/manifests/init.pp
@@ -37,6 +37,7 @@
#
class eventlogging {
include eventlogging::package
+ include eventlogging::monitor
# EventLogging jobs set 'eventlogging' gid & uid.
group { 'eventlogging':
diff --git a/modules/eventlogging/manifests/monitor.pp
b/modules/eventlogging/manifests/monitor.pp
index bbcb4a3..5045649 100644
--- a/modules/eventlogging/manifests/monitor.pp
+++ b/modules/eventlogging/manifests/monitor.pp
@@ -1,23 +1,19 @@
-# Monitor events per second using Ganglia
+# == Class: eventlogging::monitor
+#
+# This class provisions a Ganglia metric module which reports throughput
+# (measured in events per second) of all locally-published event streams.
+#
class eventlogging::monitor {
include eventlogging
- file { '/usr/lib/ganglia/python_modules/zpubmon.py':
- ensure => link,
- target => "${eventlogging::path}/ganglia/python_modules/zpubmon.py",
- require => [
- File['/usr/lib/ganglia/python_modules'],
- Package['python-zmq'],
- ],
+ file { '/usr/lib/ganglia/python_modules/eventlogging_mon.py':
+ source =>
"${eventlogging::package::path}/ganglia/python_modules/eventlogging_mon.py",
+ require => Package['python-zmq'],
}
- file { '/etc/ganglia/conf.d/zpubmon.pyconf':
- ensure => present,
- source => 'puppet:///modules/eventlogging/zpubmon.pyconf',
- require => [
- File['/etc/ganglia/conf.d'],
- File['/usr/lib/ganglia/python_modules/zpubmon.py'],
- ],
+ file { '/etc/ganglia/conf.d/eventlogging_mon.pyconf':
+ source => 'puppet:///modules/eventlogging/eventlogging_mon.pyconf',
+ require =>
File['/usr/lib/ganglia/python_modules/eventlogging_mon.py'],
notify => Service['gmond'],
}
}
diff --git a/modules/eventlogging/manifests/service/multiplexer.pp
b/modules/eventlogging/manifests/service/multiplexer.pp
index 61afee3..235e859 100644
--- a/modules/eventlogging/manifests/service/multiplexer.pp
+++ b/modules/eventlogging/manifests/service/multiplexer.pp
@@ -38,6 +38,6 @@
file { "/etc/eventlogging.d/multiplexers/${basename}":
ensure => $ensure,
content => template('eventlogging/multiplexer.erb'),
- notify => Service['eventlogging/init'],
+ notify => Service['eventlogging/init', 'gmond'],
}
}
diff --git a/modules/eventlogging/manifests/service/processor.pp
b/modules/eventlogging/manifests/service/processor.pp
index 2275dbb..98894ca 100644
--- a/modules/eventlogging/manifests/service/processor.pp
+++ b/modules/eventlogging/manifests/service/processor.pp
@@ -56,6 +56,6 @@
file { "/etc/eventlogging.d/processors/${basename}":
ensure => $ensure,
content => template('eventlogging/processor.erb'),
- notify => Service['eventlogging/init'],
+ notify => Service['eventlogging/init', 'gmond'],
}
}
--
To view, visit https://gerrit.wikimedia.org/r/74806
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1691bdfbf627169b1709017aefdd5a7be92cfbd1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits