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.py not working on CentOS9 #400

Open e36Alex opened 1 year ago

e36Alex commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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