HariSekhon / Nagios-Plugins

450+ AWS, Hadoop, Cloud, Kafka, Docker, Elasticsearch, RabbitMQ, Redis, HBase, Solr, Cassandra, ZooKeeper, HDFS, Yarn, Hive, Presto, Drill, Impala, Consul, Spark, Jenkins, Travis CI, Git, MySQL, Linux, DNS, Whois, SSL Certs, Yum Security Updates, Kubernetes, Cloudera etc...
https://www.linkedin.com/in/HariSekhon
Other
1.13k stars 502 forks source link

check_yum fails after clearing metadata #412

Open gitwart opened 8 months ago

gitwart commented 8 months ago

On my RL8 and RL9 systems, after running dnf clean metadata, the check_yum tool generates the 'Cannot find summary line output' message. A subsequent run of check_yum succeeds.

# ./check_yum -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: 'lscsoft-backports                                65 kB/s | 5.8 kB     00:00    
OSG 3.6 Software for Enterprise Linux 9 - x86_6  10 MB/s | 1.0 MB     00:00    
OSG 3.6 Empty Software for Enterprise Linux 8 -  27 kB/s | 2.4 kB     00:00    
dell-system-update_independent                  2.3 MB/s | 208 kB     00:00    
dell-system-update_dependent                    3.0 MB/s | 276 kB     00:00    
Extra Packages for Enterprise Linux 9 - x86_64   83 MB/s |  19 MB     00:00    
DCS packages for EL 9 - x86_64                   86 kB/s | 7.6 kB     00:00    
Puppet Labs Products EL 9 - x86_64              7.5 MB/s | 972 kB     00:00    
Rocky Linux 9                                   8.2 MB/s | 1.9 MB     00:00    
Rocky Linux 9 - AppStream                        26 MB/s | 7.1 MB     00:00    
'
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

The next run succeeds:

# ./check_yum -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: 'Last metadata expiration check: 0:01:59 ago on Fri 27 Oct 2023 10:23:00 AM CDT.
'
YUM OK: 0 Security Updates Available. 0 Non-Security Updates Available | security_updates_available=0 non_security_updates_available=0 total_updates_available=0