Questions tagged [prometheus-pushgateway]

Pushgateway is part of the official prometheus ecosystem. You don't need to include the tag prometheus unless the question relates to metrics collection. Please, check the official documentation of PushGateway before asking a question.

New to Prometheus ecosystem?

Pushgateway is part of the official ecosystem. It is a metric cache written in Go. Metrics are pushed, updated and deleted through an API. It is not a replacement for push based monitoring like statd. But rather, as explained on GitHub, a proxy to make batch job appear as if they were still running, giving time to Prometheus, which is pull based monitoring, to come and collect the resulting metrics.

Tag usage

When posting questions about Prometheus PushGateway, remember there are three main aspects:

  • the API side to metrics lifetime management
  • the Prometheus collection an exploitation
  • the PushGateway exploitation and design decision

If it is about metrics collection and exploitation, include the tag as well.

For the API side, specif the system you are using for accessing the API and give curl equivalent of the operations you question relates to.

For the exploitation and design decision, please first check the documentation which details the use cases and intent of PushGateway.

70 questions
0
votes
0 answers

Kubernetes Job Output metrics to Prometheus

I want to create a Kubernetes Job object like the example: https://kubernetes.io/docs/concepts/workloads/controllers/job/ Now imagine I want to have the result (in this case the value of Pi: 3.14159...) available in Prometheus. Is this possible? In…
John Smith
  • 31
  • 1
  • 5
0
votes
1 answer

How to update counter value in Pushgateway?

I don't understand how can I update Counter type metrics in pushgateway. For example registry = CollectorRegistry() Counter('rows', 'rows info', registry=registry).inc(0.555) push_to_gateway(host, job='batch_job', …
Ivan
  • 85
  • 6
0
votes
1 answer

Prometheus: Scrape logs from horizontal scaled microservices

I want to use prometheus to scrape metrics from my distributed web service. I have four kind of services setup with docker-compose or kubernetes. Flask: 5000 Redis-Queue: 6379 Prometheus Workers: Horizontally scaled based on system load. They get…
0
votes
1 answer

How can I measure the daily rate of a counter event in Prometheus?

I am trying to calculate the number of events (in my example deployments) per day. What I'm doing currently is that I'm sending the following counter events based on the HTTP API of pushgateway's # TYPE deployments_count counter # HELP…
Evan P
  • 1,767
  • 1
  • 20
  • 37
0
votes
1 answer

POSTing metrics to prometheus pushgateway in groovy fails with 400

I'm trying to translate a working curl command to groovy, so I can natively execute it in my Jenkins pipeline. My problem is that the curl command works, but my groovy request fails with a 400 error from the pushgateway of prometheus. My code in…
Evan P
  • 1,767
  • 1
  • 20
  • 37
0
votes
1 answer

Pushgateway throws 401 - Unauthorized

I am trying to push metrics towards basic auth authenticated Push Gateway. But I am running into 401 - Unauthorized So I installed a local push gateway and configured it with basic authentication: The password is encrypted as described here :…
0
votes
1 answer

promethus can not get metrics everytime resultting gaps when displaying metrics

I deploy several flink on k8s in standalone mode , and export their metrics by one promethus-pushgateway. The Problem is that: the metrics Data arrives at promethus intermittently ,resultting to gaps between dots when displayed in grafana click…
xfly
  • 31
  • 7
0
votes
0 answers

Bash script does not find index from array

I have written a bash script which I want to use to monitor backups on a synology via pushgateway. The script should search for subfolders in the backup folder, write the newest file into a variable and write the age and size of the file into an…
0
votes
1 answer

How to publish Spring Batch Metrics to Prometheus Gateway

I have a spring batch jobs in which I want to push metrics to Prometheus as suggested here I have a requirement to push only default metrics given by Spring batch via micrometer.There is a easy way in which I dont have to anything and just add…
0
votes
1 answer

Checkpoint pushgateway persistence file to object store

I am using pushgateway to exposes metrics coming from short-lived batch jobs. At the moment the pushgateway instance is launched on a baremetal machine, where I have a docker volume mounted to allow survival of metrics in case of a container restart…
0
votes
0 answers

use a metric in HPA which was pushed to prometheus pushgateway

I'm pushing a metric via python client to push gateway in prometheus. Im able to query the metric - "QYZ_normal" in the prometheus UI and get result. Im trying to understand how to utilize that metric for HPA (i have setup prometheus-adapter) The…
JamZ
  • 551
  • 3
  • 6
  • 13
0
votes
0 answers

Is it possible to scrape prometheus endpoints running on the same machine and push them to a pushgateway at a static IP?

I have a system where instances can be added at any time. Metric collection becomes difficult since its hard to gather updated information on all the scrape targets. I wanted to use a pushgateway at a static IP to ingest the metrics from all…
0
votes
2 answers

Node.js: Is there a way to mock the prometheus pushgateway server?

I am using node.js package prom-client to try to push different custom metrics to the Prometheus Pushgateway server. The code is working and now I am writing the test code for the functionality. I wonder whether there is a way to mock the Prometheus…
Ken Tsoi
  • 1,195
  • 1
  • 17
  • 37
0
votes
1 answer

Newman/postman results to prometheus for automated tests

I've got a task of automating postman smoke tests to run every x minutes in kubernetes cluster and pushing results into prometheus, later visualized by grafana, with alerts pushed to a mattermost channel. I've created a custom docker image based on…
0
votes
1 answer

using Pushgateway to report a Summary metric to Prometheus

I'm using Prometheus to monitor an application which is run on a cronjob basis. So, I'm using Pushgateway to make my desired metrics available for Prometheus. One of the metrics is to report how long does a certain task take to finish. Therefore I'm…
Suo6613
  • 431
  • 5
  • 17