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
reproduction:
(assumes docker interface at 172.17.0.1)
Start PGW: docker run -it --rm -p 9091:9091 prom/pushgateway:v1.6.2
Push metrics and read back
docker run -it -e PIP_ROOT_USER_ACTION=ignore --rm python:3.10 bash -c "
pip --disable-pip-version-check install -q prometheus-client && \
python3 << 'EOF'
from prometheus_client import push_to_gateway
from prometheus_client.metrics_core import GaugeMetricFamily
from prometheus_client.registry import Collector, CollectorRegistry
m1 = GaugeMetricFamily(name='spaces_in_group_key_values_status', documentation='N/A')
class _CustomCollector(Collector):
def collect(self):
yield m1
registry = CollectorRegistry()
registry.register(_CustomCollector())
push_to_gateway('http://172.17.0.1:9091',job='job_name',grouping_key={'label': 'value with spaces'},registry=registry)
EOF
"; curl -s http://172.17.0.1:9091/metrics | grep spaces
expected output:
push_failure_time_seconds{instance="",job="job_name",label="value with spaces"} 0
push_time_seconds{instance="",job="job_name",label="value with spaces"} 1.7290223660476923e+09
Spaces in a group key value, come back as "+":
reproduction:
(assumes docker interface at 172.17.0.1)
docker run -it --rm -p 9091:9091 prom/pushgateway:v1.6.2
expected output:
actual output:
The text was updated successfully, but these errors were encountered: