How long do ping results last? Can they be manually purged?

Solved
je_hpf
Comes here often

How long do ping results last? Can they be manually purged?

Getting my feet wet with the Meraki API (first time calling APIs and REST methods, actually). Using Powershell interactively at the moment to experiment, nothing programmatic. S/N and ids obfuscated.

 

I executed the below. it returned an object with the pingId.

 

Invoke-RestMethod -Method Post -Uri "$BaseURI/devices/ABCD-0123-EFGH/liveTools/ping" -Headers @{ $AuthHeader = $APIKey } -Body @{ target = "1.1.1.1"; count = 5 }

 

Then I waited a bit, and ran the below.

 

Invoke-RestMethod -Uri "$BaseURI/devices/ABCD-0123-EFGH/liveTools/ping/0123456789" -Headers @{ $AuthHeader = $APIKey }

 

The above returned my ping and all the statistics, great! I re-ran the command to store the result in a variable and that worked right away. That got me wondering....how long are these objects stored?

 

I checked the device in the dashboard and nothing graphical shows up in the tools tab so it's not like I can purge it there. The documentation doesn't say how long they last for or indicates any way to remove them. Not really a big deal for a ping, but might be for say, a reboot or firmware upgrade command (not that I've gotten that far in my journey yet).

1 Accepted Solution
John_on_API
Meraki Employee
Meraki Employee

I'm not aware of any way to delete them, but I'm also not sure there's any good reason to delete them.

 

They are ephemeral; I don't know the exact time frame but I would not rely on them to last more than an hour or so. The ping itself will take only a few moments, so you should be able to pull it pretty quickly.

View solution in original post

2 Replies 2
John_on_API
Meraki Employee
Meraki Employee

I'm not aware of any way to delete them, but I'm also not sure there's any good reason to delete them.

 

They are ephemeral; I don't know the exact time frame but I would not rely on them to last more than an hour or so. The ping itself will take only a few moments, so you should be able to pull it pretty quickly.

je_hpf
Comes here often

Thanks for confirming they are ephemeral. An exact time would be nice to know (or even a rough algorithm). However I don't think your 1 hour figure is accurate as the one I had still resolved over 10 hours later.

 

As for reasons to be able to delete them, I can think of two.

 

  • Security -- if an unauthorized person somehow had API access to an org, they could pull ping results to potentially find addresses that admins use to diagnose. Yes, there's better ways to perform reconnaissance but that doesn't mean it should be open for viewing.
  • Troubleshooting/Debugging -- if an API user is trying to automate something with the ping command across dozens, hundreds, or thousands of devices, the number of ping results returned can become overwhelming in the GET requests. It would be nice to force the Meraki cloud to just forget either all ping queries for a device, or to permit a DELETE request.

 

Not sure if this community forum is the best place for suggestions/feedback/feature requests but regardless, those are my thoughts.

 

If we can get an approximate answer to lifetime in the way of an algorithm I'll accept that as the solution, otherwise I'll use your first post as the solution tomorrow.

Get notified when there are additional replies to this discussion.