Problem/Motivation

In Drupal 11 drush nagios, drush nagios requirements and Nagios HTTP status page do not show outdated modules and core.
Only drush nagios-updates shows outdated module names.

Works with Drupal 10.

Some requirements hooks in Drupal core were moved to runtime_requirements and moved from .install to hooks directory in Drupal 11

Steps to reproduce

Nagios settings: Cron + Requirements + Show outdated module/theme name
No ignored modules

Proposed resolution

Call hook_runtime_requirements.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

sleitner created an issue. See original summary.

sleitner’s picture

Issue summary: View changes
sleitner’s picture

Issue summary: View changes
sleitner’s picture

Issue summary: View changes
sleitner’s picture

Issue summary: View changes
sleitner’s picture

Issue summary: View changes
gogowitsch’s picture

Thanks for reporting this! I’ll look into the problem within the next 2 weeks.

gogowitsch’s picture

The relevant Change Record is Runtime requirements checks should use a dedicated hook (introduced in Drupal 11.2). Three things broke:

  1. hook_runtime_requirements() wasn't being called at all — fixed by adding it to the per-module loop in collectRequirements()
  2. _update_requirement_check() was removed from D11 — fixed by adding computeContribRequirement() with guard for D10 compatibility.
  3. RequirementSeverity is now an enum (not int) in D11 — fixed by normalizing to int in findMostSevereProblem()

    @sleitner: feel free to test and give feedback for my fix if you have the time. I’ll release a new version in about a week or once I have confirmation that the fix works for you.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • gogowitsch committed 25eca930 on 8.x-1.x
    fix: #3593464 Does not show outdated modules and core in Drupal 11
    
    By:...
sleitner’s picture

Core and module updates are now listed with drush nagios-updates, drush nagios requirements and drush nagios

sleitner’s picture

@gogowitsch thank you for the new version