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.14k stars 506 forks source link

check_yum - exclude empty lines fix. #379

Closed pbalu-code closed 2 years ago

pbalu-code commented 2 years ago

When number of updates is not matching with number of lines.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

HariSekhon commented 2 years ago

Thanks for the PR!

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

HariSekhon commented 2 years ago

So it turns out this PR change, by missing the end anchor, actually ignores all the unrecognized lines, that's why it suppresses the output format checks.

If you run this PR version you may miss security updates, defeating the point of the plugin.

The correct regex to ignore blank or only space lines was already there further above from years earlier.

The issue you were having was due to new additional output lines around repositories in newer versions of RHEL / DNF.

I've pushed the correct updates to account for those.

I've reverted and superceded this change with that and some other updates, please try version 12.3 onwards now.