From 4472a87bb43fe80367d2ce38248914ccb7250d06 Mon Sep 17 00:00:00 2001 From: Meisam Farzalipour Tabriz <5204-tbz@users.noreply.gitlab.mpcdf.mpg.de> Date: Wed, 26 Feb 2025 17:10:34 +0100 Subject: [PATCH] bump version to 0.5 improve documentation --- README.md | 4 +++- check_dnf_automatic.spec | 10 +++++++--- script/check_dnf_automatic | 5 ++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f62e60a..f94fb0e 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 99d4c3e..78d8b48 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 20697c0..1d08a0c 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 -- GitLab