Connectivity Verifiers feature

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Connectivity Verifiers feature

Postby Tom6457 » Oct 20 22 8:11 pm

Hello.

I consider WinGate proxy as replacement of TMG 2010 and looking for Connectivity Verifiers feature.
Is there any equvalent function/feature in WinGate proxy?
Or can it be added in the future releases?

Thank you
Tom
Tom6457
 
Posts: 3
Joined: Oct 20 22 8:01 pm

Re: Connectivity Verifiers feature

Postby adrien » Oct 22 22 1:49 pm

Hi Tom

you mean something that periodically checks connectivity is still working?

This can be done using the scheduler. The scheduler can launch a script (e.g. .VBS file) which checks connectivity, and exits the script with a code indicating success or failure. WinGate will pick up the process exit code and can act accordingly, sending you a notification.

Otherwise what would you like to see in such a feature? HTTP? DNS? Other?

Regards

Adrien de Croy
adrien
Qbik Staff
 
Posts: 5444
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Connectivity Verifiers feature

Postby Tom6457 » Oct 28 22 11:36 pm

Hello.

Yes, exactly, periodical checks of connectivity and dashboard showing status of all connectivity verifiers.

To "Scheduler and scripts to check connectivity": Is it possible to use Lua, Javascript scripting features integrated in Wingate or scheduler launch script have to be external script/program?

To "Otherwise ... in such feature": In basic approach ping and TCP connect close test with results on dashboard would be enough. In more advanced approach DNS test/lookup, HTTP connect, get, with results on dashboard (and Wingate event system).

Thank you

Tom
Tom6457
 
Posts: 3
Joined: Oct 20 22 8:01 pm

Re: Connectivity Verifiers feature

Postby adrien » Oct 29 22 10:31 am

Hi Tom

We have done this ourselves in the past. But always with a VBS script, executed (Run Process item) from a policy. If you use wscript.Quit(1) in error condition, then the policy will see that and you can follow that branch of processing.

For example here's a script we used to check that mod_rewrite was still working on our server (we don't use it any more because it was flaky)

Code: Select all
' a URL that depends on mod_rewrite being functional
strFileURL = "http://www.wingate.com/products/wingate/index.php"
' Fetch the URL
On Error Resume Next

Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.send()

'Test the return code from the HTTP server
If objXMLHTTP.Status = 200 Then
  ' check content for the word "error" - case insensitive
  strContent =  LCase(objXMLHTTP.ResponseText)
  if InStr(strContent,"error") > 0  Then
     ' return from script processor with process exit code 1.  This will be picked up by policy as an error
    wscript.Quit(1)
  End if 
Else
  ' return from script processor with process exit code 1.  This will be picked up by policy as an error
  wscript.Quit(1)
End if
Set objXMLHTTP = Nothing


We ran it from a Run Process item

commandline: cmd.exe /c "C:\Program Files\WinGate\scripts\checkmodr.vbs"
start folder: c:\Program files\WinGate\Scripts
run process as user: me

We found you needed to run as a user account, the LocalSystem account was unreliable.

Anyway, this would run the script, and we'd get the return code and act accordingly (either trigger a notification, or clear it if the script succeeded). The notification could then escalate notifying admins about what is going on.

It's not very elegant, but quite powerful. A custom module in WinGate for this would be better probably.

Adrien
adrien
Qbik Staff
 
Posts: 5444
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Connectivity Verifiers feature

Postby adrien » Oct 29 22 10:33 am

to clarify. The Jscript item doesn't have access to connectivity.

The LuaScript item can load external libraries, so could feasibly get access to connectivity checking features. This would give you the opportunity to access more of the details around the issue in WinGate event processing.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5444
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Connectivity Verifiers feature

Postby Tom6457 » Nov 05 22 1:42 am

Hi Adrien.

Thank you for script and a "Run Process" advices.

Can be "Run Process" parametrized? Intention is to have only one test script a call "Run Process" with parameter "host/site to test".
Is it possible to show results of "Run Process" Connectivity verifiers on one common place, maybe WinGate dashboard?
What is it custom module in WinGate? How it can be prepared?

Thank you
Tom
Tom6457
 
Posts: 3
Joined: Oct 20 22 8:01 pm

Re: Connectivity Verifiers feature

Postby adrien » Nov 21 22 12:40 pm

Hi Tom

Yes, the run process uses a commandline which can be built out of data that is available in the event that it is attached to. So you can embed event data into the commandline which is executed.

You could set the result to an indicator (via global data) that can show on the dashboard. For example in Global Data, you can use boolean objects to store a state (on / off), and these can be shown using an indicator in the dashboard.

Custom module - this is a DLL (pair) built using C++ and our API / SDK. This allows you to do anything inside WinGate, but requires C++ development and learning the SDK.

http://docs.qbik.com/display/WINGATESDK/WinGate+SDK

Regards

Adrien de Croy
adrien
Qbik Staff
 
Posts: 5444
Joined: Sep 03 03 2:54 pm
Location: Auckland


Return to WinGate

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests

cron