HI Craig
The variables #id# and #gr# can be passed to the agent procedure even though you are running this on the VSA , as it is the actual Offline machine that triggers the script , so kaseya does know whcih machine went offline
So if the procedure knows the #id# then using some SQL you can get it's Gateway IP Address etc. and then use your VSA to ping it.
I also have a slightly different variant of the above and use the Service Desk for this plus an agent procedure.
Basically if a machine goes offline I check what group etc it belonged to and then check the Kaseya DB to see if any other machines are Online in that same group and on the same subnet.
If there is I run a script on that online machine and get it to ping the offline one
If I get a response I update the Ticket and change the Subject to indicate the machine is actually running and it's just an agent issue
Same script also tries to do a remote restart of the agent.
I also note in 9.4.0.32 released last week they have resolved some oissie with agents incorrectly reporting as being offline