I am trying to ingest some old logs for analysis trying to preserve the the log line date and time. I have tried everything i can think of without success. I am able to get the date and time in loki but it does use it for the entry date and time; i.e will show all the log entries in current date and time when I explore the logs or use Drilldown.
Is there any method to make loki use the log line date time , below is what I have but it does not work.
// 3. Process the logs, Extract data from log messages and add labels
loki.process “syslog_process” {
forward_to = [loki.write.default.receiver]
// Syslog formats can vary widely, so you may need to adjust this regex
You relax (or disable) the “reject old samples” check **in Loki’s limits_config**, not in Alloy. ### Option 1 – Allow older logs by increasing the max age Increase reject_old_samples_max_age:
yaml limits_config: reject_old_samples: true reject_old_samples_max_age: 336h # 14 days, for example
Thanks, but I need the loki to recognize the original date time, currently loki uses it’s own date time on that is the ingest date time, I need the actual date time from the log lines.
No matter what I do with stage.timestamp it still using the tike loki received the line i.e Time is the current date instead of the date and time from the log line. Is this even possible?