}
# Apply munin configuration for this node
- Munin_node <<| tag == $hostname |>>
+ Munin_node <<| title == $hostname |>>
# We include munin configuration if it's not defined by
# and exported resource.
if !defined(munin::client) {
- include munin::client
+ munin_node { "$hostname": }
}
# Define a vserver instance
# Create a munin virtual resource to be realized in the node
@@munin_node { "$name":
- id => $id,
- tag => $name,
+ port => "49$id",
}
# Sound support
-# Define a munin node with custom port
-define munin_node($id) {
- # Use one port for each node
- $munin_port = "49$id"
+# Define a munin node
+define munin_node($port = '4949') {
+
+ case $global_munin_allow {
+ '': { fail("Please set \$global_munin_allow in your site config") }
+ }
+
+ $munin_allow = $node_munin_allow ? {
+ '' => $global_munin_allow,
+ default => $node_munin_allow,
+ }
+
+ $munin_port = $node_munin_port ? {
+ '' => $port
+ default => $node_munin_port,
+ }
+
include munin::client
}