mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
It seems to have broken with the release of filesystem 2021.12.07, which incorporates this upstream change[1] in [2]. Please also see the upstream issue[3]. I'm not sure why we used ansible_fqdn in the first place as inventory_hostname should be preferred (as we define it ourselves). [1]ce266330fc
[2]fc84245e3e
[3] https://github.com/systemd/systemd/issues/20358
60 lines
1.5 KiB
Django/Jinja
60 lines
1.5 KiB
Django/Jinja
server:
|
|
http_listen_address: {{ wireguard_address }}
|
|
http_listen_port: 9080
|
|
grpc_listen_address: 127.0.0.1
|
|
grpc_listen_port: 0 # 0 means random
|
|
|
|
positions:
|
|
filename: /var/lib/promtail/positions.yaml
|
|
|
|
clients:
|
|
- url: http://{{ hostvars['monitoring.archlinux.org']['wireguard_address'] }}/loki/api/v1/push
|
|
bearer_token: '{{ vault_loki_token }}'
|
|
|
|
scrape_configs:
|
|
- job_name: journal
|
|
journal:
|
|
json: true
|
|
max_age: 72h
|
|
path: /var/log/journal
|
|
labels:
|
|
job: systemd-journal
|
|
relabel_configs:
|
|
- source_labels: ["__journal__hostname"]
|
|
target_label: instance
|
|
- job_name: nginx
|
|
static_configs:
|
|
- targets:
|
|
- localhost
|
|
labels:
|
|
job: nginx
|
|
instance: {{ inventory_hostname }}
|
|
__path__: /var/log/nginx/*/*.json
|
|
pipeline_stages:
|
|
- match:
|
|
selector: '{job="nginx"}'
|
|
stages:
|
|
- json:
|
|
expressions:
|
|
time_local: time_local
|
|
- timestamp:
|
|
format: 02/Jan/2006:15:04:05 -0700
|
|
source: time_local
|
|
- job_name: pacman
|
|
static_configs:
|
|
- targets:
|
|
- localhost
|
|
labels:
|
|
job: pacman
|
|
instance: {{ inventory_hostname }}
|
|
__path__: /var/log/pacman.log
|
|
pipeline_stages:
|
|
- match:
|
|
selector: '{job="pacman"}'
|
|
stages:
|
|
- regex:
|
|
expression: '^\[(?P<timestamp>.*?)\]'
|
|
- timestamp:
|
|
format: 2006-01-02T15:04:05Z0700
|
|
source: timestamp
|