Skip to content

Commit 87f3c92

Browse files
authored
out_prometheus_remote_write: Add an example for Prometheus like labels (#1445)
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 8143ca8 commit 87f3c92

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pipeline/outputs/prometheus-remote-write.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,25 @@ With [Levitate](https://last9.io/levitate-tsdb), you must use the Levitate clust
133133
http_user <Levitate Cluster Username>
134134
http_passwd <Levitate Cluster Password>
135135
```
136+
137+
### Add Prometheus like Labels
138+
139+
Ordinary prometheus clients add some of the labels as below:
140+
141+
```
142+
[OUTPUT]
143+
Name prometheus_remote_write
144+
Match your.metric
145+
Host xxxxxxx.yyyyy.zzzz
146+
Port 443
147+
Uri /api/v1/write
148+
Header Authorization Bearer YOUR_LICENSE_KEY
149+
Log_response_payload True
150+
Tls On
151+
Tls.verify On
152+
# add user-defined labels
153+
add_label instance ${HOSTNAME}
154+
add_label job fluent-bit
155+
```
156+
157+
`instance` label can be emulated with `add_label instance ${HOSTNAME}`. And other labels can be added with `add_label <key> <value>` setting.

0 commit comments

Comments
 (0)