External Watchdog

Has anybody created an external watchdog service or is using a prebuilt one?

One of two PSU installations stops responding regularly, no hint in the logs. As it’s from minor importance I currently restart the windows service manually if I register it. But this may become a problem for my vacational planning :rofl:

My idea was to implement a small powershell script which checks the alive API and performs the service restart if needed. But I’d prefer to use something which already exists…

Product: PowerShell Universal
Version: 4.2.3
1 Like

I have not, but since you have two installs it sounds like you could use one to monitor the other?

You could use an application gateway / proxy in Azure to make a simple endpoint securely available on the internet and monitor it using UptimeRobot. UptimeRobot: Free Website Monitoring Service

Nice idea, but the servers are in an internal production network and therefor not reachable (by design) from Azure.

I’ve come to the conclusion that there seems to be no quick solution for this. For Linux etc. I’d take a look at Monit, but it’s not available on Windows. I’ll propose the creation of a generic solution for our next sprint.

  • PowerShell module
  • Allows the definition of a Watch-Instance, consisting of
    • Title
    • Script-Block to perform the health check
    • Intervall for the checks
    • Script-Block for the action to perform if the health check fails
    • Mail properties
  • Install the Watch-Instance as a scheduled task
    • Starts every 5min
    • One instance per watcher
  • Perform the health check
  • If this fails, perform the repair-action
  • Optionally send mails to inform about the problem

Finished the first release of my WatchDog PowerShell Module. The mailing part has been dropped from the requirements as our regular monitoring solution does this perfectly. And I did not want to rely on additional prerequisites.

1 Like