-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
general question #9
Comments
It's generally not possible to write any metrics via the Zabbix API, which is what this library is using. For that purpose, a PHP library that implements the Zabbix trapper/sender protocol should be used instead, like https://github.com/zarplata/zabbix-sender-php, for example. Alternatively, PHP can also send data by calling the |
hello, before testing implemented your code I testing with POSTMAN my Zabbix API was result success with ouput json Then i tried your code same as like simple.php file to access my Zabbix APPI ,here my code : `require_once("ZabbixApi.php"); use IntelliTrend\Zabbix\ZabbixApi; print "Zabbix API Example\n"; $zabUrl ='https://my.zabbixurl.com/api_jsonrpc.php'; $zbx = new ZabbixApi();
} catch (ZabbixApiException $e) { Result : Zabbix API Example Connect to API, check certificate/hostname and get number of hosts ===================================================== ==== Zabbix API Exception === Errorcode: 404 ErrorMessage: Request failed with HTTP-Code:404, sslVerifyResult:0. Whats wrong with my code ? But I expriment with code using curl : `$url = "https://my.zabbixurl.com/api_jsonrpc.php"; $headers = array( $curl = curl_init(); $data = <<<DATA DATA; curl_setopt($curl, CURLOPT_POSTFIELDS, $data); $resp = curl_exec($curl); echo $resp;` Thats code successfull output json same as like i tried with POSTMAN What is different between your class code because I want use your class ? Please give me some suggestion to handle the issues ? |
Yey..solved. I wrong write url endpoint. Remove "api_jsonrpc.php" from url so the actual is : https://my.zabbixurl.com thanks |
hi, is it possible to update checks in zabbix with this client? I would like to replace Nagios passive checks, where the client pushes the new state to the server.
thanks!
The text was updated successfully, but these errors were encountered: