Thank Brian Candler & Brian Braizil !!

The last question, is there  the way I can transform UNIX timestamp to 
human readable time string in the below API you give?

curl -Ssg 'localhost:9090/api/v1/query?query=up{instance="sw1"}[5m]' 

在 2020年6月10日星期三 UTC+8下午3:04:15,Brian Candler写道:
>
> As Brian said, use a range vector query rather than an instant query.
>
> # curl -Ssg 'localhost:9090/api/v1/query?query=up{instance="sw1"}[5m]' | 
> python3 -mjson.tool
> {
>     "status": "success",
> ...
>                     [
>                         1591772319.53,
>                         "1"
>                     ],
>                     [
>                         1591772334.53,
>                         "1"
>                     ],
>                     [
>                         1591772349.531,
>                         "1"
>                     ],
>                     [
>                         1591772364.53,
>                         "1"
>                     ],
> ...
>
>

-- 
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/368bad15-100a-440c-bdaa-cc71d897d957o%40googlegroups.com.

Reply via email to