Get uptime statistics
get_uptime_statisticsGet uptime and downtime percentages for a monitor over a date range, grouped per minute, hour, day, week or month, alongside the average response timings measured in each interval. Use this to answer how much downtime a site had. A call returns at most 500 intervals, so pick a coarser group_by for a longer period. An interval without measurements, for example before the monitor was added, has null percentages: that is missing data, not downtime. The summary holds the uptime over the whole period. See https://ohdear.app/docs/api/uptime.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"monitor_id": "<monitor_id>"
},
"name": "get_uptime_statistics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End of the period, as YmdHis (20241202120000) or ISO 8601. Defaults to now. | |
| start | No | Start of the period, as YmdHis (20241201120000) or ISO 8601. Defaults to seven days ago. | |
| group_by | No | Grouping interval: minute, hour, day, week, or month. Defaults to hour. | |
| monitor_id | Yes | The ID of the monitor to get statistics for |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Requested time range and grouping interval when uptime is available. | |
| message | No | ||
| metrics | Yes | Calculated uptime metrics for each interval. Intervals without measurements have null percentages. | |
| monitor | Yes | ||
| summary | No | Measurement count and uptime percentage over the whole period. Percentages are null when nothing was measured. | |
| view_url | No |