diff --git a/NEWS.md b/NEWS.md index 72b04ace..347808e1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,118 @@ +## Version 31 ("Counter-intuitive") +### Aug 28th, 2022 + +#### FIXES + +##### Libraries + + * lib/container_docker_memory: fix an issue reported by clang-analyzer. + * Make sure sysfs is mounted in the plugins that require it. + +#### ENHANCEMENTS / CHANGES + +##### Plugin check_filecount + + * New plugin `check_filecount` that returns the number of files found in one or more directories. + +##### Plugin check_memory + + * check_memory: support new units kiB/MiB/GiB. + Feature asked by [mdicss](https://github.com/mdicss). + See the discussion [#120](https://github.com/madrisan/nagios-plugins-linux/discussions/120). + +##### contrib/icinga2/CheckCommands.conf + + * Contribution from Lorenz [RincewindsHat](https://github.com/RincewindsHat): add icinga2 command configurations. + +##### Build + + * configure: ensure libprocps is v4.0.0 or better if the experimental option `--enable-libprocps` is passed to `configure`. + +##### Test framework + + * Add some unit tests for `lib/xstrton`. + * New unit tests `tslibfiles_{filecount,hiddenfile,size}`. + +##### Package creation + + * Add Linux Alpine 3.16 and remove version 3.13. + * Do not package experimental plugins in the rpm `nagios-plugins-linux-all`. + * Add Fedora 36 and drop Fedora 33 support. + * CentOS 8 died a premature death at the end of 2021. Add packages for CentOS Stream 8 and 9. + +##### GitHub workflows + + * Build the Nagios Plugins Linux on the LTS Ubuntu versions only. The version 21 seems dead. + * Add build tests for all the supported oses. + * Update the os versions used in tests. + * CentOS 8 died a premature death at the end of 2021. Remove it from the list of test oses. + * Add CodeQL analysis + +### GIT DIFF +``` +$ git diff --stat db94dc16 6edcf3aa + .github/workflows/build-checks.yml | 9 +- + .github/workflows/codeql-analysis.yml | 59 ++++++++++ + .gitignore | 3 + + AUTHORS | 6 ++ + DEVELOPERS.md | 14 ++- + README.md | 50 ++++----- + SECURITY.md | 24 +++++ + configure.ac | 15 ++- + contrib/README.md | 6 ++ + contrib/icinga2/CheckCommands.conf | 923 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + include/Makefile.am | 1 + + include/common.h | 2 + + include/cpudesc.h | 2 +- + include/files.h | 56 ++++++++++ + include/procparser.h | 2 +- + include/sysfsparser.h | 3 + + include/xstrton.h | 16 +-- + lib/Makefile.am | 1 + + lib/container_docker_memory.c | 8 +- + lib/container_podman_count.c | 2 +- + lib/cpudesc.c | 8 +- + lib/cpufreq.c | 2 +- + lib/cputopology.c | 5 +- + lib/files.c | 252 +++++++++++++++++++++++++++++++++++++++++++ + lib/interrupts.c | 2 +- + lib/meminfo.c | 2 +- + lib/messages.c | 2 +- + lib/processes.c | 2 +- + lib/sysfsparser.c | 30 ++++-- + lib/thresholds.c | 4 +- + lib/xmalloc.c | 2 +- + lib/xstrton.c | 148 ++++++++++++++++++++++++-- + nagios-plugins-linux-logo-128.png | Bin 0 -> 10505 bytes + packages/Makefile.am | 22 ++-- + packages/docker-shell-helpers | 2 +- + packages/multibuild.sh | 7 +- + packages/specs/APKBUILD.in | 2 +- + packages/specs/Makefile.am | 2 + + packages/specs/nagios-plugins-linux.spec.in | 10 +- + plugins/Makefile.am | 3 + + plugins/check_cpu.c | 9 +- + plugins/check_cpufreq.c | 7 +- + plugins/check_fc.c | 9 +- + plugins/check_filecount.c | 292 ++++++++++++++++++++++++++++++++++++++++++++++++++ + plugins/check_load.c | 8 +- + plugins/check_memory.c | 51 ++++++--- + plugins/check_network.c | 2 +- + plugins/check_swap.c | 2 +- + plugins/check_temperature.c | 6 +- + tests/Makefile.am | 34 ++++-- + tests/testutils.c | 2 +- + tests/tslibfiles_age.c | 85 +++++++++++++++ + tests/tslibfiles_filecount.c | 227 +++++++++++++++++++++++++++++++++++++++ + tests/tslibfiles_hiddenfile.c | 72 +++++++++++++ + tests/tslibfiles_size.c | 79 ++++++++++++++ + tests/tslibkernelver.c | 2 +- + tests/{tslib_uname.c => tslibuname.c} | 0 + tests/tslibxstrton_agetoint64.c | 92 ++++++++++++++++ + tests/tslibxstrton_sizetoint64.c | 91 ++++++++++++++++ + 59 files changed, 2638 insertions(+), 141 deletions(-) +``` + ## Version 30 ("Low Pressure") ### Jan 25th, 2022 diff --git a/README.md b/README.md index 51f07690..8cf14b79 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![Release Status](https://img.shields.io/badge/status-stable-brightgreen.svg) [![License](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://spdx.org/licenses/GPL-3.0-only.html) -[![Download Latest Release](https://img.shields.io/badge/download-latest--tarball-blue.svg)](https://github.com/madrisan/nagios-plugins-linux/releases/download/v30/nagios-plugins-linux-30.tar.xz) +[![Download Latest Release](https://img.shields.io/badge/download-latest--tarball-blue.svg)](https://github.com/madrisan/nagios-plugins-linux/releases/download/v31/nagios-plugins-linux-31.tar.xz) [![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/madrisan) [![Build Status](https://travis-ci.org/madrisan/nagios-plugins-linux.svg?branch=master)](https://travis-ci.org/madrisan/nagios-plugins-linux) @@ -106,14 +106,14 @@ This package is known to compile with: * gcc 4.1 (RHEL 5 / CentOS 5), * gcc 4.4 (RHEL6 / CentOS 6), * gcc 4.8 (RHEL7 / CentOS 7), -* gcc 3.x, 5.1, 5.3, 6.3, 7, 8, 9, 10, 11 (openmamba GNU/Linux, Debian 8+, Fedora 25+), -* clang 3.7, 3.8, 4.9, 5, 6, 7, 8, 10, 11, 12, 13 (openmamba GNU/Linux, Fedora 25+), +* gcc 3.x, 5.1, 5.3, 6.3, 7-12 (openmamba GNU/Linux, Debian 8+, Fedora 25+), +* clang 3.7, 3.8, 4.9, 5, 6, 7, 8, 10-14 (openmamba GNU/Linux, Fedora 25+), List of the Linux kernels that have been successfully tested: * 2.6.18, 2.6.32, * 3.10, 3.14, 3.18, * 4.2, 4.4, 4,9, 4.14, 4.15, 4.16, 4.19 -* 5.6, 5.7, 5.8, 5.12-5.16 +* 5.6, 5.7, 5.8, 5.12-5.18 The Nagios Plugins Linux are regularly tested on * Alpine Linux (musl libc), @@ -125,9 +125,9 @@ The `.apk`, `.rpm` and `.deb` packages for Alpine, CentOS/RHEL, Debian, and Fedo Command | Distribution -------------------- | ------------ -Alpine 3.13 | `make -C packages alpine-3.13` Alpine 3.14 | `make -C packages alpine-3.14` Alpine 3.15 | `make -C packages alpine-3.15` +Alpine 3.16 | `make -C packages alpine-3.16` CentOS Stream 8 | `make -C packages centos-stream-8` CentOS Stream 9 | `make -C packages centos-stream-9` Debian 9 (Stretch) | `make -C packages debian-stretch` diff --git a/VERSION b/VERSION index 64bb6b74..e85087af 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -30 +31 diff --git a/debian/changelog b/debian/changelog index 37c2d326..bb375f09 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,18 @@ +nagios-plugins-linux (31-1) stable; urgency=low + * Release 31 "Counter-intuitive": + - New plugin check_filecount + - Support new units kiB/MiB/GiB in check_memory + - Minor fixes + + -- Davide Madrisan Sun, 28 Aug 2022 22:44:00 +0200 + nagios-plugins-linux (30-1) stable; urgency=low * Release 30 "Low pressure": - Fixes in the plugin check_pressure - Fix a LGTM issue in lib/netinfo - Fix Debian multi-package creation - -- Davide Madrisan Tue, 25 Jan 202Z 18:57:05 +0200 + -- Davide Madrisan Tue, 25 Jan 2022 18:57:05 +0200 nagios-plugins-linux (29-1) stable; urgency=low * Release 29 "High Temperatures": diff --git a/packages/specs/nagios-plugins-linux.spec.in b/packages/specs/nagios-plugins-linux.spec.in index 1d6109e0..bbfefa4e 100644 --- a/packages/specs/nagios-plugins-linux.spec.in +++ b/packages/specs/nagios-plugins-linux.spec.in @@ -28,6 +28,8 @@ Requires: nagios-plugins-linux-clock Requires: nagios-plugins-linux-cpu Requires: nagios-plugins-linux-cpufreq Requires: nagios-plugins-linux-cswch +Requires: nagios-plugins-linux-fc +Requires: nagios-plugins-linux-filecount Requires: nagios-plugins-linux-ifmountfs Requires: nagios-plugins-linux-intr Requires: nagios-plugins-linux-iowait @@ -92,6 +94,13 @@ Group: Applications/System %description fc This Nagios plugin monitors the status of the fiber status ports. +%package filecount +Summary: Nagios plugins for Linux - check_filecount +Group: Applications/System + +%description filecount +This Nagios plugin checks the number of files found in one or more directories. + %package ifmountfs Summary: Nagios plugins for Linux - check_ifmountfs Group: Applications/System @@ -258,6 +267,10 @@ make DESTDIR=%{buildroot} install %defattr(-,root,root) %{_libdir}/nagios/plugins/check_fc +%files filecount +%defattr(-,root,root) +%{_libdir}/nagios/plugins/check_filecount + %files ifmountfs %defattr(-,root,root) %{_libdir}/nagios/plugins/check_ifmountfs @@ -330,6 +343,5 @@ make DESTDIR=%{buildroot} install %{_libdir}/nagios/plugins/check_users %changelog - -* @date@ Davide Madrisan @version@-@release@ -- Upstream version @version@ +-* @date@ Davide Madrisan @version@-@release@ +-- Upstream version @version@