Hi
i have a vbs script that can check a url is opening or not
Code: Select all
url = "http://estelamwebservice.nocrservices.org/iws/Estelam?wsdl"
Set http = CreateObject("MSXML2.ServerXMLHTTP")
http.open "GET",url,false
http.send
If http.Status = 200 Then
wscript.echo "HTTP OK - " & url & " returns " & http.Status
exitCode = 0
ElseIf http.Status > 400 And http.Status < 500 Then
wscript.echo "HTTP WARNING - " & url & " returns " & http.Status
exitCode = 1
Else
wscript.echo "HTTP CRITICAL - " & url & " returns " & http.Status
exitCode = 2
End If
WScript.Quit(exitCode)
[/settings/external scripts/scripts]
check_url = cscript.exe //T:30 //NoLogo scripts\\url.vbs $ARG1$
check_myurl = cscript.exe //T:30 //NoLogo scripts\\url.vbs
when web site can open it will ok on nagios
but when i change url for example change to
ttt.com
C:Program FilesNSClient++scriptsurl.vbs(4, 1) msxml3.dll: The server name or address could not be resolved
and not change to warning or critical it show ok with above decription
why it don't show warning or critical ?
BR