Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improperly fails (reports OK) on RHEL Systems with Unassigned Subscriptions #426

Open
mfrazier opened this issue Jul 8, 2024 · 0 comments

Comments

@mfrazier
Copy link

mfrazier commented Jul 8, 2024

When running the Nagios Yum Check Plugin on RHEL systems registered with an entitlement server but without assigned subscriptions, it becomes impossible to check for potential updates. Despite this, yum/dnf will still exit with a status of 0. This issue can occasionally arise when Red Hat representatives misassign or erroneously move subscriptions within an organization.

I have addressed this issue by making a simple change to your check_returncode function and believe that others may benefit from this solution as well. Thank you for your work on this plugin; it has been incredibly useful.

Nagios Plugin for Yum updates on RedHat/CentOS systems - Version 0.12.7
Author: Hari Sekhon

setting plugin timeout to 30 seconds
running command: /usr/bin/yum --security check-update
Returncode: '0'
Output: 'Updating Subscription Management repositories.

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

Last metadata expiration check: 1:48:44 ago on Mon 08 Jul 2024 04:39:59 PM UTC.
'
running command: yum updateinfo
Returncode: '0'
Output: 'Updating Subscription Management repositories.

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

Last metadata expiration check: 1:48:45 ago on Mon 08 Jul 2024 04:39:59 PM UTC.
Updates Information Summary: available
    1 New Package notice(s)
'
YUM OK: 0 Security Updates Available. 0 Non-Security Updates Available | security_updates_available=0 non_security_updates_available=0 total_updates_available=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant