I am collecting logs using rsyslog from about 5000 servers. My collector is writing all logs to a single file on an NFS volume using RFC5424 format. I am mounting this NFS volume on my promtail nodes, and using static_config to scrape the file. I can view the logs in Loki.
My problem: I don't see any labels in my log entries. I am unable to do LogQL queries based on hostname or any type of query based on facility.
This is the relevant portion of my promtail conf:
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /data/rsyslog.log
Is there any way to apply labels to a static_config?