How to add timestamp from log line instead of default timestamp

I have log lines in the format:
06/15/2022-17:44:06:754 - WARN - - processExecution: ClOrdID=null took 3 ms
06/15/2022-17:28:55:481 - WARN - - processExecution: ClOrdID=A_CAN1655328057070:320785908OHPR2C took 4 ms
How can I configure promtail YAML file to read the timestamp at beginning of log-line instead of default timestamp?
The scrape-configs of the promtail yaml file looks like this:


  • job_name: system
    • regex:
      expression: ā€œ.{0,23}ā€
    • timestamp:
      source: time
      format: 06/15/2022-18:21:57:173
    • targets:
      • localhost
        job: varlogs
        path: C:\Users\sb\Downloads\loki\logs\logfile.log
1 Like

Did you figure this out? Iā€™m trying to do the same thing