diff --git a/README.md b/README.md index f62e60a52954459f30ace989572da806874be8d9..f94fb0e2f631d2d7c23494d7478327b64256f11d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # check_dnf_automatic -An Icinga plugin for monitoring the number of pending dnf-automatic security updates to be installed. Compatibility with Nagios has not been tested. +An Icinga/Nagios plugin for monitoring the number of pending dnf-automatic security updates to be installed. Compatibility with Nagios has not been tested. ## Requirements @@ -50,6 +50,8 @@ An Icinga plugin for monitoring the number of pending dnf-automatic security upd ## Building RPM +The RPM has been successfully built and tested on AlmaLinux 9. Upon installation, the RPM automatically installs the necessary dependencies and copies the script to the `/usr/lib64/nagios/plugins/` directory. + ### Development Version Build the RPM package based on the current git commit. The resulting RPM will be at `rpmbuild/RPMS/noarch/`. diff --git a/check_dnf_automatic.spec b/check_dnf_automatic.spec index 99d4c3e702e04e0af585e115c9a22b4f4a682ead..78d8b48c2dbaf5f2a06125ad71f7032cf0ce2cf8 100644 --- a/check_dnf_automatic.spec +++ b/check_dnf_automatic.spec @@ -1,7 +1,7 @@ Name: check_dnf_automatic -Version: 0.4 +Version: 0.5 Release: 1%{?dist} -Summary: Icinga plugin for monitoring the number of pending dnf-automatic security updates +Summary: Icinga/Nagios plugin for monitoring the number of pending dnf-automatic security updates License: GPLv3+ URL: https://gitlab.mpcdf.mpg.de/tier2/monitoring-plugins/%{name} @@ -15,7 +15,7 @@ Requires: sed BuildArch: noarch %description -An Icinga plugin for monitoring the number of pending dnf-automatic security updates to be installed. +An Icinga/Nagios plugin for monitoring the number of pending dnf-automatic security updates to be installed. %prep %setup -q @@ -33,6 +33,10 @@ install -m 0755 script/%{name} %{buildroot}/usr/lib64/nagios/plugins/%{name} /usr/lib64/nagios/plugins/%{name} %changelog +* Wed Feb 26 2025 Meisam Farzalipour Tabriz <5204-tbz@users.noreply.gitlab.mpcdf.mpg.de> - 0.5-1 +- Bump version to 0.5 +- Use make for building RPM +- Improve documentaion and CI workflow * Tue Feb 25 2025 Meisam Farzalipour Tabriz <5204-tbz@users.noreply.gitlab.mpcdf.mpg.de> - 0.4-1 - Bump version to 0.4 - Improve packaging and CI workflow diff --git a/script/check_dnf_automatic b/script/check_dnf_automatic index 20697c02e069e9032d5512ebed181df1a26a485a..1d08a0c1428f61922b1d18ee80e2050ba502e82b 100755 --- a/script/check_dnf_automatic +++ b/script/check_dnf_automatic @@ -14,12 +14,11 @@ # ======================================================================================================================================= -_version="0.4" +_version="0.5" _requirements=('dnf-automatic' 'tail' 'sed') - declare -A _exit_code _exit_code[OK]="0" _exit_code[WARNING]="1" @@ -117,6 +116,6 @@ elif [ -n "$_no_updates" ]; then echo "DNF OK: No update available! | available_updates=0;;;; security_updates=0;;;;" exit "${_exit_code[OK]}" else - echo "DNF UNKNOWN: unexpected response from dnf-automatic! $_dnf_automatic_output" + echo "DNF UNKNOWN: unexpected response from dnf-automatic: $_dnf_automatic_output" exit "${_exit_code[UNKNOWN]}" fi