I’m using grafana enterprise version 10 on windows 11
I want to extract the timestamp of the log line , from the line itself ,
here is a sample log line :
2023-06-13 13:48:26.7314 293092600282 GetPassportFromStorage() GetSensorStatus.success = False
I used the following config :
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: D:/tmp/positions.yaml
clients:
scrape_configs:
- job_name: windows-logs
pipeline_stages:- timestamp:
source: timestamp
format: ‘2006-01-02 15:04:05.0000’ # Adjust the format based on your log timestamp format
static_configs: - targets:
- localhost
labels:
job: OmarLaptop
agent: promtail
path: D:/MyLogs/*.log
- localhost
- timestamp:
but it seems that log shown in Grafana Loki , not preserve the right timestamp
How to extract the timestamp from the Log Line itself ,
I read the pipeline docs for promtail and found the following for timestamp stage ,
but I’m confused how to use it
Thank You.