From ee0f13f366e444faef795042490c7cf6e7ac52e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Mon, 17 Jun 2013 16:36:28 -0400 Subject: [PATCH] allow customizing tiem format, use standard by default, syslog doesn't use iso timestamps.. --- plugins/puppet/puppetmaster | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/puppet/puppetmaster b/plugins/puppet/puppetmaster index d3925def..b11aaf9e 100755 --- a/plugins/puppet/puppetmaster +++ b/plugins/puppet/puppetmaster @@ -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|