MaintenanceWindow
In preparation. This page describes the target interface to gather your feedback; nothing is usable yet.
The manifest is accepted to freeze its format, but no window is applied yet.
apiVersion | monitoring.stackngo.io/v1alpha1 |
kind | MaintenanceWindow |
| Applied by | sng apply; no effect in this version |
| Related commands | sng template gen MaintenanceWindow, sng apply, sng kind list MaintenanceWindow, sng kind delete MaintenanceWindow NAME |
What it will be for
A MaintenanceWindow describes a one-off or recurring intervention period during which the
alerts of some Monitors will be silenced, their state shown as
"maintenance", and, by default, the period excluded from the uptime calculation.
The manifest is validated and saved, but nothing reads it: alerts are sent as usual, the
status page shows no maintenance state, uptime is not corrected, and the status stays
empty. For an intervention, pause the monitors concerned (paused: true) and then
reactivate them.
Minimal example
apiVersion: monitoring.stackngo.io/v1alpha1
kind: MaintenanceWindow
metadata:
name: samedi-soir
spec:
monitors: [api]
schedule:
cron: "0 22 * * 6"
duration: 2h
sng apply samedi-soir.yml
Complete annotated example
apiVersion: monitoring.stackngo.io/v1alpha1
kind: MaintenanceWindow
metadata:
name: migration
spec:
monitors: [api, www] # targeted monitors, by name (at most 100)
schedule:
start: "2026-10-10T22:00:00Z" # single occurrence — or cron, not both
# cron: "0 22 * * 6" # recurrence, 5-field cron
duration: 90m # duration: <integer>m or <integer>h
timeZone: Europe/Paris # time zone of the cron (default Europe/Paris)
excludeFromUptime: true # will exclude the window from the uptime calculation (default true)
Fields
Cross-field validation rules
The schema rejects, as early as sng apply:
- a missing
monitors; selector: monitors are designated by name inmonitors(a monitor carries no labels);schedule.startandschedule.crontogether, or neither;- a missing
schedule.durationor one not of the form<entier>m/<entier>h; - more than 100
monitors, a monitor name that is not a DNS label, acronlonger than 100 characters, atimeZonelonger than 64 characters.
The cron syntax and the existence of the monitors are not checked in this version.
MaintenanceWindow
MaintenanceWindow planifie une maintenance pendant laquelle vos monitors n'envoient pas d'alerte.
| Champ | Description | Défaut | Validation |
|---|---|---|---|
apiVersion string | monitoring.stackngo.io/v1alpha1 | ||
kind string | MaintenanceWindow | ||
metadata ObjectMeta | Seul metadata.name est à renseigner (nom de la ressource dans votre tenant). | ||
spec MaintenanceWindowSpec | |||
status MaintenanceWindowStatus |
MaintenanceWindowSpec
MaintenanceWindowSpec : période planifiée pendant laquelle les alertes des monitors visés sont suspendues. Les fenêtres de maintenance ne sont pas encore appliquées dans cette version.
| Champ | Description | Défaut | Validation |
|---|---|---|---|
monitors string array | Noms des Monitor concernés (exclusif avec selector). | MaxItems: 100 items:Pattern: ^[a-z0-9]([-a-z0-9]\{0,61\}[a-z0-9])?$ Optional: {} | |
selector LabelSelector | Monitor concernés, choisis par leurs labels (exclusif avec monitors). | Optional: {} | |
schedule MaintenanceSchedule | Planification de la fenêtre. | ||
excludeFromUptime boolean | Exclut la fenêtre du calcul d'uptime. | true |
MaintenanceWindowStatus
MaintenanceWindowStatus : état de la fenêtre de maintenance.
| Champ | Description | Défaut | Validation |
|---|---|---|---|
active boolean | Indique si une fenêtre est en cours. | Optional: {} | |
nextStart Time | Début de la prochaine fenêtre. | Optional: {} | |
silenceIDs string array | Identifiants des suspensions d'alertes en cours (réservé à la plateforme). | Optional: {} | |
conditions Condition array | Conditions de la fenêtre (Ready…), avec leur reason et un message lisible. | Optional: {} |
MaintenanceSchedule
MaintenanceSchedule : occurrence unique (start) ou récurrente (cron).
| Champ | Description | Défaut | Validation |
|---|---|---|---|
start Time | Début d'une fenêtre unique (exclusif avec cron). | Optional: {} | |
cron string | Expression cron à 5 champs. | MaxLength: 100 Optional: {} | |
duration string | Durée de la fenêtre, en minutes ou en heures (ex. 30m, 2h). | Pattern: ^([1-9][0-9]*)(m|h)$ | |
timeZone string | Fuseau horaire de start et de cron (défaut : Europe/Paris). | Europe/Paris | MaxLength: 64 |
Status and conditions
The status provides active (window in progress), nextStart (next occurrence),
silenceIDs, and conditions. None of these fields is filled in in this version.
What happens when you delete
sng kind delete MaintenanceWindow NAME removes the manifest. In this version, a maintenance
window has no effect on monitors, alerts, or the status page: creating or deleting it
changes nothing visible.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
sng apply rejects: spec.selector non accepté : utilisez spec.monitors | Monitors chosen by labels | Name them in monitors |
sng apply rejects: monitors ou selector : exactement un des deux | monitors missing | Name the monitors in monitors |
sng apply rejects: start ou cron : exactement un des deux | Both given, or neither | Keep one |
sng apply rejects on duration | 1h30m or 90 | A single unit: 90m |
| Alerts received during the window | Windows are not applied yet | Pause the monitors (paused: true) |
See also
- Guide: Status page — maintenance windows
- Other kinds:
Monitor,NotificationChannel,StatusPage