Number of metrics per job

23 views
Skip to first unread message

tomer.l...@gmail.com

unread,
Jun 23, 2020, 8:24:41 AM6/23/20
to Prometheus Users
How can I get the number of metrics each job is creating?

Mat Arye

unread,
Jun 23, 2020, 11:13:20 AM6/23/20
to tomer.l...@gmail.com, Prometheus Users
I think https://prometheus.io/docs/concepts/jobs_instances/ can help. It sounds like either you are looking for scrape_samples_post_metric_relabeling or a promql query like `{job="<job-name>"}` which would return all the latest metrics and series for a particular job.

On Tue, Jun 23, 2020 at 8:24 AM tomer.l...@gmail.com <tomer.l...@gmail.com> wrote:
How can I get the number of metrics each job is creating?

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/8207b88c-2756-4ae1-bdfa-08e08bc71f0bn%40googlegroups.com.


--
Mat Arye, Timescale-Prometheus Team Lead
See what we're working on (feedback welcome!): tsdb.co/prom-design-doc

Tomer Leibovich

unread,
Jun 23, 2020, 1:40:49 PM6/23/20
to Mat Arye, Prometheus Users
Hi, more to the promql query

Tomer Leibovich

unread,
Jun 30, 2020, 4:39:57 PM6/30/20
to Prometheus Users
Can anyone share a promql query that can display the number of metrics per job?

Julien Pivotto

unread,
Jun 30, 2020, 6:35:23 PM6/30/20
to Tomer Leibovich, Prometheus Users
On 30 Jun 13:39, Tomer Leibovich wrote:
> Can anyone share a promql query that can display the number of metrics per job?


sum by(job) (scrape_samples_post_metric_relabeling)

>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/c42f9bf0-768d-4ef0-bdf0-2537c62f8962o%40googlegroups.com.


--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages