Though Automate/LabTech has built-in tests for website latency and simple ping up/down checks, there is nothing in place for monitoring latency/response time on a network.

This can be achieved by doing the following:

  1. Right click the agent you want to install the monitor on, Monitors > Add New Monitor
  2. Choose Yes to create using the Wizard
  3. Choose Monitor the results of an Executable
  4. In the Executable / Arguments box – paste the following code (it should all be one line and you should replace www.google.co.uk with your server/ip you want to test
    "c:\windows\system32\windowspowershell\v1.0\powershell.exe" -command "& {$Avg = 0;$Server = \"www.google.co.uk\";$PingServer = Test-Connection -count 3 $Server;$Avg = ($PingServer | Measure-Object ResponseTime -average);$Calc = [System.Math]::Round($Avg.average);Write-output $calc}"
  5. In a Remote Monitor you are monitoring for the GOOD condition, not the bad, so lets say we want to trigger this monitor when the average response is over 50 MS, in Comparison Function choose Less Than and in the Compare result against type 50
  6. Choose Next.
  7. Set the Frequency to however often you want to check
  8. Set the Alert Style (how many times the monitor has to fail before an alert is triggered) to whatever value you wish, and set the alert template to alert however you want to alert.
  9. Leave the defaults for Alert Message, if you want to customise this then make sure the subjects are identical for Success and Failure
  10. Set the monitor name, I have my own convention – TEST TYPE – Brief Description – Custom (Company Name), so in this instance PING – Latency to Google is under 50ms – Custom (Gavsto)
  11. Click Finish
  12. Give it a minute or two to create then bring back results from the monitor