You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -323,6 +323,17 @@ Following is the supported API format for writing to loki:
323
323
timestampScale: timestamp units scale (e.g. for UNIX = 1s)
324
324
format: the format of each line: printf (writes using golang's default map printing), fields (writes one key and value field per line) or json (default)
325
325
reorder: reorder json map keys
326
+
clientProtocol: type of client protocol to use: 'http' or 'grpc' (default: 'http')
327
+
grpcConfig: gRPC client configuration (used only for gRPC client type)
328
+
keepAlive: keep alive interval
329
+
keepAliveTimeout: keep alive timeout
330
+
tls: TLS configuration
331
+
enabled: enable TLS
332
+
certFile: path to client certificate file
333
+
keyFile: path to client key file
334
+
caFile: path to CA certificate file
335
+
serverName: server name for certificate verification
Copy file name to clipboardExpand all lines: pkg/api/write_loki.go
+70-3Lines changed: 70 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ package api
20
20
import (
21
21
"errors"
22
22
"fmt"
23
+
"time"
23
24
24
25
promConfig "github.com/prometheus/common/config"
25
26
"github.com/prometheus/common/model"
@@ -46,6 +47,15 @@ type WriteLoki struct {
46
47
TimestampScalestring`yaml:"timestampScale,omitempty" json:"timestampScale,omitempty" doc:"timestamp units scale (e.g. for UNIX = 1s)"`
47
48
Formatstring`yaml:"format,omitempty" json:"format,omitempty" doc:"the format of each line: printf (writes using golang's default map printing), fields (writes one key and value field per line) or json (default)"`
ClientProtocolstring`yaml:"clientProtocol,omitempty" json:"clientProtocol,omitempty" doc:"type of client protocol to use: 'http' or 'grpc' (default: 'http')"`
53
+
GRPCConfig*GRPCLokiConfig`yaml:"grpcConfig,omitempty" json:"grpcConfig,omitempty" doc:"gRPC client configuration (used only for gRPC client type)"`
0 commit comments