Skip to content
New issue

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

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

Already on GitHub? # to your account

Check_yum.py not working on CentOS9 #400

Open
e36Alex opened this issue Dec 18, 2022 · 3 comments
Open

Check_yum.py not working on CentOS9 #400

e36Alex opened this issue Dec 18, 2022 · 3 comments

Comments

@e36Alex
Copy link

e36Alex commented Dec 18, 2022

Hello,

i tried to use check_yum.py at a CentOS9 (Python 3.9.14) installation and get the following error:
`[root@ds ~]# sudo /usr/lib/nagios/plugins/ext/check_yum.py -vvv
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: 'Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Last metadata expiration check: 0:11:37 ago on Sun Dec 18 19:14:03 2022.
'
YUM WARNING: Cannot find summary line in yum output. Please make sure you have upgraded to the latest version from https://github.com/HariSekhon/Nagios-Plugins. If the problem persists, please raise a ticket at https://github.com/HariSekhon/Nagios-Plugins/issues with the full -vvv output`

Thanks for your help!

@e36Alex
Copy link
Author

e36Alex commented Dec 21, 2022

When there updates available, the output is "ok".

YUM OK: 0 Security Updates Available. 73 Non-Security Updates Available

Was expecting, that non-security updates will be a warning an security update will be an error and no updates is "ok"

@HariSekhon
Copy link
Owner

If you want to warn on any update, then use the --all-updates switch.

The code probably needs some updating for the issue above, will look at it later.

@e36Alex
Copy link
Author

e36Alex commented Dec 22, 2022

One more addition:
When i set --all-updates, i get:
YUM OK: 0 Updates Available

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants