Skip to content

Commit

Permalink
apache: add parameter for munin-stats port, else vservers clash
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 18, 2007
1 parent 459d599 commit f6e7fe7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion manifests/init.pp
Expand Up @@ -72,6 +72,7 @@
}

# munin integration
$real_munin_stats_port = $munin_stats_port ? { '' => 8666, default => $munin_stats_port }
package { "libwww-perl": ensure => installed }
config_file { "/etc/apache2/sites-available/munin-stats":
content => template("apache/munin-stats"),
Expand All @@ -83,7 +84,7 @@
munin::plugin {
[ "apache_accesses", "apache_processes", "apache_volume" ]:
ensure => present,
config => "env.url http://${hostname}:8666/server-status?auto"
config => "env.url http://${hostname}:${real_munin_stats_port}/server-status?auto"
}

# defines from http://reductivelabs.com/trac/puppet/wiki/Recipes/DebianApache2Recipe
Expand Down
6 changes: 3 additions & 3 deletions templates/munin-stats
@@ -1,9 +1,9 @@
# create a virtual host which provides statistics for munin
ExtendedStatus on
# hide this a little bit from "normal" accesses
Listen 8666
NameVirtualHost *:8666
<VirtualHost *:8666>
Listen <%= real_munin_stats_port %>
NameVirtualHost *:<%= real_munin_stats_port %>
<VirtualHost *:<%= real_munin_stats_port %>>
ServerName <%= hostname %>
<Directory />
Order deny,allow
Expand Down

0 comments on commit f6e7fe7

Please sign in to comment.