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
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,6 +324,10 @@ Following is the supported API format for writing to loki:
324
324
timestampScale: timestamp units scale (e.g. for UNIX = 1s)
325
325
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)
326
326
reorder: reorder json map keys
327
+
clientProtocol: type of client protocol to use: 'http' or 'grpc' (default: 'http')
328
+
grpcConfig: gRPC client configuration (used only for gRPC client type)
329
+
keepAlive: keep alive interval
330
+
keepAliveTimeout: keep alive timeout
327
331
</pre>
328
332
## Write Standard Output
329
333
Following is the supported API format for writing to standard output:
Copy file name to clipboardExpand all lines: pkg/api/write_loki.go
+73-3Lines changed: 73 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