On 8/3/20 8:34 AM, 'Píer Bauer' via Prometheus Users wrote:
> Due to the fact that my query (in real world) contains several thousand
> rows of output, I would like to pursue a generic approach to avoid
> setting a separate PowerShell variable for each table cell data...
>
>
> But currently I don't know what data structure is necessary or how to
> parse my results (JOB_NAMES (column 1) and STATUS (column 2)) in order
> to trasmit them subsequently to Prometheus, so that Prometheus
> "understands" that there is not only one single value arriving
> simultaneously but mutltiple values (table data) simultaneously instead...
Not sure I understand completely, but I'll try:
If you are looking for a way to get the status of multiple jobs into
Prometheus in a dynamic way (i.e. rows), then this should be possible. I
assume you are looking for labels.
You could create output such as:
job_status{job_name="a"}
(If possible, it might make sense to choose another word than "job" as
this is a term which is already used in Prometheus in the form of
"scrape jobs").
If you are looking for a way to get multiple datapoints for the same job
(i.e. columns) into Prometheus, then this will get harder. Prometheus is
designed to scrape exactly one data point per metric per scrape.
Everything else would be considered backfilling, which is not yet ready
for use for regular users, as far as I understand).
Kind regards,
Christian
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/71fdbc27-5d0f-54f2-0919-70e81a347a59%40hoffmann-christian.info.