Andrew Bogott has submitted this change and it was merged.

Change subject: jenkins: fix up ganglia monitoring
......................................................................


jenkins: fix up ganglia monitoring

The Ganglia plugin 'jenkins' is imported by gmond using the system path
before the configured module path. Since we have python-jenkins
installed, gmond will attempt to load that instead of the actual Ganglia
plugin.

I have renamed the plugin to gmond_jenkins to avoid the conflict though
the files keep the same name in puppet to ease future updates / diffs.

Change-Id: Idad0a207e85586c476ed16955ecfeb5401f6bbf3
---
M files/ganglia/plugins/jenkins.pyconf
M manifests/role/jenkins.pp
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/files/ganglia/plugins/jenkins.pyconf 
b/files/ganglia/plugins/jenkins.pyconf
index 086186a..abfc409 100644
--- a/files/ganglia/plugins/jenkins.pyconf
+++ b/files/ganglia/plugins/jenkins.pyconf
@@ -2,10 +2,12 @@
 
 modules {
   module {
-    name = 'jenkins'
+    # wikimedia: renamed to avoid clash with python-jenkins module
+    name = 'gmond_jenkins'
     language = 'python'
 
     param base_url {
+      # wikimedia: appended '/ci'
       value = 'http://127.0.0.1:8080/ci'
     }
   }
diff --git a/manifests/role/jenkins.pp b/manifests/role/jenkins.pp
index 305c8c4..8a09d1d 100644
--- a/manifests/role/jenkins.pp
+++ b/manifests/role/jenkins.pp
@@ -22,14 +22,26 @@
        }
 
        # Ganglia monitoring for Jenkins
+       # The upstream module is named 'jenkins' which conflicts with 
python-jenkins
+       # since gmond will lookup the 'jenkins' python module in the system path
+       # before the module path.
+       # See: https://github.com/ganglia/monitor-core/issues/111
+
        file { '/usr/lib/ganglia/python_modules/jenkins.py':
+               ensure => absent,
+       }
+       file { '/usr/lib/ganglia/python_modules/gmond_jenkins.py':
                        source => 'puppet:///files/ganglia/plugins/jenkins.py',
                        owner  => 'root',
                        group  => 'root',
                        mode   => '0444',
                        notify => Service[gmond],
        }
+
        file { '/etc/ganglia/conf.d/jenkins.pyconf':
+               ensure => absent,
+       }
+       file { '/etc/ganglia/conf.d/gmond_jenkins.pyconf':
                        source => 
'puppet:///files/ganglia/plugins/jenkins.pyconf',
                        owner  => 'root',
                        group  => 'root',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idad0a207e85586c476ed16955ecfeb5401f6bbf3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to