I have a /metrics
HTTP route consumed by Prometheus.
It provides the following gauge:
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1658919747
Using the Prometheus Web UI, I'm able to write simple promQL expressions, for instance to grab the year of this timestamp:
year(process_start_time_seconds)
which returns 2022
as intended in the table below the query input.
Unfortunately there does not seem to be any function like isodate(process_start_time_seconds)
that would return a string like 2022-07-27T11:02:27.000Z
Is there an alternative way to obtain this human-friendly date value starting from a timestamp?
humanizeTimestamp
(I don't know what format this is). - DazWilkin