Configure promtail static config for directory other than /var/log

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?

Hello,

Promtail needs read permission on those folders in order to fetch the logs.

Verify that the folder has the same group as the promtail user; If not, either give promtail the permission to read those folders, or add them both to the same group.

Many thanks @clevernessisamyth