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

check_yum not ignoring output for repository priority protections #343

Open
edwardvdv opened this issue Sep 20, 2020 · 3 comments
Open

check_yum not ignoring output for repository priority protections #343

edwardvdv opened this issue Sep 20, 2020 · 3 comments

Comments

@edwardvdv
Copy link

edwardvdv commented Sep 20, 2020

check_yum latest version complaining about output lines not accounted for. This is related to repository priority protections. Reproducible when yum is setup with repo prio protection in place in config and "priorities" plugin used (tested on CentOS, Amazon Linux).

Output of invocation check_yum -W -N -vvv:

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

setting plugin timeout to 30 seconds
running command: /usr/bin/yum --security check-update
Returncode: '0'
Output: 'Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
198 packages excluded due to repository priority protections
<<<snip: long long list of excluded packages>>>
No packages needed for security; 0 packages available
'
output lines not accounted for: ['198 packages excluded due to repository priority protections']
YUM WARNING: Yum output signature (1 unique lines) is larger than number of total updates (0). 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

Proposed and verified working solution:

Add the line excluded due to repository priority protections to excluded_regex.

@edwardvdv edwardvdv changed the title check_yum check_yum not ignoring output for repository priority protections Sep 20, 2020
@restena-sw
Copy link

FWIW, same issue here. Attaching a -vvv output.
Uploading check_yum.txt…

@restena-sw
Copy link

That didn't work so well apparently. Copy&Pasting like above:

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

setting plugin timeout to 30 seconds
running command: /usr/bin/yum --security check-update -C
Returncode: '0'
Output: 'Loaded plugins: fastestmirror, priorities
124 packages excluded due to repository priority protections
--> libappindicator-gtk3-12.10.0-13.el7.i686 from base excluded (updateinfo)
[...lots more packages...]
--> pcp-pmda-json-4.3.2-7.el7_8.x86_64 from updates excluded (updateinfo)
No packages needed for security; 0 packages available
'
output lines not accounted for: ['124 packages excluded due to repository priority protections']
YUM WARNING: Yum output signature (1 unique lines) is larger than number of total updates (0). 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

@vmracks-rc
Copy link

I have/had the same issue on version 0.11.3. Adding the line 'packages excluded due to repository priority protections', to line 464 (or somewhere in the excluded_regex list) worked for me. That entry was based on the verbose output from the "output lines not accounted for" message:

Partial -vvv logs, but I feel it shows the relevant info...

No packages needed for security; 0 packages available
'
output lines not accounted for: ['881 packages excluded due to repository priority protections']
YUM WARNING: Yum output signature (1 unique lines) is larger than number of total updates (0). 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

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

3 participants