Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Mike Atkin
2016-08-04T05:53:00Z
I'd like to request the ability to not only ping an IP address, but to check whether a particular port is allowing connection and to have this recorded in the log.

I currently use the software to ping IP addresses and alert users when no connection is available, however it would be useful to have this feature as occasionally ports have been closed but the ping carries on picking up the active IP address.

Many thanks

Mike
😎
Sponsor
Forum information
al355
2016-08-04T09:13:55Z
We do this using a Powershell script called from Visual Cron

param (
[string[]]$test = "s.code42.fr:23",
[string[]]$test = "localhost:10000"
[string[]]$test = "localhost:2306"
)

Foreach ($t in $test)
{
$source = $t.Split(':')[0]
$port = $t.Split(':')[1]

Write-Host "Connecting to $source on port $port"

try
{
$socket = New-Object System.Net.Sockets.TcpClient($source, $port)
}
catch [Exception]
{
Write-Host $_.Exception.GetType().FullName
Write-Host $_.Exception.Message
}

Write-Host "Connected`n"
}

Scroll to Top