Skip to main content

MaintenanceWindow

Coming soon

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.

apiVersionmonitoring.stackngo.io/v1alpha1
kindMaintenanceWindow
Applied bysng apply; no effect in this version
Related commandssng 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.

No effect in this version

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​

samedi-soir.yml
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​

migration.yml
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 in monitors (a monitor carries no labels);
  • schedule.start and schedule.cron together, or neither;
  • a missing schedule.duration or one not of the form <entier>m / <entier>h;
  • more than 100 monitors, a monitor name that is not a DNS label, a cron longer than 100 characters, a timeZone longer 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.

ChampDescriptionDéfautValidation
apiVersion stringmonitoring.stackngo.io/v1alpha1
kind stringMaintenanceWindow
metadata ObjectMetaSeul 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.

ChampDescriptionDéfautValidation
monitors string arrayNoms des Monitor concernés (exclusif avec selector).MaxItems: 100
items:Pattern: ^[a-z0-9]([-a-z0-9]\{0,61\}[a-z0-9])?$
Optional: {}
selector LabelSelectorMonitor concernés, choisis par leurs labels (exclusif avec monitors).Optional: {}
schedule MaintenanceSchedulePlanification de la fenêtre.
excludeFromUptime booleanExclut la fenêtre du calcul d'uptime.true

MaintenanceWindowStatus​

MaintenanceWindowStatus : état de la fenêtre de maintenance.

ChampDescriptionDéfautValidation
active booleanIndique si une fenêtre est en cours.Optional: {}
nextStart TimeDébut de la prochaine fenêtre.Optional: {}
silenceIDs string arrayIdentifiants des suspensions d'alertes en cours (réservé à la plateforme).Optional: {}
conditions Condition arrayConditions de la fenêtre (Ready…), avec leur reason et un message lisible.Optional: {}

MaintenanceSchedule​

MaintenanceSchedule : occurrence unique (start) ou récurrente (cron).

ChampDescriptionDéfautValidation
start TimeDébut d'une fenêtre unique (exclusif avec cron).Optional: {}
cron stringExpression cron à 5 champs.MaxLength: 100
Optional: {}
duration stringDurée de la fenêtre, en minutes ou en heures (ex. 30m, 2h).Pattern: ^([1-9][0-9]*)(m|h)$
timeZone stringFuseau horaire de start et de cron (défaut : Europe/Paris).Europe/ParisMaxLength: 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​

SymptomCauseFix
sng apply rejects: spec.selector non accepté : utilisez spec.monitorsMonitors chosen by labelsName them in monitors
sng apply rejects: monitors ou selector : exactement un des deuxmonitors missingName the monitors in monitors
sng apply rejects: start ou cron : exactement un des deuxBoth given, or neitherKeep one
sng apply rejects on duration1h30m or 90A single unit: 90m
Alerts received during the windowWindows are not applied yetPause the monitors (paused: true)

See also​