Hello I have some services and I want to get their "uptime" with the API.
I have already the SLA with this code:
But now I want to get the Service Time but I can't find a solution...
I have already the SLA with this code:
PHP Code:
$apiT = new ZabbixApi($apiurl, $user, $passwd);
$apiT->setDefaultParams(array(
'output' => 'extend',
'serviceids' => $idT,
'intervals' => array(
'from' => time(),
'to' => time()
)
));
$slaT = $apiT->serviceGetTimes();
$arrayT = json_encode($slaT, true);
$jsonArrT = json_decode($arrayT, true);
$StringDataT = $jsonArrT[62]['sla'][0]['sla'];