Skip to content

Alerts, metrics and the API

Editions: Business and MSP.

Alerts

Alert Key Tab Level When
Capacity runway short capacity_runway Capacity warning, critical A cluster, datastore, pool, backup store or volume is forecast to reach its threshold within the warning runway (90 days unless set): a warning. Within the critical runway (30 days), or over its threshold already: critical
Platform license expiring, expired or over-used platform_license Virtualization warning, critical A vCenter license expires within 30 days (warning), has expired (critical), or has more assigned than it holds (warning). The evaluation license never alerts
Drive wearing out or failing disk_wear Capacity warning A drive forecast to reach 10% life left within 90 days, at 10% already, or showing signs of failing. See Disk wear
Uplink or WAN heading for saturation link_saturation Capacity warning A link between switches, or a WAN, whose 95th percentile is forecast to reach 80% of its speed within 90 days, or was over 80% on 3 of the last 7 days. See Network
PoE budget running out poe_budget Capacity warning A switch's peak PoE draw forecast to reach 90% of its budget within 90 days, or over 90% now. See Network
Rack inlet over 27 °C rack_inlet_hot Capacity warning A rack's hottest server inlet over 27 °C on 3 readings in a row; clears under 26 °C. See Rack cooling
PDU near its rating pdu_load Power and servers warning, critical A PDU's draw passes 80% of its rating (warning), or 95% (critical)

Hosts never raise runway alerts: a cluster balances them. Nor do the allocation rows (vCPUs and memory allocated, disk provisioned), unless CAPACITY_ALLOC_ALERTS names them: see forecasts. A backup store whose retention is still filling says in the alert that the date may be early.

They're ordinary alerts: on Needs attention, counted on their tab, in the alert history, and sent through your notification rules, which can name the tab (capacity) or the key, such as NOTIFY_RULES=capacity_runway=bad. Maintenance mode holds them like any other.

Metrics

On /metrics, and in VictoriaMetrics, with the usual infra_ prefix.

Metric Labels What it is
infra_capacity_used_ratio source, kind, name, resource Use of usable capacity on the latest day: CPU and memory at their 95th percentile, disk its average, allocation against its limit
infra_capacity_threshold_ratio the same The threshold the forecast is for
infra_capacity_runway_days the same Days until the threshold; 0 when over it. Absent when not rising, not within a year, or too little history
infra_link_p95_ratio device, port An uplink's or WAN's 95th percentile on the latest day kept, the busier direction, over its speed. A WAN's port is its name, such as WAN2
infra_poe_budget_used_ratio device A switch's peak PoE draw on the latest day kept, over its budget
infra_rack_inlet_celsius rack, site, stat A rack's server inlet temperature now, from the BMCs: stat="max" the hottest, stat="median" the median
infra_pdu_up source, pdu 1 when the PDU answers
infra_pdu_current_amperes, infra_pdu_rated_amperes, infra_pdu_power_watts, infra_pdu_load_ratio source, pdu The PDU's draw, rating, power and load
infra_pdu_outlet_on, infra_pdu_outlet_current_amperes, infra_pdu_outlet_power_watts source, pdu, outlet Each outlet
infra_ipam_subnet_free_addresses, infra_ipam_subnet_size_addresses source, subnet Free and usable addresses, as the IPAM records them
infra_dcim_rack_free_units source, rack Free rack units, from NetBox

kind is cluster, host, datastore, pool, backup or volume. resource is cpu, mem, disk, alloc_cpu, alloc_mem or alloc_disk.

A Grafana panel of the shortest runways:

bottomk(10, infra_capacity_runway_days)

Capacity metrics need a license; the others are on every edition.

The API

Read with the same session or token as the dashboard. The capacity ones need a license and answer 403 without one.

Method and path Returns
GET /api/capacity Every entity with its resources and forecasts, the reclaim list, storage growth, the network's links and PoE budgets (network), the summary's status, and the thresholds, runway, ratios and VM size in force
GET /api/capacity/history?key=<key>&resource=<resource> One resource's daily history, for the chart
GET /api/capacity/vms?key=<cluster key> A cluster's VMs, busiest first, for moving VMs
GET /api/capacity/expand?key=<key>&disks=<n>&tb=<size> What n disks of that size add to a pool or volume, and its layout. n from 1 to 200
GET /api/capacity/readiness?key=<cluster key> The rack check for one more host
GET /api/capacity/summary?month=YYYY-MM The monthly summary page. Add &download=1 to save it as a file
GET /api/capacity/settings Settings, with what's built in and what's set in the stack (admins)
POST /api/capacity/settings Save thresholds, spare hosts and the summary's settings (admins)
POST /api/capacity/summary/send?month=YYYY-MM Email a month's summary now; last month without month (admins)
GET /api/plant Reserved ports, racks and devices placed by hand (admins)
POST /api/plant/port Reserve or free a port: {"device": "<MAC>", "port": 6, "note": "…", "release": false} (admins)
POST /api/plant/place Place a device in a rack, for the LAN tab: {"device": "<MAC>", "rack": "R1", "u": 40, "height": 1}, or "clear": true to take it out (admins)
POST /api/plant/racks Replace the racks: {"racks": [{"name": "R1", "free_u": 3, "host_u": 1, "holds": ["esx01"], "ups": "rack-ups"}]} (admins)

A key is source|kind|name, such as vcsa|cluster|Prod or tank|volume|tank, as /api/capacity gives it. URL-encode the | as %7C.

Every change through the admin endpoints is in the audit log: capacity_settings_changed, capacity_summary_sent, port_reserved, device_placed and racks_changed.

The files on the volume

Everything is kept in files beside the outage archive, on Collimo's own volume (/var/lib/collimo), so it's in Collimo's archive copies and survives updates.

File What's in it Kept
capacity/capacity-YYYY-MM.jsonl One line per thing per day: averages, 95th percentiles, peaks, capacity, allocation Two years
capacity/vm-YYYY-MM.jsonl One line per VM per day, for reclaim and moving VMs About four months
capacity/net-YYYY-MM.jsonl One line per uplink, WAN and PoE switch per day: 95th percentiles, peak draw, speed and budget Two years
capacity/disks-YYYY-MM.jsonl, capacity/ups-YYYY-MM.jsonl One line per drive, and per UPS, per day: disk wear and UPS battery aging Two years
capacity/today.json The day so far, saved every ten minutes so a restart loses little Until midnight
capacity/seeded When history was first read back from old inventories, so it's done once Always
capacity/summary-sent The last month the summary was emailed Always

Reserved ports, racks, devices placed by hand and capacity settings are in the settings store, not here.