Ad Widget

Collapse

Log File - Date Format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • navtek007
    Senior Member
    • May 2005
    • 100

    #1

    Log File - Date Format

    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
    Junior Member
    • May 2006
    • 3

    #2
    This may work

    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:
    Code:
    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.

    Comment

    • cjwallace
      Senior Member
      • Sep 2008
      • 126

      #3
      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

      Any update would be great

      Comment

      Working...