NetXMS Support Forum

English Support => General Support => Topic started by: Marcin on December 09, 2015, 04:02:29 PM

Title: ServiceCheck.HTTPS for service behind proxy
Post by: Marcin on December 09, 2015, 04:02:29 PM
Hi,

Is it possible to use ServiceCheck.HTTPS to check status of the service behind normal proxy with login/password?

Best regards,
Marcin
Title: Re: ServiceCheck.HTTPS for service behind proxy
Post by: Alex Kirhenshtein on December 10, 2015, 03:16:56 PM
You can try to use netsvc subagent instead (which is libcurl based) and set http_proxy variable before starting agent. It's a bit ugly, but should work.
Details on netsvc: https://www.netxms.org/forum/configuration/servicecheck-http-2780/msg12143/#msg12143
A bit details on libcurl proxy support: http://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html

Another option is to use configure external parameter using curl / wget:ExternalParameter=CheckHTTPWithProxy:curl -o /dev/null -s -x http://proxyhost:3128 $1; echo $?

Then use it like this:nxget localhost 'CheckHTTPWithProxy(https://www.google.com/)'