Created attachment 182299 [details] patch for files/patch-configure With nagios-plugins-2.2.1,1 check_swap returns always CRITICAL: /usr/local/libexec/nagios/check_swap -w 20 -c 10 SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 The cause is a wrong SWAP_FORMAT from configure: ac_cv_swap_format="%*s %f %*d %f" These have to be doubles now: ac_cv_swap_format="%*s %lf %*d %lf" (Upstream-commit https://github.com/nagios-plugins/nagios-plugins/commit/39c5e4ed595cfbda7cff566575fc5a53252f09b5 ) After the patch: /usr/local/libexec/nagios/check_swap -w 20 -c 10 SWAP OK - 82% free (3346 MB out of 4096 MB) |swap=3346MB;0;0;0;4096
Thanks.
A commit references this bug: Author: mat Date: Thu May 4 14:16:31 UTC 2017 New revision: 440109 URL: https://svnweb.freebsd.org/changeset/ports/440109 Log: Fix check_swap. PR: 219068 Submitted by: Markus Wennrich Sponsored by: Absolight Changes: head/net-mgmt/nagios-plugins/Makefile head/net-mgmt/nagios-plugins/files/patch-configure
Bug was again re-introduced with nagios-plugins-2.2.1_2,1 Revision: 448907 --- head/net-mgmt/nagios-plugins/files/patch-configure Tue Aug 29 11:26:40 2017 (r448906) +++ head/net-mgmt/nagios-plugins/files/patch-configure Tue Aug 29 11:46:03 2017 (r448907) (...) -- ac_cv_swap_format="%*s %f %*d %f" -+ ac_cv_swap_format="%*s %lf %*d %lf" (...)
A commit references this bug: Author: mat Date: Tue Aug 29 16:06:05 UTC 2017 New revision: 448927 URL: https://svnweb.freebsd.org/changeset/ports/448927 Log: Fix the check_swap again. PR: 219068 Sponsored by: Absolight Changes: head/net-mgmt/nagios-plugins/Makefile head/net-mgmt/nagios-plugins/files/patch-configure
Note that /usr/local/libexec/nagios/check_swap -w 20 -c 10 Means, warning if there is 20 bytes of swap free and critical if there is 10 bytes of swap free, which is a bit strange.
(In reply to Mathieu Arnold from comment #5) Ah, true. It needs additional %-symbols: /usr/local/libexec/nagios/check_swap -w 78% -c 10% SWAP WARNING - 76% free (3092 MB out of 4096 MB) |swap=3092MB;3194;409;0;4096 Thanks for the hint, I will udpate my icinga-configuration. And thanks for the quick fix.