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/1c9c4d1f-43a3-46e1-b621-cb6e7f01acbao%40googlegroups.com.

Reply via email to