diskstats.pp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
define munin_node () { munin_node{"diskstat_iops_$name": plugin_name => "diskstat_" } $disk_type=($name,'^(..).*$','\\1') notify{"$name: disk type = $disktype":} if "md" != ($name,'^(..).*$','\\1') { munin_node{"diskstat_latency_$name": plugin_name => "diskstat_" } } munin_node{"diskstat_throughput_$name": plugin_name => "diskstat_" } include munin_node } { file {"/usr/share/munin/plugins/diskstat_": source => "puppet:///munin_node/diskstat_", owner => root, group => root, mode => 755, } } |
output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
notice: Starting catalog run notice: md6: disk type = notice: //Node[stanmore]/Munin_node[md6]/Notify[md6: disk type = ]/message: defined 'message' as 'md6: disk type = ' notice: sdd: disk type = notice: //Node[stanmore]/Munin_node[sdd]/Notify[sdd: disk type = ]/message: defined 'message' as 'sdd: disk type = ' notice: sdb: disk type = notice: //Node[stanmore]/Munin_node[sdb]/Notify[sdb: disk type = ]/message: defined 'message' as 'sdb: disk type = ' notice: md5: disk type = notice: //Node[stanmore]/Munin_node[md5]/Notify[md5: disk type = ]/message: defined 'message' as 'md5: disk type = ' notice: sdc: disk type = notice: //Node[stanmore]/Munin_node[sdc]/Notify[sdc: disk type = ]/message: defined 'message' as 'sdc: disk type = ' notice: sda: disk type = notice: //Node[stanmore]/Munin_node[sda]/Notify[sda: disk type = ]/message: defined 'message' as 'sda: disk type = ' notice: Finished catalog run in 4.06 seconds |

