From b70a99905d52a8cb7853e491aff6d4b31fe678c1 Mon Sep 17 00:00:00 2001 From: Jeremy Kitchen Date: Wed, 20 Nov 2013 01:08:31 +0000 Subject: [PATCH] gmetad doesn't have a good status command on ubuntu --- manifests/gmetad/service.pp | 15 +++++++++++---- manifests/gmond/service.pp | 3 +-- manifests/params.pp | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/manifests/gmetad/service.pp b/manifests/gmetad/service.pp index e1048a3..7b18115 100644 --- a/manifests/gmetad/service.pp +++ b/manifests/gmetad/service.pp @@ -13,10 +13,17 @@ class ganglia::gmetad::service inherits ganglia::gmetad { + if ($gmetad_status_command) { + $hasstatus = false + } else { + $hasstatus = true + } + service { $gmetad_service_name: - ensure => running, - hasstatus => true, - hasrestart => true, - enable => true, + ensure => running, + hasstatus => $hasstatus, + hasrestart => true, + enable => true, + status => $gmetad_status_command, } } diff --git a/manifests/gmond/service.pp b/manifests/gmond/service.pp index 766b67d..5f7dcdc 100644 --- a/manifests/gmond/service.pp +++ b/manifests/gmond/service.pp @@ -1,6 +1,5 @@ # == Class: ganglia::gmond::service -# -# enables the gmond service +# # enables the gmond service # # === Authors # diff --git a/manifests/params.pp b/manifests/params.pp index 2298d08..7800783 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -73,6 +73,7 @@ $gmond_status_command = 'pgrep -u ganglia -f /usr/sbin/gmond' $gmetad_service_config = '/etc/ganglia/gmetad.conf' + $gmetad_status_command = 'pgrep -u nobody -f /usr/sbin/gmetad' # it's the same file as el6 with only the default user comment changed $gmetad_service_erb = 'ganglia/gmetad.conf.el6.erb' }