ansible playbooks for retailor.io infrastructure

This commit is contained in:
2025-03-03 19:33:36 +01:00
committed by KevinMidboe
commit 92cb10ba27
139 changed files with 33603 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Promtail service
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/promtail -config.file /etc/promtail/config.yml --client.external-labels=hostname=%H
Restart=on-failure
RestartSec=20
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,32 @@
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
client:
url: http://prometheus-grafana:3100/loki/api/v1/push
scrape_configs:
- job_name: nginx
static_configs:
- targets:
- localhost
labels:
job: nginx
__path__: /var/log/nginx/*.log
pipeline_stages:
- regex:
expression: '^(?P<remote_addr>\S+) - - \[(?P<timestamp>[^\]]+)\] "(?P<method>\S+) (?P<path>\S+) (?P<protocol>\S+)" (?P<status>\d+) (?P<bytes>\d+) "(?P<referrer>[^\"]*)" "(?P<user_agent>[^\"]*)"'
- timestamp:
source: "timestamp"
format: "02/Jan/2006:15:04:05 -0700"
- labels:
remote_addr:
method:
path:
protocol:
status:
referrer:
user_agent: