Get uptime metrics for an SLA data source
slas.get_uptime_metrics(strdata_source_urn, SlaGetUptimeMetricsParams**kwargs) -> SlaGetUptimeMetricsResponse
GET/v1/slas/{sla_urn}/data-sources/{data_source_urn}/uptime-metrics
Get uptime metrics for an SLA data source
Parameters
sla_urn: str
data_source_urn: str
timeframe_end: Optional[str]
Year and month landing within the last SLA evaluation period to include in the result, in the format YYYY-MM
timeframe_start: Optional[str]
Year and month landing within the first SLA evaluation period to include in the result, in the format YYYY-MM
Returns
Get uptime metrics for an SLA data source
import os
from clarative import Clarative
client = Clarative(
api_key=os.environ.get("CLARATIVE_API_KEY"), # This is the default and can be omitted
)
response = client.slas.get_uptime_metrics(
data_source_urn="data_source_urn",
sla_urn="sla_urn",
)
print(response)[
{
"data_source_urn": "data_source_urn",
"downtime_events": [
{
"duration_hours": 0,
"end_time": "2019-12-27T18:11:19.117Z",
"name": "name",
"start_time": "2019-12-27T18:11:19.117Z"
}
],
"downtime_hours": 0,
"sla_urn": "sla_urn",
"timeframe": {
"end": "2019-12-27T18:11:19.117Z",
"start": "2019-12-27T18:11:19.117Z"
},
"uptime_percentage": 0,
"vendor_urn": "vendor_urn"
}
]Returns Examples
[
{
"data_source_urn": "data_source_urn",
"downtime_events": [
{
"duration_hours": 0,
"end_time": "2019-12-27T18:11:19.117Z",
"name": "name",
"start_time": "2019-12-27T18:11:19.117Z"
}
],
"downtime_hours": 0,
"sla_urn": "sla_urn",
"timeframe": {
"end": "2019-12-27T18:11:19.117Z",
"start": "2019-12-27T18:11:19.117Z"
},
"uptime_percentage": 0,
"vendor_urn": "vendor_urn"
}
]