Microsoft Operations Manager |
The Pingmethod pings the specified host and measures the response time.
[VBScript] INet.Ping(Address String, Data
Variant, RoundTripMs Variant, [TimeOut Variant])
Boolean
The following example shows how to ping the www.microsoft.com server, raising an alert if the ping fails or it takes longer than 500 milliseconds.
[VBScript]
Dim objINet
Dim blnOK, lngRoundTripMs
Dim strData, strError
Set objINet = CreateObject("OpScrUtil.INet")
blnOK = objINet.Ping("www.microsoft.com", strData, lngRoundTripMs)
If (blnOK) Then
If (lngRoundTripMs > 500) Then
'Raise an alert
End If
Else
strError = objINet.GetError()
'Create an alert
End If
Set objINet = Nothing
Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1
Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.