Re: [prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread Stuart Clark
Yes I would. The path is determining what gets replaced each time you push, which wants to be everything that a particular version of a job produces. So at any one time you will have a set of metrics for the most recent run of each one (with nothing missing and no duplications). In terms of the

Re: [prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread David Leonhartsberger
Ok I understand that u would not include a timestamp. But would u push the metrics using an instance like this? http://pushgateway.example.org:9091/metrics/job/jobA/instance/customerx or without an instance like

Re: [prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread Stuart Clark
You don't want to include any sort of timestamp otherwise you won't be replacing the previous set of results with the new ones. On 22 August 2021 20:36:27 BST, David Leonhartsberger wrote: >First of all, thanks a lot for the answers. > >I think I mixed up some names when explaining my use case

Re: [prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread Tristan Colgate
There not really a distinction. Instance, in the normal sense,is not normally used with push gateway. Think of it as one remote , labeled time series, that you can update the values of. Only one process should update one remote time series. One time series should be updated and periodically scrape

Re: [prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread David Leonhartsberger
First of all, thanks a lot for the answers. I think I mixed up some names when explaining my use case. I asked for which "job-name" and "instance-id" to use when pushing the metrics. Here I wasnt talking about the labels which are attached to a metric, instead I was talking about the "group" to

Re: [prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread Stuart Clark
It sounds like you just need a label for the customer (X, Y or Z) and the job (A, B or C). You don't want anything about timestamps in the labels. On 22 August 2021 16:15:01 BST, David Leonhartsberger wrote: >I have red the documentation about prometheus and the pushgateway but I >still dont

Re: [prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread Tristan Colgate
Remember the goal is to have time series in prom, so you shouldn't think in terms of the individual instances/runs. Each run pushes sone info for the jobs to prom their push gateway, prom watches those change over time. You don't need to delete them unless you no longer need data for one of the job

[prometheus-users] "Correct" usage of pushgateway for short running daily jobs

2021-08-22 Thread David Leonhartsberger
I have red the documentation about prometheus and the pushgateway but I still dont understand how I am supposed to "properly" setup the prometheus stack to get the metrics of my jobs. Use case: We have a couple of jobs which run every day for about 30-90 seconds. So the following instances are r