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

allow customizing tiem format, use standard

by default, syslog doesn't use iso timestamps..
This commit is contained in:
Antoine Beaupré 2013-06-17 16:36:28 -04:00
parent d2491a1977
commit ee0f13f366

View File

@ -19,8 +19,9 @@ def phaselog
logfile = ENV['puppet_logfile'] || '/var/log/messages'
count,avg,day_count_unique,day_count = 0 ,0 ,0, 0
t = Time.now
today = t.strftime("^%Y-%m-%dT")
hour = t.strftime("^%Y-%m-%dT%H:")
dateformat = ENV['puppet_logformat'] || "^%b %d"
today = t.strftime(dateformat)
hour = t.strftime(dateformat + " %H:")
m = t.min.to_i
last5m = ""
6.times do |i|