summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/plugins/debian.pp2
-rw-r--r--manifests/plugins/nagios.pp20
-rw-r--r--manifests/register.pp25
3 files changed, 19 insertions, 28 deletions
diff --git a/manifests/plugins/debian.pp b/manifests/plugins/debian.pp
index f239989..6d2faef 100644
--- a/manifests/plugins/debian.pp
+++ b/manifests/plugins/debian.pp
@@ -1,4 +1,2 @@
class munin::plugins::debian inherits munin::plugins::base {
- munin::plugin { apt_all: ensure => present; }
}
-
diff --git a/manifests/plugins/nagios.pp b/manifests/plugins/nagios.pp
deleted file mode 100644
index c07e99d..0000000
--- a/manifests/plugins/nagios.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-class munin::plugins::nagios inherits munin::plugins::base {
-
- munin::plugin::deploy {
- nagios_hosts: config => 'user root';
- nagios_svc: config => 'user root';
- nagios_perf_hosts: ensure => nagios_perf_, config => 'user root';
- nagios_perf_svc: ensure => nagios_perf_, config => 'user root';
- }
-
- exec { 'munin_nagios2stats_link':
- command => 'ln -s /usr/sbin/nagios2stats /usr/local/sbin/nagiostats',
- onlyif => ["test ! -e /usr/local/sbin/nagiostats", "test -e /usr/sbin/nagios2stats"],
- }
-
- exec { 'munin_nagios3stats_link':
- command => 'ln -s /usr/sbin/nagios3stats /usr/local/sbin/nagiostats',
- onlyif => ["test ! -e /usr/local/sbin/nagiostats", "test -e /usr/sbin/nagios3stats"],
- }
-
-}
diff --git a/manifests/register.pp b/manifests/register.pp
index e1271e1..59500a0 100644
--- a/manifests/register.pp
+++ b/manifests/register.pp
@@ -1,10 +1,23 @@
-define munin::register()
+define munin::register(
+ $host = 'absent',
+ $port = 'absent'
+)
{
- $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port }
- $munin_host_real = $munin_host ? {
- '' => $fqdn,
- 'fqdn' => $fqdn,
- default => $munin_host
+ $munin_port_real = $port ? {
+ 'absent' => $munin_port ? {
+ '' => 4949,
+ default => $munin_port
+ },
+ default => $port
+ }
+
+ $munin_host_real = $host ? {
+ 'absent' => $munin_host ? {
+ '' => $fqdn,
+ 'fqdn' => $fqdn,
+ default => $munin_host
+ },
+ default => $host
}
@@file { "/var/lib/puppet/modules/munin/nodes/${name}_${munin_port_real}":