thruk_hostgroup_availability
Calculate uptime and SLA percentages for hosts or services within a hostgroup over a defined time period, with options to include downtimes and soft states.
Instructions
Compute availability (uptime / SLA %) for all hosts/services in a hostgroup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | What to return: 'hosts' (default), 'services', or 'both'. Hosts return time_up_percent; services return time_ok_percent. | hosts |
| since | No | Start of analysis window. Thruk relative time ("-7d", "-1m") or ISO datetime ("2026-05-01 00:00:00"). Default: last 7 days. Ignored when ``timeperiod`` is set. | -7d |
| until | No | End of analysis window (same formats as ``since``). Defaults to now. Ignored when ``timeperiod`` is set. | |
| backends | No | Comma-separated backend names (sites). Omit for all backends. | |
| hostgroup | Yes | Hostgroup name | |
| timeperiod | No | Thruk-native time period shortcut: "last24hours", "lastweek", "lastmonth", "thismonth", etc. Overrides ``since``/``until`` when provided. | |
| with_downtimes | No | Count scheduled downtime periods as outages (withdowntimes=1). | |
| include_soft_states | No | Include soft state changes in calculations (includesoftstates=1). |