Machine-readable end-of-life date for Ubuntu releases

Asked by Per Cederqvist on 2011-08-09

Using the Launchpad API, it is easy to check if a given Ubuntu version is still supported:

import launchpadlib.launchpad

def supported(version):
    cachedir = os.path.join("/tmp/", "launchpadlib-%s" % os.getuid(), "cache")
    lp = launchpadlib.launchpad.Launchpad.login_anonymously('just testing',
                                                            'production',
                                                            cachedir)
    ubuntu = lp.distributions["ubuntu"]
    return ubuntu.getSeries(name_or_version=version).supported

I'm writing a Nagios check to ensure my machines are running a supported version of
Ubuntu. I'd like the check to return a warning state a couple of months before the
version reaches end-of-life, but as far as I can tell the end-of-life date is not avalable
via the Launchpad API. I'm aware of https://wiki.ubuntu.com/Releases but that page
is fairly hard to parse.

Proposal: add an end_of_file attribute to object returned by getSeries, that contains
the currently scheduled end-of-life date as a string in YYYY-MM-DD format.

Or is that information already available in machine-readable form somewhere?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Benji York
Solved:
2011-08-10
Last query:
2011-08-10
Last reply:
2011-08-09
Max Bowsher (maxb) said : #1

Not a direct answer to your question, as it contains release dates, not EOL dates, but you may wish to be aware of http://changelogs.ubuntu.com/meta-release

Per Cederqvist (ceder) said : #2

Thanks. Then I just need to know which releases that are LTS releases. I could of course assume that X.04, where X is even, is an LTS release. That seems a bit fragile, though. :-)

Best Benji York (benji) said : #3

The EOL information is not available from the Launchpad API. Please file a bug report.

In the meantime, this version of the wiki page is slightly more parsable: https://wiki.ubuntu.com/Releases?action=raw

Per Cederqvist (ceder) said : #4

Thanks Benji York, that solved my question.