A custom developed application generates event log data.
sorted in a folder structure on disk like this:
c:\log\2022\12\21\
So a folder per day.
In this folder there are several logfiles that contain text info with timestamp and event or error definition
I would like to get this data in loki.
The server is up and running (checked with getting the logs from the different containers created). But i am kind of stuck in getting the custom files.
The promtail scrapeconfig looks like this:
scrape_configs:
- job_name: docker
use docker.sock to filter containers
docker_sd_configs:- host: “unix:///var/run/docker.sock”
refresh_interval: 15s
filters:- name: label
values: [“com.docker.compose.project=testloki”]
- name: label
use container name to create a loki label
relabel_configs:- source_labels: [‘__meta_docker_container_name’]
regex: ‘/(.*)’
target_label: ‘container’
- host: “unix:///var/run/docker.sock”
- job_name: customlog
static_configs:- targets:
- 172.22.5.44
labels:
job: customlog
path: C:\log\2022*log
- 172.22.5.44
- targets:
What would be a good approach to get this data into loki?
thx,
Ben