github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/docs/sources/clients/_index.md (about)

     1  ---
     2  title: Clients
     3  weight: 600
     4  ---
     5  # Grafana Loki clients
     6  
     7  Grafana Loki supports the following official clients for sending logs:
     8  
     9  - [Promtail](promtail/)
    10  - [Docker Driver](docker-driver/)
    11  - [Fluentd](fluentd/)
    12  - [Fluent Bit](fluentbit/)
    13  - [Logstash](logstash/)
    14  - [Lambda Promtail](lambda-promtail/)
    15  
    16  There are also a number of third-party clients, see [Unofficial clients](#unofficial-clients).
    17  
    18  The [xk6-loki extension](https://github.com/grafana/xk6-loki) permits [load testing Loki](k6/).
    19  
    20  ## Picking a client
    21  
    22  While all clients can be used simultaneously to cover multiple use cases, which
    23  client is initially picked to send logs depends on your use case.
    24  
    25  ### Promtail
    26  
    27  Promtail is the client of choice when you're running Kubernetes, as you can
    28  configure it to automatically scrape logs from pods running on the same node
    29  that Promtail runs on. Promtail and Prometheus running together in Kubernetes
    30  enables powerful debugging: if Prometheus and Promtail use the same labels,
    31  users can use tools like Grafana to switch between metrics and logs based on the
    32  label set.
    33  
    34  Promtail is also the client of choice on bare-metal since it can be configured
    35  to tail logs from all files given a host path. It is the easiest way to send
    36  logs to Loki from plain-text files (e.g., things that log to `/var/log/*.log`).
    37  
    38  Lastly, Promtail works well if you want to extract metrics from logs such as
    39  counting the occurrences of a particular message.
    40  
    41  ### Docker Logging Driver
    42  
    43  When using Docker and not Kubernetes, the Docker logging driver for Loki should
    44  be used as it automatically adds labels appropriate to the running container.
    45  
    46  ### Fluentd and Fluent Bit
    47  
    48  The Fluentd and Fluent Bit plugins are ideal when you already have Fluentd deployed
    49  and you already have configured `Parser` and `Filter` plugins.
    50  
    51  Fluentd also works well for extracting metrics from logs when using its
    52  Prometheus plugin.
    53  
    54  ### Logstash
    55  
    56  If you are already using logstash and/or beats, this will be the easiest way to start.
    57  By adding our output plugin you can quickly try Loki without doing big configuration changes.
    58  
    59  ### Lambda Promtail
    60  
    61  This is a workflow combining the Promtail push-api [scrape config](promtail/configuration#loki_push_api_config) and the [lambda-promtail](lambda-promtail/) AWS Lambda function which pipes logs from Cloudwatch to Loki.
    62  
    63  This is a good choice if you're looking to try out Loki in a low-footprint way or if you wish to monitor AWS lambda logs in Loki.
    64  
    65  ## Unofficial clients
    66  
    67  Please note that the Loki API is not stable yet, so breaking changes might occur
    68  when using or writing a third-party client.
    69  
    70  - [promtail-client](https://github.com/afiskon/promtail-client) (Go)
    71  - [push-to-loki.py](https://github.com/sleleko/devops-kb/blob/master/python/push-to-loki.py) (Python 3)
    72  - [Serilog-Sinks-Loki](https://github.com/JosephWoodward/Serilog-Sinks-Loki) (C#)
    73  - [NLog-Targets-Loki](https://github.com/corentinaltepe/nlog.loki) (C#)
    74  - [loki-logback-appender](https://github.com/loki4j/loki-logback-appender) (Java)
    75  - [Log4j2 appender for Loki](https://github.com/tkowalcz/tjahzi) (Java)
    76  - [mjaron-tinyloki-java](https://github.com/mjfryc/mjaron-tinyloki-java) (Java)
    77  - [LokiLogger.jl](https://github.com/JuliaLogging/LokiLogger.jl) (Julia)
    78  - [winston-loki](https://github.com/JaniAnttonen/winston-loki) (JS)