distribution_release_security_support
distribution_release_security_support fails when the security support that
the input security_support chooses ends for the node's Debian, Ubuntu, Red Hat family, or SUSE
release within the time you state, or has already ended. The message from distribution_release_security_support
names the release and the end date.
The update and release-support checks report waiting updates, a required restart, and the end of a release's security support. The update and release-support checks do not look for known exploited flaws.
Use apt_security_updates on Debian and
Ubuntu, dnf_security_updates on the Red Hat
family, or zypper_security_patches on
SUSE, for security updates that wait, and reboot_after_updates
for installed updates that need a restart.
To find known exploited flaws in installed packages, including flaws with no
fix yet, use known_exploited_vulnerabilities_in_installed_packages, which reads CISA's list and OSV.dev.
Set up
Debian and Ubuntu cloud images and server installations may lack
distro-info-data. Install distro-info-data on the node, as root:
apt-get install distro-info-data
The release dates stay current when apt installs updates to
distro-info-data alongside updates to the node's other packages.
MMWatchdog reads the installed files and downloads nothing.
On the Red Hat family, such as Rocky Linux, AlmaLinux, and Fedora, the node needs
nothing. The release package installs /etc/os-release with the field
SUPPORT_END, which the check reads.
On SUSE, such as openSUSE Leap, the node needs nothing. The release package
installs the product file /etc/products.d/baseproduct, which the check
reads.
Inputs
security_support(regular,debian_lts, orubuntu_pro; required): The security support that the check counts down to. regular: Debian's regular security support (the column eol) or Ubuntu's standard security maintenance (eol-server). debian_lts: Debian LTS (eol-lts), on Debian only. ubuntu_pro: Ubuntu Pro's Expanded Security Maintenance (eol-esm), on Ubuntu only. When the release has no date in the chosen column, the check uses the column eol. On SUSE, such as openSUSE Leap, regular is the end of the release (the endoflife of /etc/products.d/baseproduct), and on the Red Hat family, such as Rocky Linux and AlmaLinux, it is the SUPPORT_END of /etc/os-release. On both, the other two values make the check unknown.fail_when_security_support_ends_within(duration; required): The check fails when the security support that security_support chooses ends within this time for the node's release, such as 180d.
When the check fails, and when it cannot check
- The check fails when the chosen security support ends within
fail_when_security_support_ends_within, including exactly that time, or has already ended. For example,180dgives about six months to upgrade the release. - The check is healthy when the end of the chosen security support is more than
fail_when_security_support_ends_withinaway. - Healthy and failed results name the release and date:
this node runs Debian GNU/Linux 13 (trixie): Debian's regular security support ends on 2028-08-09, in 21 months. After the date, the message saysSUPPORT ended on DATE, SPAN ago. Below 60 days, SPAN is whole days. From 60 days, SPAN is whole months, with 30.4375 days per month. The day and month counts are rounded down. - The check is unknown when the distribution is not Debian, Ubuntu, the
Red Hat family, or SUSE, the codename of a Debian or Ubuntu node is missing, the dates cannot
be read, the release has no known end date, or
security_supportnames the support of the other distribution. Debian and Ubuntu derivatives are unknown even ifID_LIKEnames Debian or Ubuntu. SUSE and the Red Hat family need no codename, and the check reads none. On the Red Hat family, a missing or unreadableSUPPORT_ENDmakes the check unknown.
An unknown result opens a cannot-check incident once it has lasted for the
check's alert_after_failing_for, as for every check
(the failing time).
Examples
# /etc/mmwatchdog/check_groups/node_software.yml
check_groups:
node_software:
check_every: 1d
time_limit_per_run: 10s
alert_after_failing_for: 0s
recovered_after_healthy_for: 0s
checks:
release_gets_security_fixes:
distribution_release_security_support:
security_support: regular
fail_when_security_support_ends_within: 180d
alert_severity: warn
Once a day, MMWatchdog on the node reads the end date. The first run within
180 days of the end date of regular security support sends a warn alert.
After an upgrade to a release with more than 180 days of regular security
support remaining, the first healthy run sends recovery.
How it works
MMWatchdog reads ID, ID_LIKE, VERSION_CODENAME, and PRETTY_NAME from
/etc/os-release. Only ID=debian and ID=ubuntu select a dates file. A
node whose ID or ID_LIKE contains suse is a SUSE node, and a node whose
ID or ID_LIKE names rhel, rocky, almalinux, or centos is a node of
the Red Hat family.
PRETTY_NAME supplies the release name in the message.
MMWatchdog reads /usr/share/distro-info/debian.csv on Debian and
/usr/share/distro-info/ubuntu.csv on Ubuntu. The required input
security_support selects the deadline:
security_support |
Debian | Ubuntu |
|---|---|---|
regular |
Debian's regular security support, eol |
Ubuntu's standard security maintenance, eol-server |
debian_lts |
Debian LTS, eol-lts |
Not allowed: the check is unknown |
ubuntu_pro |
Not allowed: the check is unknown | Ubuntu Pro's Expanded Security Maintenance, eol-esm |
A team that moves servers before Debian LTS takes over chooses regular.
A team content with Debian LTS's narrower package coverage chooses
debian_lts. A team whose Ubuntu nodes are attached to Ubuntu Pro chooses
ubuntu_pro. The check reads only the published dates: the check does not
verify that the node is attached to Ubuntu Pro, or that Debian LTS covers
the node's packages.
MMWatchdog finds columns by their header names, then finds the row whose
series equals VERSION_CODENAME. When the chosen end-date cell is empty,
MMWatchdog uses eol, such as for Ubuntu interim releases, which have no
eol-server or eol-esm. The message then says so, for example
this node runs Ubuntu 25.10: the release has no end date of Ubuntu Pro's Expanded Security Maintenance, and the release's support ends on 2026-07-09, in 8 months. A missing row or no usable end date makes the check unknown.
On a SUSE node, only security_support: regular applies. MMWatchdog reads
/etc/products.d/baseproduct, a link to the product file such as Leap.prod.
The end of the release is the <endoflife> element directly inside
<product>, such as 2028-11-30. The <endoflife> inside <codestream> is
the end of the whole Leap 16 line, and the check does not use it. A missing
file, a missing <endoflife>, or an unreadable date makes the check
unknown. The message says this node runs openSUSE Leap 16.1: SUSE's regular security support ends on 2028-11-30, in 24 months.
On a node of the Red Hat family, only security_support: regular applies. The
check reads SUPPORT_END from /etc/os-release, a date such as 2032-05-31,
with or without quotes. The release package of the distribution installs the
file, and the vendor states in it the end of the release's updates: Rocky Linux
9.8 has SUPPORT_END="2032-05-31", and AlmaLinux 10.2 has
SUPPORT_END=2035-06-01. Fedora 45 has SUPPORT_END=2027-12-08, the end of
that Fedora release, after which it gets no updates. A missing or unreadable
SUPPORT_END makes the check unknown. The message says this node runs Rocky Linux 9.8 (Blue Onyx): the regular security support that the release states ends on 2032-05-31, in 67 months.
The date is YYYY-MM-DD, at 00:00 UTC. MMWatchdog subtracts the current
time from the end date of the chosen security support.
The check fails when the remaining time is no greater than
fail_when_security_support_ends_within.
Errors and what they mean
| Message | What the message means, and what to do |
|---|---|
distribution_release_security_support.security_support: is required: ... |
State regular, debian_lts, or ubuntu_pro below the module name. |
security_support: debian_lts applies only to Debian, and this node runs NAME |
The value names the support of the other distribution. On Ubuntu, use regular or ubuntu_pro; on Debian, regular or debian_lts. |
distribution_release_security_support.fail_when_security_support_ends_within: is required: ... |
State a duration, such as 180d, below the module name. |
MMWatchdog does not know the security support of NAME: it knows only that of Debian, Ubuntu, the Red Hat family, and SUSE |
The distribution's ID is neither debian nor ubuntu, neither ID nor ID_LIKE contains suse, and none names rhel, rocky, almalinux, or centos. A missing name is shown as a distribution that /etc/os-release does not name. |
/etc/os-release names no VERSION_CODENAME, so MMWatchdog cannot find the release of this node |
The node's release file has no codename. Check /etc/os-release. |
MMWatchdog cannot read PATH, which holds the dates of the releases: install the package distro-info-data |
The dates file is missing. Install distro-info-data. |
/etc/os-release gives no SUPPORT_END for this release, which the release package of NAME installs |
A node of the Red Hat family has no SUPPORT_END in /etc/os-release. Update the release package. |
MMWatchdog cannot read the SUPPORT_END of /etc/os-release: ERROR |
The SUPPORT_END is not a date YYYY-MM-DD. |
MMWatchdog cannot read PATH: ERROR |
The file cannot be read or parsed. Inspect the error and the installed package's file. |
MMWatchdog cannot read /etc/products.d/baseproduct, the product file of this release, which the release package of NAME installs |
A SUSE node has no product file. Check that the release package is installed. |
/etc/products.d/baseproduct gives no endoflife for this release |
The product file has no <endoflife> directly inside <product>. |
MMWatchdog cannot read the endoflife of /etc/products.d/baseproduct: ERROR |
The <endoflife> is not a date YYYY-MM-DD. |
PATH gives no end of SUPPORT for CODENAME: update the package distro-info-data |
The row or end date is missing. SUPPORT names the chosen support. Update distro-info-data; an unreleased release may have no date yet. |
Tested on
Limits on each distribution says what MMWatchdog cannot do on each distribution, or did not test there, and why.
-
Go tests in
server_checks_test.go:TestDistributionReleaseSecuritySupportCheckcovers healthy, approaching, and ended support; both support choices on Debian and Ubuntu; fallback dates and names; the threshold; and missing files, dates, rows, and codenames.TestDistributionReleaseSecuritySupportCheckOnSUSEinsuse_checks_test.gocovers the product file: healthy, within the threshold, ended, a file with both<endoflife>elements (the release's wins), without<endoflife>, with an unreadable date, and missing, and the other distributions' support values.TestDistributionReleaseSecuritySupportCheckOnTheRedHatFamilyinred_hat_checks_test.gocoversSUPPORT_ENDhealthy, within the threshold (with quotes, as Rocky Linux writes it), ended, missing, unreadable, and the other distributions' support values.TestDistributionReleaseSecuritySupportCheckOnFedorainfedora_checks_test.gocovers Fedora'sIDand itsSUPPORT_END.TestUpdateChecksOnUnknownDistributionscovers unsupported distributions, including Linux Mint. Input validation accepts both support choices and rejects missing support, a wrong support value, a missing duration, orsoon. -
The node suite (
node_scenarios.py) testsdistribution_release_security_supporton the Debian, Ubuntu, and openSUSE Leap releases, and on Rocky Linux 9, AlmaLinux 10, and Fedora 45, of every target distribution. On Arch Linux, the suite checks only that the check is unknown and that its message names the distribution. On openSUSE Leap, the suite reads<endoflife>from the product file with Python's XML parser and compares it with the check's date, status, and message. On Rocky Linux, AlmaLinux, and Fedora, the suite readsSUPPORT_ENDwith the shell and compares it with the check's date, status, and message, and removes the line to check the unknown result. The node suite installsdistro-info-datawhen missing, then moves the dates file away on the test guest and checks for an unknown result. The suite reads the support end date independently from the test guest's dates file, by the column's name.For both support choices with
180d, the check must match the status calculated from the date. Ended support fails at any lead time. With3650d, a support choice whose date is more than 180 days away must fail. Each message must name the selected support or fallback, the end date read by the suite, and the test guest'sPRETTY_NAME. -
The latest run passed on every target distribution (validation record).
Why it works this way
- The check names the support explicitly. A reader of the check sees which security support deadline the check counts down to.
- Debian LTS differs from regular security support. A separate team runs Debian LTS, with fewer packages covered. A team may need to move servers before regular security support ends.
- The chosen support can end while apt still reports no waiting updates.
apt_security_updatesreports updates that wait to be installed, but cannot warn that security support has ended. - Each value names one support. On Ubuntu, a value such as
long_termwould read like an Ubuntu LTS release, whose support is whatregularcounts down to.debian_ltsandubuntu_proname the support itself, and a value of the other distribution makes the check unknown rather than guessing. - The check does not count down to Debian's paid Extended LTS
(
eol-elts) or Ubuntu's paid Legacy Support (eol-legacy). Both extend support beyonddebian_ltsandubuntu_pro. A value for them can be added when a team needs one. - Installed release data needs no network request. The release dates
stay current when apt installs updates to
distro-info-dataalongside updates to the node's other packages. A missing date is unknown, never proof of continuing support. - Derivatives have their own support policies.
ID_LIKEcannot prove that a derivative gets fixes until Debian's or Ubuntu's end date. - SUSE's end date is the release's, not the line's. The product file of
Leap 16.1 holds the end of Leap 16.1 itself and, in
<codestream>, the end of the whole Leap 16 line, which is later. A node that moves to the next Leap 16 release must move before the release's own end date. - SUSE has one value,
regular. The product file gives one end date.debian_ltsandubuntu_proare the support of other distributions, so they make the check unknown rather than guess.
This page is docs/reference/modules/distribution_release_security_support.md in the MMWatchdog repository.