PDA

View Full Version : Log File - Date Format


navtek007
01-05-2006, 02:00
Hi All,

I have just started monitoring my windows event logs which works fine however it doesnt sort by date correctly. so basically the local time and the timestamp are all out of wack.

I was wondering what the syntax for the log time format is?

Thanks.

jshprentz
08-05-2006, 04:23
Looking at the code, it appears that the date format is processed by the Zabbix server in file /src/zabbix_server/functions by calc_timestamp. That function recognizes the following format letters:


h: hour
m: minute
s: second
y: year
d: day
M: month


An ISO date, for example, would be recognized by the date format: yyyy-MM-ddThh:mm:ss
Other characters in the date format act as non-matching filler. Non-numeric characters in the log file are skipped. In the example, the characters -, T, and : would be skipped as filler.

The date format is matched to the beginning of the log line, so it could not find the date in a typical Apache web log.

The function expects a four-digit year. It cannot handle month names or timezone offsets.

Using syslog-ng on Gentoo, I will need to define a template with a hand crafted date to satisfy Zabbix.

cjwallace
19-10-2008, 13:28
Did this fix your issue?

I am having that problem where by the time stamp and the local time are out of sync. It can be a few seconds or even 12 hours:eek:

Any update would be great