Here is the info on the data we are scraping, the query, and the result we are getting back with the names changed as this is a subset of production data. As you can see we get a set of 4 data points back. This is true for every individual metric we are monitoring every time we query the API.
The data we are scraping:# HELP vpn_status The status of the VPN tunnels.
# TYPE vpn_status status
vpn_status{name="VPN1",expectedtunnels="3",connectedtunnels="3",routes="1",timeofstatus="8848141",color="green,black",humstat="UP",dattim="2017-11-20 08:11:02",node="NODE1"} 0 1511165462000....
The HTTP API query:
https://prometheus.host.com/api/v1/query?query=vpn_status
The result:
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
{
"metric": {
"__name__": "vpn_status",
"color": "green,black",
"connectedtunnels": "3",
"dattim": "2017-11-20 08:10:01",
"expectedtunnels": "3",
"humstat": "UP",
"instance": "10.118.50.187:80",
"job": "JOB1",
"name": "VPN1",
"node": "NODE1",
"routes": "1",
"timeofstatus": "8848080"
},
"value": [
1511165677.218,
"0"
]
},
{
"metric": {
"__name__": "vpn_status",
"color": "green,black",
"connectedtunnels": "3",
"dattim": "2017-11-20 08:11:02",
"expectedtunnels": "3",
"humstat": "UP",
"instance": "10.118.50.187:80",
"job": "JOB1",
"name": "VPN1",
"node": "NODE1",
"routes": "1",
"timeofstatus": "8848141"
},
"value": [
1511165677.218,
"0"
]
},
{
"metric": {
"__name__": "vpn_status",
"color": "green,black",
"connectedtunnels": "3",
"dattim": "2017-11-20 08:12:01",
"expectedtunnels": "3",
"humstat": "UP",
"instance": "10.118.50.187:80",
"job": "JOB1",
"name": "VPN1",
"node": "NODE1",
"routes": "1",
"timeofstatus": "8848200"
},
"value": [
1511165677.218,
"0"
]
},
{
"metric": {
"__name__": "vpn_status",
"color": "green,black",
"connectedtunnels": "3",
"dattim": "2017-11-20 08:13:02",
"expectedtunnels": "3",
"humstat": "UP",
"instance": "10.118.50.187:80",
"job": "JOB1",
"name": "VPN1",
"node": "NODE1",
"routes": "1",
"timeofstatus": "8848261"
},
"value": [
1511165677.218,
"0"
]
}
]
}
}