Ad Widget

Collapse

Problems in getting timestamp from unison logs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maxxer
    Member
    • Oct 2010
    • 80

    #1

    Problems in getting timestamp from unison logs

    Hi. I'm unable to extract timestamp from unison logs. The string containing the sync result is this one:

    Code:
    Synchronization complete at 14:49:24  (2 items transferred, 0 skipped, 0 failed)
    In Log time format I've specified the following:

    Code:
    pppppppppppppppppppppppppppphh:mm:ss
    But the timestamp isn't extracted... It still uses the polling time.

  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hi,

    You must have YYMMDD also present in the log line. Otherwise how would Zabbix know what to set there? Current day? Logically yes. But in edge cases what? So you must add these fields also to your log file.

    But on the other hand - does the timestamp you log in the file differ from the current time when the line is actually written?

    Comment

    • maxxer
      Member
      • Oct 2010
      • 80

      #3
      As you see I don't have the date in the log message, nor I found a way to configure it The full date+time log is in the line above that one, but I need this one as contains information if something hasn't been transferred successfully.

      As per your second question no, the timestamp doesn't differ that much. Zabbix performs the check very 30s, so it's correct in that timespan. But if I have two transfer in that time window they get the same timestamp. Not an issue, but if I could have the original timestamp that would have been better

      Comment

      • ingus.vilnis
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2014
        • 908

        #4
        Oh, multi line log entries. What a user friendly app

        Set the update interval of the item in Zabbix to 1 second and forget the problem. Log lines will anyways be sent to Zabbix only when they are written.

        Comment

        • maxxer
          Member
          • Oct 2010
          • 80

          #5
          Full log:
          Code:
          UNISON 2.48.4 finished propagating changes at 15:30:44.93 on 16 Nov 2018
          Synchronization complete at 15:30:45  (2 items transferred, 0 skipped, 0 failed)
          Anyway I'll lower the interval. Thanks

          Comment

          Working...