Major changes between "nagios-plugins-linux" versions 25 and 26 -= Lockdown release =- -- Fixes: * Fix build with musl by including limits.h when PATH_MAX is used. Bug reported and patched by Louis Sautier. See also: https://bugs.gentoo.org/717038 * The build fails when '-fno-common' is added to CFLAGS. (.bss+0x8): multiple definition of `program_name' (.bss+0x0): multiple definition of `program_name_short' This flag will be apparently enabled by default in gcc 10. Bug reported by Louis Sautier. * Fixed travis CI build by Louis Sautier. -- Enhancements / Changes * New plugin check_podman for checking some runtime metric of podman containers. * Package creation: * Add Fedora 32 and CentOS 8 to the supported distributions. -- git diff --stat f5c0edc 6c41cc9 .travis.yml | 2 +- AUTHORS | 2 + README.md | 30 ++++++++--- configure.ac | 30 ++++++++++- debian/copyright | 2 +- include/Makefile.am | 8 +-- include/collection.h | 2 +- include/{container.h => container_docker.h} | 8 +-- include/container_podman.h | 117 ++++++++++++++++++++++++++++++++++++++++ include/{json.h => jsmn.h} | 0 include/json_helpers.h | 35 ++++++++++++ include/progname.h | 4 +- include/testutils.h | 10 +++- include/xalloc.h | 2 + include/{xstrtol.h => xstrton.h} | 9 ++-- lib/Makefile.am | 15 ++++-- lib/collection.c | 25 ++++++--- lib/{container_count.c => container_docker_count.c} | 34 +++--------- lib/{container_memory.c => container_docker_memory.c} | 2 +- lib/container_podman.c | 373 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/container_podman_count.c | 114 +++++++++++++++++++++++++++++++++++++++ lib/container_podman_stats.c | 179 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/json_helpers.c | 66 +++++++++++++++++++++++ lib/processes.c | 1 + lib/xmalloc.c | 17 ++++-- lib/{xstrtol.c => xstrton.c} | 20 ++++++- packages/Makefile.am | 8 +-- packages/multibuild.sh | 16 +++++- packages/specs/nagios-plugins-linux.spec.in | 6 +++ plugins/Makefile.am | 13 ++++- plugins/check_clock.c | 2 +- plugins/check_cpu.c | 2 +- plugins/check_cswch.c | 2 +- plugins/check_docker.c | 4 +- plugins/check_fc.c | 3 +- plugins/check_intr.c | 2 +- plugins/check_podman.c | 261 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/Makefile.am | 16 +++--- tests/{ts_container.data => ts_container_docker.data} | 0 tests/ts_container_podman_GetContainerStats.data | 1 + tests/ts_container_podman_ListContainers.data | 1 + tests/{tslibcontainer_count.c => tslibcontainer_docker_count.c} | 6 +-- tests/{tslibcontainer_memory.c => tslibcontainer_docker_memory.c} | 8 +-- 43 files changed, 1362 insertions(+), 96 deletions(-) ====================================================================== Major changes between "nagios-plugins-linux" versions 24 and 25 -= Gentoo release =- -- Fixes: * Fix two security issues reported by lgtm analyzer, an issue reported by the clang static analyser v8, and some issues reported by Codacy. * sysfsparser lib: fix debug messages in "sysfsparser_thermal_get_temperature()". * check_memory: * Minor code cleanup. * Fix typo. * Add perfdata to mem_available and mem_used: Add min, max, warning and critical in perfdata for "mem_available" and "mem_used" as asked by sbraz. * Build system: * Fix compilation when libcurl headers are not installed. -- Enhancements / Changes * Udate the external jsmn library. * Move some functions to the new library 'perfdata'. * Build system: * Fix warning message about obsolete AC_PROG_RANLIB * Add a build option to disable libcurl: --disable-libcurl * Package creation: * Make rpm packages for Fedora 30 and Debian 10 (Buster) packages. * Drop support for Fedora 24-27 and Debian 6 (Squeeze). * Test framework: * new unit test for lib/perfdata.c -- git diff --stat 440eefa c4a58b5 AUTHORS | 6 ++ README.md | 16 ++-- configure.ac | 17 +++-- debian/changelog | 32 ++++++++ include/Makefile.am | 1 + include/json.h | 490 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- include/perfdata.h | 37 +++++++++ include/string-macros.h | 1 + include/thresholds.h | 9 ++- lib/Makefile.am | 2 +- lib/container_count.c | 7 +- lib/container_memory.c | 8 +- lib/cputopology.c | 3 +- lib/json.c | 417 ------------------------------------------------------------------------------------------------------ lib/perfdata.c | 85 +++++++++++++++++++++ lib/sysfsparser.c | 41 +++++----- lib/thresholds.c | 26 +++++-- packages/Makefile.am | 25 ++++--- packages/docker-shell-helpers/docker-shell-helpers.sh | 6 +- packages/multibuild.sh | 30 +++----- packages/specs/nagios-plugins-linux.spec.in | 14 +++- plugins/check_clock.c | 10 +-- plugins/check_cpu.c | 3 + plugins/check_memory.c | 55 ++++++++++++-- plugins/check_swap.c | 3 + plugins/check_uptime.c | 8 +- plugins/check_users.c | 3 +- tests/Makefile.am | 9 ++- tests/tslibcontainer_count.c | 2 +- tests/tslibkernelver.c | 7 +- tests/tslibperfdata.c | 111 +++++++++++++++++++++++++++ 31 files changed, 925 insertions(+), 559 deletions(-) ====================================================================== Major changes between "nagios-plugins-linux" versions 23 and 24 -= New Year 2019 release =- -- Fixes: * check_cpufreq: the frequences returned by sysfs are in KHz. This issue has been reported by "sbraz". Thanks! -- Enhancements * check_uptime: add warn, crit, and min values to perfdata Based on a merge request opened by "magmax" (https://github.com/magmax). Thanks! * check_cpufreq: make it possible to output the values in Hz/kHz/mHz/gHz by adding some new command-line switches: -H | --Hz -K | --kHz -M | --mHz -G | --gHz * Build system: * Check for the compiler flag `-Wstringop-truncation' availability. * Remove the autotools-generated file `libtool'. * Fix unsupported warning options for clang (7.0.0): `-Wformat-signedness' `-Wstringop-truncation' * Support Fedora 29 packaging (rpm packages generation). -- git diff --stat 0a3b90b 0b7e7ea .github/ISSUE_TEMPLATE/bug_report.md | 26 + .gitignore | 1 + README.md | 8 +- configure.ac | 3 +- libtool | 11645 -------------------------------- m4/cc_try_cflags.m4 | 4 +- packages/Makefile.am | 7 +- plugins/check_cpufreq.c | 35 +- plugins/check_uptime.c | 9 +- 9 files changed, 73 insertions(+), 11665 deletions(-) ====================================================================== Major changes between "nagios-plugins-linux" versions 22 and 23 -= Korbielow.pl 2018 release =- -- Enhancements * New plugin 'check_docker': This new plugin can be used for: * checking the total number of running docker containers or the containers of a given type * checking the memory usage (alpha!) * Build system: * Build the sources with the available compiler's hardening flags. The following compiler flags are tested/added when available: * -D_FORTIFY_SOURCE=2 (Buffer overflow checks) * -fstack-protector-strong or -fstack-protector-all * -fpie -fPIE (Position Independent Executable support) * -Wstack-protector * -Wl,-z,relro (RELRO (read-only relocation)) * -Wl,-z,now The option `--disable-hardening' disable the attempt to harden the resulting executables. * End the ./configure output with a summary of the build options. * Add the option --enable-werror to ./configure, to make all warnings as errors. This option is disabled by default. * Package creation: * Add Fedora 27 and Fedora 28 to the supported distributions. * Test framework: * Some new unit tests have been added. * lib/container * lib/url_encode * tests/testutils -- Fixes: * Fix some issues reported by Codacy, Coverity, and LGTM. -- Experimental * Add the command line option `--enable-libprocps' that will link the binaries with the library libprocps newlib instead of using the internal libraries. ====================================================================== Major changes between "nagios-plugins-linux" versions 21 and 22 -- "Commit 600" release -- Fixes * vminfo lib: add the following items to the /proc/vmstat parser: - vm_pgalloc_dma32 - vm_pgrefill_dma32 - vm_pgscan_direct_dma32 - vm_pgscan_kswapd_dma32 - vm_pgsteal_dma32 - vm_pgsteal_direct_dma - vm_pgsteal_direct_dma32 The DMA32 memory zone is only available on 64-bit linux (low ~4GBytes of memory). This patch can slightly modify the value of the memory counters reported by check_memory. -- Enhancements * Fix several warnings reported by Codacy and Codeclimate. ====================================================================== Major changes between "nagios-plugins-linux" versions 20 and 21 -- Enhancements * check_paging: the command-line option `--swapping-only' has been added for displaying only the swap reads and writes. The help message has been updated and improved by added some lines that explain which kernel variable(s) are selected when a user specify the warning and/or critical thresholds. * The Docker-based framework for packaging the Nagios Plugins for Linux (test-build) supports two new extra distributions: Debian 9 (Stretch) Fedora 26 * The test framework (make check) has been reworked and enriched in new modules: tests/tsclock_thresholds tests/tscswch tests/tsintr tests/tslibmeminfo_conversions tests/tslibmeminfo_interface tests/tslibmeminfo_procparser tests/tslibmessages tests/tslibvminfo tests/tsload_normalize tests/tsload_thresholds tests/tspaging tests/tstemperature tests/tsuptime The result of each text execution is now diplayed with colors. * The code of several plugins has been polished and modularized to allow testing. * The glibc function `secure_getenv()' (or `__secure_getenv()' on Ubuntu, and maybe other distributions) is now used, instead of `getenv()', in the test code to improve security. ====================================================================== Major changes between "nagios-plugins-linux" versions 19 and 20 -- Security fixes * Some insecure data handling issues discovered by Coverity in the new test framework have been fixed. -- Enhancements * The Clang Static Analyser can now be executed by running the command make -C tests check-clang-checker in the project root directory. All the warnings spotted by this code analyser have been fixed. * A new Docker-based framework for packaging the Nagios Plugins for Linux (rpm and deb packages) is now available. The supported Linux distributions follow: CentOS 5/6/7 Debian 6 (Squeeze), 7 (Wheezy), 8 (Jessie) Fedora 24/25/rawhide RHEL 5/6/7 * Nagios Plugins for Linux has been Debianized. * The messages displayed in case of a too large "count" or "delay" error have been improved. ====================================================================== Major changes between "nagios-plugins-linux" versions 18 and 19 -- Fixes * check_multipath: recent versions of multipath no longer open a multipathd socket file in the file system, but instead use an abstract namespace socket: @/org/kernel/linux/storage/multipathd. Thanks to Chris Procter "chr15p" for reporting the issue and creating a pull request. * check_load: fixed the performance data output -- Security fixes check_cpu: fixed coverity 152987 "Untrusted loop bound" check_cswch: fixed coverity 152985 "Untrusted loop bound" check_fc: fixed coverity 152984 "Untrusted value as argument" check_intr: fixed coverity 152986 "Untrusted loop bound" -- Enhancements * check_multipath: fixed the long-standing gcc compiler warning: "dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing]". This was a false problem, but the code has been modified to quiet the warning. * check_multipath: use a larger buffer for queries to make this plugin working with systems that have lots of mapped disks. * test-suite: a framework for testing the code (make check) has been added and some tests are now available. -- Compatibility issues * check_multipath: by default the abstract namespace socket "@/org/kernel/linux/storage/multipathd" is now selected at build time. If you need to monitor old distributions (RHEL5 and RHEL6 for instance) you need to configure this package as followed: ./configure --with-socketfile=/var/run/multipathd.sock ====================================================================== Major changes between "nagios-plugins-linux" versions 17 and 18 -- Fixes * check_clock, check_cpufreq, check_cswch, check_intr, check_multipath, check_nbprocs, check_network, check_tcpcount, check_users: fix the return code of the warning and critical case. Thanks Paul Dunkler for pointing out this issue. * check_cpu: fix the detection of the CPU 64-bit op-mode. * check_cpu: fix a memory resource leak reported by the Coverity Scan tool. * meminfo lib (check_memory): use SReclaimable in cached. The cached memory is something you can get back and reclaim if under memory pressure. Make cached only use the reclaimable component and ignore the unreclaimable values which doesn't make sense in this context. ====================================================================== Major changes between "nagios-plugins-linux" versions 16 and 17 -- "400th (git) commit" release -- Enhancements * check_fc: new plugin for checking the status of the fiber channel ports. -- Fixes * Fix a resource leak in the library 'thresholds'. * Minor fix in the library 'interrupt'. ====================================================================== Major changes between "nagios-plugins-linux" versions 15 and 16 -- "25 aprile" release -- Enhancements * check_cpufreq: new plugin. * meminfo lib: reduce the memory footprint by not allocating the variable exported by /proc/memory and not used by any plugin. * check_cpu: new option '--per-cpu' for checking the CPU utilization for each CPU. A warning message is returned if at least one CPU exceeds the warning threshold and no CPU exceed the critical state. A critical message is returned if at least one CPU exceeds the critical threshold. The option '--cpufreq' has been removed because this information is now provided by the new plugin 'check_cpufreq'. -- Fixes * check_multipath: fix the regular expression that catches the failed paths and that prevented the plugin from working correctly. * Improved code quality based on the Coverity scan analysis. * Build system: minor fixes to make the Travis-CI Continuous Integration work - gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) environment. Update some obsolete macros used by configure.ac. Portability has been improved. ====================================================================== Major changes between "nagios-plugins-linux" versions 14 and 15 -- Enhancements * check_memory / meminfo lib: the command line option '-C|--caches' now does nothing but is still accepted for compatibility. The memory usage calculation has been reviewed and is now more accurate. The changes are based on the (long) discussions and patches that have been recently posted in the procps mailing list. * check_memory / meminfo lib: a fall-back has been implemented in order to provide the memory available counter for the linux kernels 2.6.27 and above, * check_cpu: add one decimal digit to the counters 'cpu_user', 'cpu_system', 'cpu_idle', 'cpu_iowait', and 'cpu_steal'. * check_cpu: new command line option '-m|--no-cpu-model' for removing the cpu model description from the output message. ====================================================================== Major changes between "nagios-plugins-linux" versions 13 and 14 -= Korbielow 2014 release =- -- Enhancements * check_users: new '--verbose' mode, for debugging. * check_uptime: new option '-m|--clock-monotonic' for retrieving the time of the linux monotonic clock instead of using the system statistics returned by 'sysinfo()'. * New library 'xstrtol' containing the function 'strtol_or_err' that was previosly duplicated in several plugins. -- Fixes * check_clock: option '--refclock': validate the input instead of returning crap when the date format is unsupported. * check_readonlys: do not dereference a null pointer string in the output message when no readonly filesystems are detected. * Minor fixes. ====================================================================== Major changes between "nagios-plugins-linux" versions 12 and 13 -- Enhancements * The build system, the plugins and libraries are been reworked in order to support some older Linux kernels and (gcc) compilers. The "nagios-plugins-linux" can now be compiled and run on older linux systems, like RHEL 5 (gcc 4.1.2, kernel 2.6.18). * check_memory: new option '-a|--available' for selecting the kernel counter 'MemAvailable' instead of the default one (memory used). This feature requires a Linux kernel 3.14 or better. For older kernels the plugin falls back to the free memory counter. -- Fixes * check_tcpcount: do not exit with 'error opening /proc/net/tcp6' when the command line option '--tcp6' has not been specified. * cpustats library: do not exit with an error message if 'softirq' cannot be found in /proc/stat'. This entry is not provided by old kernels. ===================================================================== Major changes between "nagios-plugins-linux" versions 11 and 12 * New plugin 'check_intr'. * meminfo library: get 'MemAvailable' value from /proc/meminfo (kernel 3.14+) for a future usage. * check_cswch: fix the unit displayed in the output message when 'count' is 1. ====================================================================== Major changes between "nagios-plugins-linux" versions 10 and 11 * New plugin 'check_cswch'. * check_cpu: better output of '--cpuinfo' when a hot pluggable cpu is offline. ====================================================================== Major changes between "nagios-plugins-linux" versions 9 and 10 * check_temperature: modify the syntax of the switch command * check_temperature: add the sensor type to the output message. * check_temperature. the code has been reworked and most of the code moved to the sysfsparser library. ====================================================================== Major changes between "nagios-plugins-linux" versions 8 and 9 * New plugin 'check_temperature'. * check_cpu: add the CPU frequencies to the plugin perfdata. * check_cpu: new summary mode (command line switch: '--cpuinfo'). ====================================================================== Major changes between "nagios-plugins-linux" versions 7 and 8 * New plugin 'check_network'. ====================================================================== Major changes between "nagios-plugins-linux" versions 6 and 7 * New plugin 'check_clock'. * Conditionally enable ('--degub') the debug messages at build time. * Minor fixes. ====================================================================== Major changes between "nagios-plugins-linux" versions 5 and 6 * New plugin 'check_nbprocs'. * The verbose mode is not avaiblable in the plugin 'check_tcpcount'. * Minor fixes. ====================================================================== Major changes between "nagios-plugins-linux" versions 4 and 5 * New plugins 'check_paging' and 'check_tcpcount'. * The plugun 'check_load' now always display the three loads (1, 5, and 15 minuts load) in the perfdata. * Plugins 'check_memory', 'check_swap': new argument '--vmstats'. * Plugin 'check_memory': properly handle memory used by tmpfs. * Reports the paging activity per second instead of the value since last boot in 'check_memory', and 'check_swap'. * The internal libraries have been completely reworked. * Build system: rework the build system and enable the silent mode. * Several fixes. ====================================================================== Major changes between "nagios-plugins-linux" versions 3 and 4 * New plugins 'check_users' and 'check_multipath'. * Code cleanups. ====================================================================== Major changes between "nagios-plugins-linux" versions 2 and 3 * New plugin 'check_cpu'. * The plugin 'check_io_latency' has been renamed to 'check_iowait'. ====================================================================== Major changes between "nagios-plugins-linux" versions 1 and 2 * New plugins 'check_load' and 'check_io_latency'. * A C99 compliant compiler is now required for building the source code. * The internal library has been reworked and some new functions have been added. * Minor fixes and code cleanups. ====================================================================== Nagios Plugins Linux version 1 * Available plugins: - check_ifmountfs, check_readonlyfs; - chck_memory, check_swap; - check_uptime. * An internal static library containing the common code has been created.