Ad Widget

Collapse

Zabbix 3.4.4 Web Monitoring step HTTPS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aaresmi
    Junior Member
    • Aug 2015
    • 18

    #1

    Zabbix 3.4.4 Web Monitoring step HTTPS

    Hi,

    Anyone use HTTPS steps with SSL certificate file and SSL key file? is this working with Zabbix 3.4.4? I only get Couldn't connect to server: couldn't connect to host. with cURL command line tool all works smooth and with C binary that i've create works too but with zabbix there is no way always Couldn't connect to server: couldn't connect to host error

    this is my sample code:
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&output);
    curl_easy_setopt(curl, CURLOPT_URL, "https://test:91/TEST/TESTService.svc?wsdl");
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
    curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
    curl_easy_setopt(curl, CURLOPT_SSLCERT, "./cert.pem");
    curl_easy_setopt(curl, CURLOPT_SSLKEY, "./cert.key");
    curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "XXXXXX");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/4.0");
    curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1 );
    curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
    curl_easy_setopt(curl, CURLOPT_TIMEOUT, 15);
    res = curl_easy_perform(curl);
    curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code);
    And this the curl command:
    curl -kvL --cert cert.pem --key cert.key --pass XXXXXX -X GET "https://test:91/TEST/TESTService.svc?wsdl"
Working...