Skip to content

Commit 9d5c2a4

Browse files
author
Mallika Muralidharan
committed
Changed pushgateway.md
Signed-off-by: Mallika Muralidharan <[email protected]>
1 parent 5926a7c commit 9d5c2a4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

docs/content/exporting/pushgateway.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ weight: 3
55

66
The [Pushgateway](https://github.com/prometheus/pushgateway)
77
allows ephemeral and batch jobs to expose their metrics to Prometheus.
8+
Since Prometheus may not be able to scrape such a target, the targets can
9+
push their metrics to a separate instance of the Pushgateway, which then
10+
exposes these metrics to Prometheus.
811

912
```python
1013
from prometheus_client import CollectorRegistry, Gauge, push_to_gateway
@@ -18,10 +21,14 @@ push_to_gateway('localhost:9091', job='batchA', registry=registry)
1821
A separate registry is used, as the default registry may contain other metrics
1922
such as those from the Process Collector.
2023

21-
Pushgateway functions take a grouping key. `push_to_gateway` replaces metrics
22-
with the same grouping key, `pushadd_to_gateway` only replaces metrics with the
23-
same name and grouping key and `delete_from_gateway` deletes metrics with the
24-
given job and grouping key. See the
24+
Pushgateway functions take a grouping key.
25+
1. `push_to_gateway` replaces metrics
26+
with the same grouping key
27+
2. `pushadd_to_gateway` only replaces metrics with the
28+
same name and grouping key
29+
3. `delete_from_gateway` deletes metrics with the
30+
given job and grouping key.
31+
See the
2532
[Pushgateway documentation](https://github.com/prometheus/pushgateway/blob/master/README.md)
2633
for more information.
2734

0 commit comments

Comments
 (0)