telegraf/plugins/outputs/loki
Paweł Żak 74703d092b
chore: Fix linter findings for prealloc (part2) (#12242)
2022-11-15 09:31:51 +01:00
..
README.md docs: add global configuration header (#12107) 2022-10-26 14:58:36 -05:00
loki.go docs: Remove warning not to remove go:embed (#11797) 2022-09-13 12:47:58 -05:00
loki_test.go chore: switch HTTP 100 test case values (#10858) 2022-03-24 11:56:09 -06:00
sample.conf chore(outputs): migrate sample configs into separate files (#11131) 2022-05-18 11:30:06 -05:00
stream.go plugin: output loki (#8450) 2021-03-02 15:48:48 -05:00
stream_test.go chore: Fix linter findings for prealloc (part2) (#12242) 2022-11-15 09:31:51 +01:00

README.md

Loki Output Plugin

This plugin sends logs to Loki, using metric name and tags as labels, log line will content all fields in key="value" format which is easily parsable with logfmt parser in Loki.

Logs within each stream are sorted by timestamp before being sent to Loki.

Global configuration options

In addition to the plugin-specific configuration settings, plugins support additional global and plugin configuration settings. These settings are used to modify metrics, tags, and field or create aliases and configure ordering, etc. See the CONFIGURATION.md for more details.

Configuration

# A plugin that can transmit logs to Loki
[[outputs.loki]]
  ## The domain of Loki
  domain = "https://loki.domain.tld"

  ## Endpoint to write api
  # endpoint = "/loki/api/v1/push"

  ## Connection timeout, defaults to "5s" if not set.
  # timeout = "5s"

  ## Basic auth credential
  # username = "loki"
  # password = "pass"

  ## Additional HTTP headers
  # http_headers = {"X-Scope-OrgID" = "1"}

  ## If the request must be gzip encoded
  # gzip_request = false

  ## Optional TLS Config
  # tls_ca = "/etc/telegraf/ca.pem"
  # tls_cert = "/etc/telegraf/cert.pem"
  # tls_key = "/etc/telegraf/key.pem"