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
|
@ -1,78 +0,0 @@
|
||||||
# Example configuration file for Munin, generated by 'make build'
|
|
||||||
|
|
||||||
# The next three variables specifies where the location of the RRD
|
|
||||||
# databases, the HTML output, and the logs, severally. They all
|
|
||||||
# must be writable by the user running munin-cron.
|
|
||||||
dbdir /var/lib/munin
|
|
||||||
htmldir /var/www/html/munin
|
|
||||||
logdir /var/log/munin
|
|
||||||
rundir /var/run/munin
|
|
||||||
|
|
||||||
# Where to look for the HTML templates
|
|
||||||
tmpldir /etc/munin/templates
|
|
||||||
|
|
||||||
# Make graphs show values per minute instead of per second
|
|
||||||
#graph_period minute
|
|
||||||
|
|
||||||
# Graphics files are normaly generated by munin-graph, no matter if
|
|
||||||
# the graphs are used or not. You can change this to
|
|
||||||
# on-demand-graphing by following the instructions in
|
|
||||||
# http://munin.projects.linpro.no/wiki/CgiHowto
|
|
||||||
#
|
|
||||||
#graph_strategy cgi
|
|
||||||
|
|
||||||
# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
|
|
||||||
# something changes (OK -> WARNING, CRITICAL -> OK, etc)
|
|
||||||
#contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
|
|
||||||
#contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm
|
|
||||||
#
|
|
||||||
# For those with Nagios, the following might come in handy. In addition,
|
|
||||||
# the services must be defined in the Nagios server as well.
|
|
||||||
#contact.nagios.command /usr/sbin/send_nsca -H nagios.host.com -c /etc/send_nsca.cfg
|
|
||||||
|
|
||||||
# a simple host tree
|
|
||||||
#[localhost]
|
|
||||||
# address 127.0.0.1
|
|
||||||
# use_node_name yes
|
|
||||||
|
|
||||||
#
|
|
||||||
# A more complex example of a host tree
|
|
||||||
#
|
|
||||||
## First our "normal" host.
|
|
||||||
# [fii.foo.com]
|
|
||||||
# address foo
|
|
||||||
#
|
|
||||||
## Then our other host...
|
|
||||||
# [fay.foo.com]
|
|
||||||
# address fay
|
|
||||||
#
|
|
||||||
## Then we want totals...
|
|
||||||
# [foo.com;Totals] #Force it into the "foo.com"-domain...
|
|
||||||
# update no # Turn off data-fetching for this "host".
|
|
||||||
#
|
|
||||||
# # The graph "load1". We want to see the loads of both machines...
|
|
||||||
# # "fii=fii.foo.com:load.load" means "label=machine:graph.field"
|
|
||||||
# load1.graph_title Loads side by side
|
|
||||||
# load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
|
|
||||||
#
|
|
||||||
# # The graph "load2". Now we want them stacked on top of each other.
|
|
||||||
# load2.graph_title Loads on top of each other
|
|
||||||
# load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
|
|
||||||
# load2.dummy_field.draw AREA # We want area instead the default LINE2.
|
|
||||||
# load2.dummy_field.label dummy # This is needed. Silly, really.
|
|
||||||
#
|
|
||||||
# # The graph "load3". Now we want them summarised into one field
|
|
||||||
# load3.graph_title Loads summarised
|
|
||||||
# load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
|
|
||||||
# load3.combined_loads.label Combined loads # Must be set, as this is
|
|
||||||
# # not a dummy field!
|
|
||||||
#
|
|
||||||
## ...and on a side note, I want them listen in another order (default is
|
|
||||||
## alphabetically)
|
|
||||||
#
|
|
||||||
# # Since [foo.com] would be interpreted as a host in the domain "com", we
|
|
||||||
# # specify that this is a domain by adding a semicolon.
|
|
||||||
# [foo.com;]
|
|
||||||
# node_order Totals fii.foo.com fay.foo.com
|
|
||||||
#
|
|
||||||
|
|
|
@ -223,12 +223,10 @@ class munin::server {
|
||||||
seltype => "munin_var_lib_t",
|
seltype => "munin_var_lib_t",
|
||||||
require => Package["munin"],
|
require => Package["munin"],
|
||||||
}
|
}
|
||||||
if "${selinux}" == "true" {
|
|
||||||
selinux::manage_fcontext { "${munin_datadir}(/.*)?":
|
selinux::manage_fcontext { "${munin_datadir}(/.*)?":
|
||||||
type => "munin_var_lib_t",
|
type => "munin_var_lib_t",
|
||||||
before => File[$munin_datadir],
|
before => File[$munin_datadir],
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
file { "/var/lib/munin":
|
file { "/var/lib/munin":
|
||||||
ensure => $munin_datadir,
|
ensure => $munin_datadir,
|
||||||
|
@ -238,8 +236,7 @@ class munin::server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $munin_htmldir {
|
file { "/var/cache/munin":
|
||||||
file { $munin_htmldir:
|
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => "0755",
|
mode => "0755",
|
||||||
owner => "munin",
|
owner => "munin",
|
||||||
|
@ -247,24 +244,19 @@ class munin::server {
|
||||||
seltype => "httpd_munin_content_t",
|
seltype => "httpd_munin_content_t",
|
||||||
require => Package["munin"],
|
require => Package["munin"],
|
||||||
}
|
}
|
||||||
if "${selinux}" == "true" {
|
selinux::manage_fcontext { "/var/cache/munin":
|
||||||
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",
|
type => "munin_var_lib_t",
|
||||||
before => File["/var/www/html/munin"],
|
before => File["/var/cache/munin"],
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "/var/www/html/munin":
|
|
||||||
ensure => $munin_htmldir,
|
|
||||||
force => true,
|
|
||||||
backup => ".orig",
|
|
||||||
seltype => "munin_var_lib_t",
|
|
||||||
require => File[$munin_htmldir],
|
|
||||||
}
|
}
|
||||||
|
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":
|
file { "/etc/munin/nodes.d":
|
||||||
|
@ -281,8 +273,7 @@ class munin::server {
|
||||||
|
|
||||||
file { "/etc/munin/munin.conf.in":
|
file { "/etc/munin/munin.conf.in":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => [ "puppet:///files/munin/munin.conf.in",
|
content => template("munin/munin.conf.in.erb"),
|
||||||
"puppet:///modules/munin/munin.conf.in", ],
|
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
mode => "0644",
|
mode => "0644",
|
||||||
|
@ -300,4 +291,16 @@ class munin::server {
|
||||||
|
|
||||||
File <<| tag == "munin" |>>
|
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: }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
14
munin/templates/munin.conf.in.erb
Normal file
14
munin/templates/munin.conf.in.erb
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# The next three variables specifies where the location of the RRD
|
||||||
|
# databases, the HTML output, and the logs, severally. They all
|
||||||
|
# must be writable by the user running munin-cron.
|
||||||
|
dbdir /var/lib/munin
|
||||||
|
htmldir /var/cache/munin
|
||||||
|
logdir /var/log/munin
|
||||||
|
rundir /var/run/munin
|
||||||
|
|
||||||
|
# Where to look for the HTML templates
|
||||||
|
tmpldir /etc/munin/templates
|
||||||
|
|
||||||
|
# Number of graph processes
|
||||||
|
max_graph_jobs <%= processorcount %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue