I'm running Nagios in a jail and ran into the issue described in this thread from December -- http://www.mail-archive.com/freebsd-jail@freebsd.org/msg00638.html The gist of it is that the Nagios plugin configure script goes through an exhaustive list of ping command options looking for one that works. The problem is they're testing each style by pinging the localhost, 127.0.0.1. In a jailed environment, that IP address may or may not be visible: root@jail-nagios> ping -n -c 1 127.0.0.1 PING 127.0.0.1 (127.0.0.1): 56 data bytes ping: sendto: Can't assign requested address This causes their configure script to not be able to find the ping command. This failure causes PING_COMMAND to be defined as "" (which is a case their code doesn't check for) and smashes the stack whenever you try to run the binary. With the attached patch applied, the check_ping binary works as expected when built from within a jail (rather than emitting "not enough args" and segfaulting): root@jail-nagios> ./check_ping 10.0.0.5 -w 3000.0,80% -c 5000.0,100% PING OK - Packet loss = 0%, RTA = 0.03 ms|rta=0.028000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0 Fix: Patch attached with submission follows:
Maintainer of net-mgmt/nagios-plugins, Please note that PR ports/133069 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/133069 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Thanks for the friendly reminder. I have a cleaner patch that's a little more user friendly and still allows the configure script to detect things by itself. I'll send it to you offline tomorrow morning and if you're happy with it then I can have that committed. Jarrod.
State Changed From-To: feedback->suspended Maintainer is working on a different patch.
Responsible Changed From-To: freebsd-ports-bugs->wxs I'll take it.
Jarrod, Any word yet on your patch for this? -- WXS
Submitter (sorry, not sure of your first name), can you please try the following patch and advise if this resolves your issue? With the JAIL option enabled, you can then override the IP used by the configure script by defining a NAGIOSPOLLIP in /etc/make.conf. http://www.netleader.com.au/~jarrod/FreeBSD/net-mgmt-nagios-plugins-WITH_JAIL.diff Jarrod.
On Wed, Apr 8, 2009 at 8:06 AM, Jarrod Sayers <jarrod@netleader.com.au> wro= te: > Submitter (sorry, not sure of your first name), can you please try the > following patch and advise if this resolves your issue? =C2=A0With the JA= IL > option enabled, you can then override the IP used by the configure script= by > defining a NAGIOSPOLLIP in /etc/make.conf. > > http://www.netleader.com.au/~jarrod/FreeBSD/net-mgmt-nagios-plugins-WITH_= JAIL.diff > > Jarrod. > Patch works fine for me. I kind of wish the OPTIONS infrastructure could be used instead of make.conf, but that's neither here nor there. Thanks a bunch :3
On Wed, Apr 08, 2009 at 09:15:43AM -0400, L Campbell wrote: > On Wed, Apr 8, 2009 at 8:06 AM, Jarrod Sayers <jarrod@netleader.com.au> wrote: > > Submitter (sorry, not sure of your first name), can you please try the > > following patch and advise if this resolves your issue? ??With the JAIL > > option enabled, you can then override the IP used by the configure script by > > defining a NAGIOSPOLLIP in /etc/make.conf. > > > > http://www.netleader.com.au/~jarrod/FreeBSD/net-mgmt-nagios-plugins-WITH_JAIL.diff > > > > Jarrod. > > > > Patch works fine for me. I kind of wish the OPTIONS infrastructure > could be used instead of make.conf, but that's neither here nor there. > > Thanks a bunch :3 Thanks for testing this! Jarrod: I assume this is the patch you would like me to commit? If possible I'd like to get it in before the freeze, which is supposed to be less than a week from now. -- WXS
On Wed, 8 Apr 2009, Wesley Shields wrote: > Jarrod: I assume this is the patch you would like me to commit? If > possible I'd like to get it in before the freeze, which is supposed to > be less than a week from now. Go for it. Jarrod.
wxs 2009-04-08 23:53:22 UTC FreeBSD ports repository Modified files: net-mgmt/nagios-plugins Makefile Log: - Add option for building in a jail (default OFF). With this option set the IP address that is used for polling is replaced with whatever is defined in ${NAGIOSPOLLIP} (default is 127.0.0.1). If you want to change this please set it in ports.conf. PR: ports/133069 Submitted by: L Campbell <llc2w@virginia.edu> Approved by: Jarrod Sayers <jarrod@netleader.com.au> (maintainer) Revision Changes Path 1.73 +7 -1 ports/net-mgmt/nagios-plugins/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: suspended->closed Committed. Thanks!