telegraf/plugins/outputs/loki
Sven Rebhan e6de0cc9c2
chore(internal.gzip): cleanup CompressWithGzip (#12587)
2023-02-01 11:20:11 -07:00
..
README.md feat(tools/readme_linter): Check for global configuration section (#12426) 2023-01-12 16:55:21 +01:00
loki.go chore(internal.gzip): cleanup CompressWithGzip (#12587) 2023-02-01 11:20:11 -07:00
loki_test.go feat(secretstores): convert many output plugins (#12497) 2023-01-25 13:02:29 -07: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"