summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Haerry <haerry@puzzle.ch>2008-07-21 09:53:42 +0200
committerMarcel Haerry <haerry@puzzle.ch>2008-07-21 09:53:42 +0200
commit625265b100f1b4a9448ad9db7013e183487bb072 (patch)
tree2931f317af3aa052e03636a0e7987fc6c500932b
parent2de5b80d2686711e0d7b0d8aabee6e14919709af (diff)
parenta0eba1c444207b6fad449e3de61d60fcdd6994d9 (diff)
merged with immerda
-rw-r--r--README3
-rw-r--r--files/modules_dir/.ignore0
-rw-r--r--files/plugins/xen_traffic_all12
-rw-r--r--manifests/client.pp3
-rw-r--r--manifests/plugin.pp49
5 files changed, 23 insertions, 44 deletions
diff --git a/README b/README
index 4f0e2db..12b73e8 100644
--- a/README
+++ b/README
@@ -1,3 +1,4 @@
+== Munin ==
Munin is a performance monitoring system which creates nice RRD graphs and has
a very easy plugin interface. The munin homepage is http://munin.projects.linpro.no/
@@ -85,3 +86,5 @@ To use this module, follow these directions:
$munin_port = 4948
+ i. if you'd like to do cgi graphing, please note the following page: http://munin.projects.linpro.no/wiki/CgiHowto
+ ToDo: implement this in puppet
diff --git a/files/modules_dir/.ignore b/files/modules_dir/.ignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/files/modules_dir/.ignore
diff --git a/files/plugins/xen_traffic_all b/files/plugins/xen_traffic_all
index 3fcb508..76d4ded 100644
--- a/files/plugins/xen_traffic_all
+++ b/files/plugins/xen_traffic_all
@@ -42,18 +42,16 @@ if [ "$1" = "config" ]; then
if [ ${#devs} -gt 1 ]; then
name=$real_name"_"`echo $dev | sed 's/\./\_/'`
fi
- #echo $name"UP.label $name"
- #echo $name"DOWN.label $name"
echo $name'Down.label received'
- echo $name'Down.type COUNTER'
+ echo $name'Down.type COUNTER'
echo $name'Down.graph no'
- echo "${name}Down.cdef ${name}Down,8,*"
+ echo "${name}Down.cdef ${name}Down,8,*"
echo "${name}Up.label ${name}"
- echo $name'Up.type COUNTER'
+ echo $name'Up.type COUNTER'
echo "${name}Up.negative ${name}Down"
- echo "${name}Up.cdef ${name}Up,8,*"
- done
+ echo "${name}Up.cdef ${name}Up,8,*"
+ done
done
exit 0
fi
diff --git a/manifests/client.pp b/manifests/client.pp
index 59b6980..9a7b772 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -66,10 +66,11 @@ class munin::client::base {
}
file {"/etc/munin/munin-node.conf":
content => template("munin/munin-node.conf.$operatingsystem"),
- mode => 0644, owner => root, group => 0,
# this has to be installed before the package, so the postinst can
# boot the munin-node without failure!
before => Package["munin-node"],
+ notify => Service['munin-node'],
+ mode => 0644, owner => root, group => 0,
}
munin::register { $fqdn: }
include munin::plugins::base
diff --git a/manifests/plugin.pp b/manifests/plugin.pp
index 76d12a0..2065c79 100644
--- a/manifests/plugin.pp
+++ b/manifests/plugin.pp
@@ -134,35 +134,19 @@ define munin::plugin::deploy ($source = '', $ensure = 'present', $config = '') {
### clases for plugins
class munin::plugins::base {
- case $operatingsystem {
- centos: {
- file {
- [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]:
- source => "puppet://$server/munin/empty",
- ensure => directory, checksum => mtime,
- recurse => true, purge => true, force => true,
- mode => 0755, owner => root, group => 0;
- "/etc/munin/plugin-conf.d/munin-node":
- ensure => present,
- mode => 0644, owner => root, group => 0;
- }
- }
-
- default: {
- file {
- [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]:
- source => "puppet://$server/munin/empty",
- ensure => directory, checksum => mtime,
- recurse => true, purge => true, force => true,
- mode => 0755, owner => root, group => 0,
- notify => Service['munin-node'];
- "/etc/munin/plugin-conf.d/munin-node":
- ensure => present,
- mode => 0644, owner => root, group => 0,
- notify => Service['munin-node'],
- before => Package['munin-node'];
- }
- }
+ file {
+ [ "/etc/munin/plugins", "/etc/munin/plugin-conf.d" ]:
+ source => "puppet://$server/common/empty",
+ ignore => '.ignore',
+ ensure => directory, checksum => mtime,
+ recurse => true, purge => true, force => true,
+ mode => 0755, owner => root, group => 0,
+ notify => Service['munin-node'];
+ "/etc/munin/plugin-conf.d/munin-node":
+ ensure => present,
+ mode => 0644, owner => root, group => 0,
+ notify => Service['munin-node'],
+ before => Package['munin-node'];
}
case $kernel {
linux: {
@@ -262,13 +246,6 @@ class munin::plugins::selinux inherits munin::plugins::base {
munin::plugin::deploy { "selinux_avcstats": }
}
-class munin::plugins::squid inherits munin::plugins::base {
- munin::plugin{ 'squid_cache': config => "user root\nenv.squidhost localhost\nenv.squidport 80"}
- munin::plugin{ 'squid_icp': }
- munin::plugin{ 'squid_requests': }
- munin::plugin{ 'squid_traffic': }
-}
-
class munin::plugins::postgres inherits munin::plugins::base {
munin::plugin::deploy { "pg_conn": }
munin::plugin::deploy { "pg__connections": ensure => 'absent' }