Bug 218148 - net-mgmt/monitoring-plugins check_ping needs to be configured with timeout flag for best experience.
Summary: net-mgmt/monitoring-plugins check_ping needs to be configured with timeout fl...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mathieu Arnold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-26 20:06 UTC by Josef Karthauser
Modified: 2017-03-26 22:25 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Karthauser 2017-03-26 20:06:56 UTC
Check_ping needs to pass the -t flag to ping otherwise icinga/nagios doesn't get the correct feed back in a packet loss situation.

It's easy to do, just make this change to the Makefile:

diff --git a/Makefile.orig b/Makefile
index 58284a2..bf2d104 100644
--- a/Makefile.orig
+++ b/Makefile
@@ -67,8 +67,8 @@ CONFIGURE_ARGS+=--with-cgiurl=${NAGIOSCGIURL} \
 CONFIGURE_ARGS+=ac_cv_path_PATH_TO_QMAIL_QSTAT=/var/qmail/bin/qmail-qstat \
                ac_cv_path_PATH_TO_PING=/sbin/ping \
                ac_cv_path_PATH_TO_PING6=/sbin/ping6 \
-               --with-ping-command="/sbin/ping -n -c %d %s" \
-               --with-ping6-command="/sbin/ping6 -n -c %d %s" \
+               --with-ping-command="/sbin/ping -n -t %d -c %d %s" \
+               --with-ping6-command="/sbin/ping6 -n -t %d -c %d %s" \
                ac_cv_path_PATH_TO_SMBCLIENT=${LOCALBASE}/bin/smbclient
 
I've also submitted this as a bug to the monitoring-plugins github, as it would be good for them to auto configure properly. (https://github.com/monitoring-plugins/monitoring-plugins/issues/1473)
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2017-03-26 22:19:05 UTC
ping and ping6 don't have the same arguments, ping6 uses -X for the timeout.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-03-26 22:25:15 UTC
A commit references this bug:

Author: mat
Date: Sun Mar 26 22:24:35 UTC 2017
New revision: 437010
URL: https://svnweb.freebsd.org/changeset/ports/437010

Log:
  Add timeout to check_ping{,6} commands.  It helps nagios/icinga when
  packet loss occur.

  PR:		218148
  Reported by:	Josef Karthauser
  Sponsored by:	Absolight

Changes:
  head/net-mgmt/monitoring-plugins/Makefile
  head/net-mgmt/nagios-plugins/Makefile