Promtail on windows is utilising all cpu resources

I’m using Promtail to scrape logs from windows.

config:
server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: C:\Temp\positions.yaml

clients:
  - url: http://lokixx.com/loki/api/v1/push


scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: winlogs
      __path__: C:\XX\Logs\*Log*

But it will use CPU and our Credit based VMs to 100%.
Is there a way to make promtail to take only latest changed files like n-5 days

how much ram does that windows machine have

also how big is the biggest log file

test it out using alloy instead of promtail also and see if there is a difference

System info: 4cpu/8gb
Logfiles size: 2-30kb

The problem is the destination location has many old files. It’s scraping all the logs since 2-3 years

:eyes::skull::skull:
8gb seems low but doable.
do you really need to process 3 year old files?

and you are asking it to scrape every type of file with file name containing Log so a movie file with 400gb StarWarsLog.mov wil be processed.