Lusitaniae / sa_loki_promtail

promtail is the agent, responsible for gathering logs and sending them to Loki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sa_loki_promtail

Build Status

Example of usage:

Simple

     - {
         role: "sa_loki_promtail",
         loki_promtail_version: "1.2.0"
       }

Advanced

roles:

     - {
         role: "sa_loki_promtail",
         loki_version: "1.2.0",
         loki_user:   loki,
         loki_group:  loki,
         loki_base_dir: /opt/loki
       }

Configuring logging

scrape_configs:

  • job_name: system entry_parser: raw static_configs:
    • targets:
      • localhost labels: job: varlogs path: /var/log/*log
  • job_name: nginx entry_parser: raw static_configs:
    • targets:
      • localhost labels: job: nginx path: /var/log/nginx/*log

Usage with ansible galaxy workflow

If you installed the sa_loki_promtail role using the command

ansible-galaxy install softasap.sa_loki_promtail

the role will be available in the folder library/softasap.sa_loki_promtail Please adjust the path accordingly.

     - {
         role: "softasap.sa_loki_promtail"
       }

Copyright and license

Code is dual licensed under the [BSD 3 clause] (https://opensource.org/licenses/BSD-3-Clause) and the [MIT License] (http://opensource.org/licenses/MIT). Choose the one that suits you best.

Reach us:

Subscribe for roles updates at [FB] (https://www.facebook.com/SoftAsap/)

Join gitter discussion channel at Gitter

Discover other roles at http://www.softasap.com/roles/registry_generated.html

visit our blog at http://www.softasap.com/blog/archive.html

About

promtail is the agent, responsible for gathering logs and sending them to Loki

License:MIT License


Languages

Language:Shell 60.4%Language:Roff 36.3%Language:Python 3.3%