TELEMETRY PIPELINE
Grafana Loki

Grafana Loki destination plugin

The Grafana Loki destination plugin lets you configure Chronosphere Telemetry Pipeline to send your log data to Grafana Loki.

Supported telemetry types

This plugin supports these telemetry types:

LogsMetricsTraces

Configuration parameters

Use the parameters in this section to configure your plugin. The Telemetry Pipeline web interface uses the values in the Name column to describe the parameters. Items in the Key column are the YAML keys to use in pipeline configuration files.

Required

NameKeyDescriptionDefault
HosthostRequired. Loki hostname or IP address. Don't include the sub path, such as loki/api/v1/push. Include only the base hostname or URL.127.0.0.1
PortportRequired. TCP port of the target Loki service.3100

Basic Authentication

NameKeyDescriptionDefault
HTTP Usernamehttp_userBasic auth username.none
HTTP Passwordhttp_passwdBasic auth password. Requires http_user to be set.none

Advanced

NameKeyDescriptionDefault
Tenant IDtenant_idTenant ID used by default to push logs to Loki. If omitted or empty, it's assumed that Loki is running in single-tenant mode and no X-Scope-OrgID header is sent.none
Tenant ID Keytenant_id_keyRequired. If set, X-Scope-OrgID will be the value of the key from incoming record. It can be useful to set X-Scode-OrgID dynamically.none
LabelslabelsLabels for API requests.job=fluentbit
Label Keyslabel_keysComma-separated list of keys to use as stream labels.none
Enable Auto Kubernetes Labelsauto_kubernetes_labelsIf set to true, adds all Kubernetes labels to Loki labels. Accepted values: true, false.false
Drop Single Keydrop_single_keyIf set to true and only a single key remains, the log line sent to Loki is the value of that key. Accepted values: true, false.false
Remove Keysremove_keysComma-separated list of keys to remove.none
Line Formatline_formatFormat to use when flattening the record to a log line. Accepted values: json (sent log line is the Telemetry Pipeline record dumped as JSON), key_value (log line is each item in the record concatenated together, separated by a single space, in the format =).json

Security and TLS

NameKeyDescriptionDefault
TLStlsEnables or disables TLS/SSL support. Accepted values: true, false.false
TLS Certificate Validationtls.verifyEnables or disables TLS/SSL certificate validation. TLS must be enabled for certificates to be validated. Accepted values: off, on.on
TLS Debug Leveltls.debugSets TLS debug verbosity level. Accepted values: 0 (No debug), 1 (Error), 2 (State change), 3 (Informational), 4 (Verbose).1
CA Certificate File Pathtls.ca_fileAbsolute path to CA certificate file.none
Certificate File Pathtls.crt_fileAbsolute path to certificate file.none
Private Key File Pathtls.key_fileAbsolute path to private key file.none
Private Key Path Passwordtls.key_passwdPassword for private key file.none
TLS SNI Hostname Extensiontls.vhostHostname to be used for TLS SNI extension.none

Advanced Networking

NameKeyDescriptionDefault
DNS Modenet.dns.modeSelects the primary DNS connection type, which can be TCP or UDP.none
DNS Resolvernet.dns.resolverSelects the primary DNS connection type, which can be LEGACY or ASYNC.none
Prefer IPv4net.dns.prefer_ipv4Prioritizes IPv4 DNS results when trying to establish a connection. Accepted values: true, false.false
Keepalivenet.keepaliveEnables or disables Keepalive support. Accepted values: true, false.true
Keepalive Idle Timeoutnet.keepalive_idle_timeoutSets the maximum time allowed for an idle Keepalive connection.30s
Max Connect Timeoutnet.connect_timeoutSets the maximum time allowed to establish a connection, which includes the TLS handshake.10s
Max Connect Timeout Log Errornet.connect_timeout_log_errorSpecifies whether to log an error on connection timeout. When disabled, the timeout is logged as a debug message. Accepted values: true, false.true
Max Keepalive Recyclenet.keepalive_max_recycleSets the maximum number of times a keepalive connection can be used before it's retired.2000
Source Addressnet.source_addressSpecifies the network address to bind for data traffic.none