Kaseya Community

Server Agent Offline Automation

  • First time posting, hope I'm not to confusing.

    The ultimate goal is that when a Server agent goes offline a few things would happen before a tech started any work.

    1. an adjacent agent on the network pings the server for 15 mins.

    • if other agent is offline
    • ping switch mgmt IP
    • ping router Wan IP
    • no reply=site/power/internet outage
    • if server responds
      • force agent services to restart
        • still offline force reinstall of agent
    • If server responds and agent is still offline
      • attempt credential test or automated login to server for 15 mins

    2. at this point it should be roughly 30 mins from the agent going offline

    • send email with results from above
  • Hi

    First off, welcome to the community!

    Probably, most of this can be done, you would want to use the Agent Offline alert in Monitor > Alerts page.

    However, once the agent is considered offline you want to run a script as the alert action.

    Then you would need to create said script, which would perform all the actions you listed in sequence with your logic.

    The script and logic part would be the difficult/time consuming part of this as you would need to either get in variables the unique IP's or hardcode them in the script.

  • Hi ;

    Something else to keep in mind is that if the agents are unable to communicate with the Kaseya server they won't actually be able to doing anything as the agents rely on Kaseya server for new instructions.

    In your example you want another agent (Agent B) to diagnose an offline agent (Agent A), if there was internet outage Agent B would have to be in the same network as Agent A to perform these diagnostics.

    In this scenario if there was an internet outage both agents would be offline if they where located in a remote location from the Kaseya server. For this scenario to work Agent B would require a redundant internet connection.

    If both Agents A and B were in the same network as the Kaseya server then Agent A would more than likely not go offline because of an internet outage.

    An easy solution to detect an internet outage is to monitor the external IP address for Agent A (aka the Connection Gateway in Kaseya) using External Monitoring.

    Kaseya recently uploaded a Techjam on Classic monitoring that has some good information.


  • Hi dlutherbeck,

    I totally get where you're coming from - we've seen plenty of occasions where a server agent stops checking in but the server is otherwise fine, and check-in resumes after restarting the kaseya agent service.

    The challenge I see is in your first point: 1 - an adjacent agent on the network.

    AFAIK there is no easy way to have a procedure automatically identify and run on an 'adjacent' agent on the network. It's definitely do-able - Kaseya supplies a 'wake on LAN' function that identifies an online agent on the same subnet to send the magic packet to wake the target agent, but as far as I'm aware there is no way for us to leverage this function in our agent procedures.

    Kaseya - this would be a really handy feature to expose to end users!

  • Thank you guys.  


           I see what you are saying, in that scenario if (Agent A) goes offline then the next step would be to run a procedure on (Agent B) to ping (Agent A).

           if (Agent B) is offline, the next step would be to ping the router from an external source like the Kserver to possibly narrow down a internet outage.

    What do you think of that? it would be a nice start for troubleshooting. i didn't want to constantly monitor the router with KNM or Traverse but if that would be considered best practice then that would be the smartest move.