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

Cannot find summary line in yum output #382

Closed jonathanjdavis closed 2 years ago

jonathanjdavis commented 2 years ago

Every second day, check_yum would report the following warning:

Info:    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

When:    2022-04-05 21:51:34 -0400

Then the next check (~5min later) would be fine:

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

When:    2022-04-05 21:56:23 -0400

This would occur every second day, e.g.

OK 2022-04-09 22:00:28 -0400 WARNING 2022-04-09 21:55:37 -0400 OK 2022-04-07 21:56:33 -0400 WARNING 2022-04-07 21:51:44 -0400 OK 2022-04-05 21:56:23 -0400 WARNING 2022-04-05 21:51:34 -0400 OK 2022-04-03 21:56:11 -0400 WARNING 2022-04-03 21:51:22 -0400 OK 2022-04-01 21:56:01 -0400 WARNING 2022-04-01 21:51:13 -0400

etc.

I dropped a "\n".join(output) at line 434 in an attempt to see why hitting that end, and the next warning received:

NetworkRADIUS-8                                 6.3 kB/s | 3.0 kB     00:00    

NetworkRADIUS is a repository we have added to our server:

[networkradius]
name=NetworkRADIUS-$releasever
baseurl=http://packages.networkradius.com/freeradius-3.0/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://packages.networkradius.com/pgp/packages%40networkradius.com

Not 100% certain, but it would appear NetworkRADIUS is updating every second day, and that's causing trouble for check_yum.

I can write a regex to capture this pattern, and create a more useful yum warning output, or have check_yum wait for a few seconds and retry before returning output?

HariSekhon commented 2 years ago

I've literally just pushed a fix for these extra repo outputs.

Can you please git pull and try version 0.12.3 and let me know if this solves it for you?

jonathanjdavis commented 2 years ago

That's some extreme proactiveness. Will pull 0.12.3 and will see if the issue persists tomorrow night. Thanks!

HariSekhon commented 2 years ago

Several people reported this before you in other tickets and it was just lucky timing for you :)

HariSekhon commented 2 years ago

Let me know if this solves it for you so we can close this issue, thanks.

jonathanjdavis commented 2 years ago

An issue caused a delay at our end -- update in place now and hope to verify resolution by the end of the weekend.

jonathanjdavis commented 2 years ago

This issue can be closed, update worked, it has been many days now and we've no longer gotten warnings about not being able to find the summary output. Thank you.

HariSekhon commented 2 years ago

Thanks for confirming.