25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# File 'manifests/gmond.pp', line 25
class ganglia::gmond (
String $globals_deaf = 'no',
String $globals_host_dmax = '0',
String $globals_send_metadata_interval = '300',
Optional[Stdlib::Fqdn] $globals_override_hostname = undef,
String $cluster_name = 'unspecified',
String $cluster_owner = 'unspecified',
String $cluster_latlong = 'unspecified',
Optional[Stdlib::Fqdn] $cluster_url = undef,
Optional[String] $host_location = 'unspecified',
Tuple $udp_send_channel = [{ mcast_join => '239.2.11.71', port => 8649, ttl => 1 }],
Tuple $udp_recv_channel = [{ mcast_join => '239.2.11.71', port => 8649, bind => '239.2.11.71' }],
Tuple $tcp_accept_channel = [{ port => 8659 }],
Variant[String, Tuple] $gmond_package_name = $ganglia::params::gmond_package_name,
String $gmond_package_ensure = 'present',
String $gmond_service_name = $ganglia::params::gmond_service_name,
String $gmond_service_config = $ganglia::params::gmond_service_config,
String $gmond_status_command = $ganglia::params::gmond_status_command,
) inherits ganglia::params {
if ($ganglia::params::gmond_status_command) {
$hasstatus = false
} else {
$hasstatus = true
}
package { $gmond_package_name:
ensure => $gmond_package_ensure,
notify => Service[$gmond_service_name],
}
file { $gmond_service_config:
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
content => template($ganglia::params::gmond_service_erb),
require => Package[$gmond_package_name],
notify => Service[$gmond_service_name]
}
service { $gmond_service_name:
ensure => running,
hasstatus => $hasstatus,
hasrestart => true,
enable => true,
status => $gmond_status_command,
}
}
|