object service.getsla(object parameters)
This method allows to calculate availability information about services.
This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See User roles for more information.
(object) Parameters containing the IDs of the services and time intervals to calculate SLA.
|serviceids||string/array||IDs of services to return availability information for.|
|intervals||array||Time intervals to return service layer availability information about.
Each time interval must have the following parameters:
(object) Returns the following availability information about each service under the corresponding service ID.
|from||timestamp||Interval start time.|
|to||timestamp||Interval end time.|
|sla||float||SLA for the given time interval.|
|okTime||integer||Time the service was in OK state, in seconds.|
|problemTime||integer||Time the service was in problem state, in seconds.|
|downtimeTime||integer||Time the service was in scheduled downtime, in seconds.|
Retrieve availability information about a service during a week.
CService::getSla() in ui/include/classes/api/services/CService.php.