I recently worked on a script which creates a RIPE Atlas measurements, checks the status of the measurements and fetches the results of the measurements once the measurement status is no longer “Ongoing”. I noticed that the status of the measurement is in “Ongoing” state usually for over 5 minutes while the results are actually in. Please see the example below:
martin@lab-svr:~$ # create a measurement on anchor probe with ID 6722
martin@lab-svr:~$ cat measurement-payload.json
{
"definitions": [
{
"target": "8.8.8.8",
"description": "ping Google anycast DNS",
"type": "ping",
"af": 4,
"resolve_on_probe": true,
"is_oneoff": true
}
],
"probes": [
{
"requested": 1,
"type": "probes",
"value": "6722"
}
]
}
martin@lab-svr:~$ curl -s https://atlas.ripe.net/api/v2/measurements/ -H "Authorization: Key $api_key" -H "Content-Type: application/json" -H "Accept: application/json" -d @measurement-payload.json | jq
{
"measurements": [
194146739
]
}
martin@lab-svr:~$
martin@lab-svr:~$ # measurement results are in, but the measurement status is still Ongoing
martin@lab-svr:~$ curl -s https://atlas.ripe.net/api/v2/measurements/194146739/results | jq
[
{
"fw": 5090,
"mver": "2.6.4",
"lts": 33,
"dst_name": "8.8.8.8",
"af": 4,
"dst_addr": "8.8.8.8",
"src_addr": "195.43.87.140",
"proto": "ICMP",
"ttl": 121,
"size": 64,
"result": [
{
"rtt": 12.223199
},
{
"rtt": 12.238925
},
{
"rtt": 12.243805
}
],
"dup": 0,
"rcvd": 3,
"sent": 3,
"min": 12.223199,
"max": 12.243805,
"avg": 12.235309666666666,
"msm_id": 194146739,
"prb_id": 6722,
"timestamp": 1785156089,
"msm_name": "Ping",
"from": "195.43.87.140",
"type": "ping",
"group_id": 194146739,
"step": null,
"stored_timestamp": 1785156089
}
]
martin@lab-svr:~$
martin@lab-svr:~$ curl -s https://atlas.ripe.net/api/v2/measurements/194146739 | jq .status
{
"id": 2,
"name": "Ongoing",
"when": null
}
martin@lab-svr:~$
Is this an expected behavior? Or perhaps one should not poll the measurement status and should poll the /api/v2/measurements/{id}/results/ directly once the measurement was created?