Updated munin module for OpenBSD 4.7.
This commit is contained in:
parent
774d0b4785
commit
7f5d0e07bd
11 changed files with 16 additions and 905 deletions
|
@ -11,16 +11,14 @@ class munin::node {
|
|||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["munin-node"],
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
OpenBSD: {
|
||||
Service["munin-node"] {
|
||||
name => "munin-node",
|
||||
binary => "/usr/local/sbin/munin-node",
|
||||
start => "/usr/local/sbin/munin-node",
|
||||
}
|
||||
}
|
||||
start => $operatingsystem ? {
|
||||
OpenBSD => "/usr/bin/install -d -o _munin /var/run/munin; /usr/local/sbin/munin-node",
|
||||
default => undef,
|
||||
},
|
||||
stop => $operatingsystem ? {
|
||||
OpenBSD => "/usr/bin/pkill -f /usr/local/sbin/munin-node",
|
||||
default => undef,
|
||||
},
|
||||
}
|
||||
|
||||
file { "/etc/munin/munin-node.conf":
|
||||
|
@ -33,7 +31,7 @@ class munin::node {
|
|||
},
|
||||
mode => 0644,
|
||||
require => Package["munin-node"],
|
||||
notify => Service["munin-node"],
|
||||
notify => Exec["munin-node-configure"],
|
||||
}
|
||||
|
||||
@@file { "/etc/munin/nodes.d/${fqdn}.conf":
|
||||
|
@ -44,32 +42,15 @@ class munin::node {
|
|||
}
|
||||
|
||||
exec { "munin-node-configure":
|
||||
command => "munin-node-configure ; true",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
command => "munin-node-configure --shell 2>/dev/null | /bin/sh",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
|
||||
user => root,
|
||||
refreshonly => true,
|
||||
require => Package["munin-node"],
|
||||
subscribe => Package["munin-node"],
|
||||
notify => Service["munin-node"],
|
||||
}
|
||||
|
||||
munin::plugin { "vmware_vms": config => "vmware" }
|
||||
|
||||
case $operatingsystem {
|
||||
OpenBSD: {
|
||||
munin::plugin { "cpu": }
|
||||
munin::plugin { "df": }
|
||||
munin::plugin { "df_inode": }
|
||||
munin::plugin { "interfaces": }
|
||||
munin::plugin { "irqstats": }
|
||||
munin::plugin { "load": }
|
||||
munin::plugin { "netstat": }
|
||||
munin::plugin { "open_files": }
|
||||
munin::plugin { "sensors_temp": }
|
||||
munin::plugin { "vmstat": }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,7 +73,7 @@ define munin::plugin($config = "") {
|
|||
|
||||
case $operatingsystem {
|
||||
OpenBSD: {
|
||||
file { "/usr/local/lib/munin/plugins/${name}":
|
||||
file { "/usr/local/libexec/munin/plugins/${name}":
|
||||
ensure => present,
|
||||
source => "puppet:///munin/plugins/${name}",
|
||||
owner => root,
|
||||
|
@ -127,7 +108,7 @@ define munin::plugin($config = "") {
|
|||
mode => 0644,
|
||||
notify => Service["munin-node"],
|
||||
require => $operatingsystem ? {
|
||||
OpenBSD => File["/usr/local/lib/munin/plugins/${name}"],
|
||||
OpenBSD => File["/usr/local/libexec/munin/plugins/${name}"],
|
||||
default => File["/usr/share/munin/plugins/${name}"],
|
||||
},
|
||||
}
|
||||
|
@ -136,13 +117,13 @@ define munin::plugin($config = "") {
|
|||
case $operatingsystem {
|
||||
OpenBSD: {
|
||||
exec { "munin-enable-${name}":
|
||||
command => "ln -s /usr/local/lib/munin/plugins/${name} /etc/munin/plugins/${name}",
|
||||
command => "ln -s /usr/local/libexec/munin/plugins/${name} /etc/munin/plugins/${name}",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
user => root,
|
||||
onlyif => [ "test ! -h /etc/munin/plugins/${name}",
|
||||
"/usr/local/lib/munin/plugins/${name} autoconf", ],
|
||||
"/usr/local/libexec/munin/plugins/${name} autoconf", ],
|
||||
notify => Service["munin-node"],
|
||||
require => File["/usr/local/lib/munin/plugins/${name}"],
|
||||
require => File["/usr/local/libexec/munin/plugins/${name}"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue