Lcarr has submitted this change and it was merged.
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, 35 insertions(+), 64 deletions(-)
Approvals:
Lcarr: Looks good to me, approved
jenkins-bot: Verified
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..e0cc6d6 100644
--- a/modules/eventlogging/manifests/monitor.pp
+++ b/modules/eventlogging/manifests/monitor.pp
@@ -1,23 +1,21 @@
-# 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':
+ ensure => present,
+ 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'],
- ],
- notify => Service['gmond'],
+ file { '/etc/ganglia/conf.d/eventlogging_mon.pyconf':
+ ensure => present,
+ 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: merged
Gerrit-Change-Id: I1691bdfbf627169b1709017aefdd5a7be92cfbd1
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: Lcarr <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits