mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
allow customizing tiem format, use standard
by default, syslog doesn't use iso timestamps..
This commit is contained in:
parent
d2491a1977
commit
ee0f13f366
1 changed files with 3 additions and 2 deletions
|
@ -19,8 +19,9 @@ def phaselog
|
||||||
logfile = ENV['puppet_logfile'] || '/var/log/messages'
|
logfile = ENV['puppet_logfile'] || '/var/log/messages'
|
||||||
count,avg,day_count_unique,day_count = 0 ,0 ,0, 0
|
count,avg,day_count_unique,day_count = 0 ,0 ,0, 0
|
||||||
t = Time.now
|
t = Time.now
|
||||||
today = t.strftime("^%Y-%m-%dT")
|
dateformat = ENV['puppet_logformat'] || "^%b %d"
|
||||||
hour = t.strftime("^%Y-%m-%dT%H:")
|
today = t.strftime(dateformat)
|
||||||
|
hour = t.strftime(dateformat + " %H:")
|
||||||
m = t.min.to_i
|
m = t.min.to_i
|
||||||
last5m = ""
|
last5m = ""
|
||||||
6.times do |i|
|
6.times do |i|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue