Hi team,
I’m trying to configure Promtail to collect the GitLab log. The GitLab log file is located in the folder: /var/opt/gitlab/logs
Below is promtail config:
scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
source: sys-varlogs
__path__: /var/log/*log
- targets:
- localhost
labels:
source: sys-messages
__path__: /var/log/messages
- targets:
- localhost
labels:
source: sys-secure
__path__: /var/log/secure
- targets:
- localhost
labels:
source: gitlab-exporter
__path__: /var/opt/gitlab/logs/gitlab-exporter/*
- targets:
- localhost
labels:
source: gitlab-postgres-exporter
__path__: /var/opt/gitlab/logs/gitlab-exporter/current
On Grafana, I just can see the logs from path: /var/log/*. With other folders, I can not see the logs.
Could you guys show me how to collect the log from any folder?