- Reorganized Ansible project structure to follow best practices. - Created dedicated directories: , , , , and . - Categorized playbooks into (host-specific) and (service-specific). - Moved all roles into the directory and standardized their naming conventions. - Relocated to for better variable management. - Renamed to to reflect its global variable scope. - Created to correctly set the to the new directory. - Moved and into the directory. - Added to providing explanations for common commands. - Cleaned up directories from all individual roles to centralize version control.
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
server:
|
|
http_listen_port: 9080
|
|
grpc_listen_port: 0
|
|
positions:
|
|
filename: /tmp/positions.yaml
|
|
clients:
|
|
- url: http://loki:3100/loki/api/v1/push
|
|
#- url: https://loki.internal.matous.vondrejka.cz/loki/api/v1/push
|
|
|
|
scrape_configs:
|
|
- job_name: journal
|
|
journal:
|
|
json: false
|
|
max_age: 12h
|
|
path: /var/log/journal
|
|
labels:
|
|
job: systemd-journal
|
|
relabel_configs:
|
|
- source_labels: ['__journal__systemd_unit']
|
|
target_label: 'unit'
|
|
|
|
|
|
- job_name: docker
|
|
static_configs:
|
|
- targets:
|
|
- localhost
|
|
labels:
|
|
job: containerlogs
|
|
__path__: /var/lib/docker/containers/*/*log
|
|
|
|
pipeline_stages:
|
|
- json:
|
|
expressions:
|
|
output: log
|
|
stream: stream
|
|
attrs:
|
|
- json:
|
|
expressions:
|
|
tag:
|
|
source: attrs
|
|
- regex:
|
|
expression: (?P<image_name>(?:[^|]*[^|])).(?P<container_name>(?:[^|]*[^|])).(?P<image_id>(?:[^|]*[^|])).(?P<container_id>(?:[^|]*[^|]))
|
|
source: tag
|
|
- timestamp:
|
|
format: RFC3339Nano
|
|
source: time
|
|
- labels:
|
|
tag:
|
|
stream:
|
|
image_name:
|
|
container_name:
|
|
image_id:
|
|
container_id:
|
|
- output:
|
|
source: output/*-json.log
|
|
|
|
|
|
#scrape_configs:
|
|
#- job_name: journald
|
|
# journal: {}
|