diff --git a/roles/promtail/templates/promtail.service.j2 b/roles/promtail/templates/promtail.service.j2 index ab6f959..f778a47 100644 --- a/roles/promtail/templates/promtail.service.j2 +++ b/roles/promtail/templates/promtail.service.j2 @@ -1,19 +1,19 @@ {{ ansible_managed | comment }} [Unit] -Description=Loki -After=network-online.target +Description=Promtail service +After=network.target [Service] Type=simple User={{ promtail_user }} -Group={{ promtail_group }} ExecStart={{ promtail_bin_path }}/promtail \ - -config.file {{ promtail_config_path }} + -config.file {{ promtail_config_path }} \ + -client.external-labels=host=%l WorkingDirectory={{ promtail_var_path }} - -Restart=always -RestartSec=1 +TimeoutSec = 60 +Restart=on-failure +RestartSec=2 [Install] WantedBy=multi-user.target