Besoin d'installer Promtail agent rapidement sur vos machines avec une configuration minimaliste ? et bah c'est chaud.. Sauf avec ce magnifique role !
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Cinabre 1c8acabd49 Mise à jour de 'README.md' 1 year ago
files Creation du depot 1 year ago
handlers Creation du depot 1 year ago
tasks Creation du depot 1 year ago
templates Creation du depot 1 year ago
vars Creation du depot 1 year ago
README.md Mise à jour de 'README.md' 1 year ago

README.md

Installation de l'agent Promtail via Ansible

Le but de ce role Ansible est d'installer Promtail, de le configurer, et de créer un service géré par systemd.

Role Variables

Dans le fichier vars/main.yml, vous trouverez l'URL à configurer pour que Promtail ait accès à Loki.

Template Jinja2

Fichier avant templating :

server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

clients:
  - url: http://url_de_votre_loki:3100/loki/api/v1/push


scrape_configs:
- job_name: authlog
  static_configs:
  - targets:
      - localhost
    labels:
      host: VOTRE_HOSTNAME
      job: authlog
      __path__: /var/log/auth.log

- job_name: syslog
  static_configs:
  - targets:
      - localhost
    labels:
      host: VOTRE_HOSTNAME
      job: syslog
      __path__: /var/log/syslog

- job_name: Containers
  static_configs:
  - targets:
      - localhost
    labels:
      host: VOTRE_HOSTNAME
      job: containerslogs
      __path__: /var/lib/docker/containers/*/*-json.log

- job_name: DaemonLog
  static_configs:
  - targets:
      - localhost
    labels:
      host: VOTRE_HOSTNAME
      job: daemon
      __path__: /var/log/daemon.log