Kaseya Community

Restart a computer if another computer restarts

  • We have a program that relies on a server connection for it to work properly. If the server restarts the computer also needs to restart for it to continue working. We would like to set it up so that this is done automatically whenever the server restarts. I can't think of a good way to do this with Kaseya. I would think that a monitor for server reboot may work but I can't think of a way to make this function.

    Any help would be greatly appreciated.

  • You could set up a task on the server to run a shutdown command against the PC on startup.  Doesn't give you any Kaseya reporting but it should do what you need

  • There are a few different ways you could do it. I would probably create an event log entry script and put it in the startup folder of the server (see eventcreate.exe) then create a kaseya script to look for the event log entry and have it fire off another script on the workstation PC to force a reboot (shutdown /r /t 0)

  • Here is something pretty basic for you to help kickstart your brainstorming. May not be the best way to do things but it could get the job done.

    Go to  Monitor > Agent Monitoring > Alerts

    Select Alert Function > Agent status

    Check "Run script" - select a reboot procedure and the computer you need to reboot

    Check "Alert when agent goes online"

    Tie this to the server.

    I think when the server reboots and comes back online, it will kick off the alert which will then kick off the reboot script that's pointed at the computer.

  • The only issue I can see with RShaw's suggestion is that you could end up rebooting the second computer if the internet connection on the first one "blips" for a moment...Perhaps add a check somewhere in there for last reboot time of the first?

  • Thank you all for the ideas. I'm not sure which way we are going to go yet but this gives me good ideas to start.

  • @brandon  You can use a monitor set, and monitor for System Uptime.   Whenever the uptime is less than 10-15 min, trigger an alarm (system uptime calculates when CPU is running, so you want to give it time to fully boot and start checking in), which in turns reboots the other machine.

  • Jonathan makes a good point about the "blip". Mattbrad's idea is good too. You could monitor the server for the event that is created when a reboot is scheduled. This would leave opportunities of failure though if it's an unexpected shutdown or just a shutdown. Creating an event that triggers upon startup and using Kaseya to monitor that homemade event to trigger a reboot procedure seems rock solid.

    I have played with custom event logs in the past though. I could never get Kaseya to pick it up. It only worked for events that the system/windows/apps generated.