Moved munin html files into tmpfs, added max_graph_jobs to munin.conf
This commit is contained in:
parent
16e92d694f
commit
34177b723a
3 changed files with 51 additions and 112 deletions
|
@ -223,11 +223,9 @@ class munin::server {
|
|||
seltype => "munin_var_lib_t",
|
||||
require => Package["munin"],
|
||||
}
|
||||
if "${selinux}" == "true" {
|
||||
selinux::manage_fcontext { "${munin_datadir}(/.*)?":
|
||||
type => "munin_var_lib_t",
|
||||
before => File[$munin_datadir],
|
||||
}
|
||||
selinux::manage_fcontext { "${munin_datadir}(/.*)?":
|
||||
type => "munin_var_lib_t",
|
||||
before => File[$munin_datadir],
|
||||
}
|
||||
|
||||
file { "/var/lib/munin":
|
||||
|
@ -238,33 +236,27 @@ class munin::server {
|
|||
}
|
||||
}
|
||||
|
||||
if $munin_htmldir {
|
||||
file { $munin_htmldir:
|
||||
ensure => directory,
|
||||
mode => "0755",
|
||||
owner => "munin",
|
||||
group => "munin",
|
||||
seltype => "httpd_munin_content_t",
|
||||
require => Package["munin"],
|
||||
}
|
||||
if "${selinux}" == "true" {
|
||||
selinux::manage_fcontext { "${munin_htmldir}(/.*)?":
|
||||
type => "httpd_munin_content_t",
|
||||
before => File[$munin_htmldir],
|
||||
}
|
||||
selinux::manage_fcontext { "/var/www/html/munin":
|
||||
type => "munin_var_lib_t",
|
||||
before => File["/var/www/html/munin"],
|
||||
}
|
||||
}
|
||||
|
||||
file { "/var/www/html/munin":
|
||||
ensure => $munin_htmldir,
|
||||
force => true,
|
||||
backup => ".orig",
|
||||
seltype => "munin_var_lib_t",
|
||||
require => File[$munin_htmldir],
|
||||
}
|
||||
file { "/var/cache/munin":
|
||||
ensure => directory,
|
||||
mode => "0755",
|
||||
owner => "munin",
|
||||
group => "munin",
|
||||
seltype => "httpd_munin_content_t",
|
||||
require => Package["munin"],
|
||||
}
|
||||
selinux::manage_fcontext { "/var/cache/munin":
|
||||
type => "munin_var_lib_t",
|
||||
before => File["/var/cache/munin"],
|
||||
}
|
||||
mount { "/var/cache/munin":
|
||||
ensure => mounted,
|
||||
atboot => true,
|
||||
device => "none",
|
||||
fstype => "tmpfs",
|
||||
options => "uid=munin,gid=munin,mode=0755",
|
||||
dump => "0",
|
||||
pass => "0",
|
||||
require => File["/var/cache/munin"],
|
||||
}
|
||||
|
||||
file { "/etc/munin/nodes.d":
|
||||
|
@ -281,8 +273,7 @@ class munin::server {
|
|||
|
||||
file { "/etc/munin/munin.conf.in":
|
||||
ensure => present,
|
||||
source => [ "puppet:///files/munin/munin.conf.in",
|
||||
"puppet:///modules/munin/munin.conf.in", ],
|
||||
content => template("munin/munin.conf.in.erb"),
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => "0644",
|
||||
|
@ -300,4 +291,16 @@ class munin::server {
|
|||
|
||||
File <<| tag == "munin" |>>
|
||||
|
||||
define configwebhost() {
|
||||
file { "/srv/www/https/${name}/munin":
|
||||
ensure => link,
|
||||
target => "/var/cache/munin",
|
||||
require => File["/srv/www/https/${name}"],
|
||||
}
|
||||
}
|
||||
|
||||
if $munin_webhosts {
|
||||
configwebhost { $munin_webhosts: }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue