2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Allow for a custom puppet facts directory

For example on OpenBSD, /var/lib/puppet doesn't exist and /var/puppet is used
This commit is contained in:
Jasper Lievisse Adriaanse 2014-08-11 14:30:58 +02:00
parent d33fcd5598
commit 5182fee7a3

View File

@ -17,6 +17,7 @@
# [puppet*]
# env.puppet_logfile /var/log/message
# env.puppet_logformat "^%b %d"
# env.puppet_factsdir /var/puppet/yaml/facts/
#
# the logfile is where the puppetmaster is expected to log its
# compilation statistics. the format is the format of the date syslog
@ -120,7 +121,7 @@ case ARGV[0]
plist("puppetmasterd") if $0 =~ /puppet_mem$/
plist("puppetd") if $0 =~ /puppet_mem$/
if $0 =~ /puppet_clients$/
puts "known_clients.value #{Dir.entries('/var/lib/puppet/yaml/facts/').size-2}"
puts "known_clients.value #{Dir.entries(ENV['puppet_factsdir'] || '/var/lib/puppet/yaml/facts/').size-2}"
phaselog
end
end