ports/58776: Fixes for net/nagios-plugins
Rob Evers
rob at debank.tv
Fri Oct 31 16:20:19 UTC 2003
>Number: 58776
>Category: ports
>Synopsis: Fixes for net/nagios-plugins
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 31 08:20:15 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Rob Evers
>Release: FreeBSD 4.9-RC i386
>Organization:
>Environment:
System: FreeBSD haha.debank.tv 4.9-RC FreeBSD 4.9-RC #1: Fri Oct 3 12:53:39 CEST 2003 rob at haha.debank.tv:/usr/obj/usr/src/sys/HAHA i386
>Description:
This patch contains an new patch files/patch-check_dns.c, this fixes the command
used to poll externel DNS servers,
configure.in is patched also to fix the check_nagios command (ps -axweo and not ps -weo)
<code/input/activities to reproduce the problem (multiple lines)>
>How-To-Repeat:
>Fix:
diff -ruN nagios-plugins.orig/files/patch-check_dns.c nagios-plugins/files/patch-check_dns.c
--- nagios-plugins.orig/files/patch-check_dns.c Thu Jan 1 01:00:00 1970
+++ nagios-plugins/files/patch-check_dns.c Fri Oct 31 16:26:15 2003
@@ -0,0 +1,11 @@
+--- plugins/check_dns.c.orig Fri Oct 31 16:01:52 2003
++++ plugins/check_dns.c Fri Oct 31 16:02:21 2003
+@@ -88,7 +88,7 @@
+ }
+
+ /* get the command to run */
+- asprintf (&command_line, "%s %s %s", NSLOOKUP_COMMAND, query_address, dns_server);
++ asprintf (&command_line, "%s %s %s", NSLOOKUP_COMMAND, query_address, "-",dns_server);
+
+ alarm (timeout_interval);
+ time (&start_time);
diff -ruN nagios-plugins.orig/files/patch-configure.in nagios-plugins/files/patch-configure.in
--- nagios-plugins.orig/files/patch-configure.in Sun Aug 3 10:16:59 2003
+++ nagios-plugins/files/patch-configure.in Fri Oct 31 17:01:12 2003
@@ -1,5 +1,5 @@
--- configure.in.orig Fri Jul 11 08:12:23 2003
-+++ configure.in Sun Jul 13 13:13:37 2003
++++ configure.in Fri Oct 31 16:57:06 2003
@@ -12,7 +12,7 @@
AM_INIT_AUTOMAKE(nagios-plugins,${PACKAGE_VERSION})
AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
@@ -79,6 +79,41 @@
LIBS="$_SAVEDLIBS"
dnl Check for OpenSSL location
+@@ -418,7 +429,7 @@
+ fi
+
+ AC_PATH_PROG(PATH_TO_PS,ps)
+-dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo
++dnl For OpenBSD 3.2 & 3.3. Must come before ps -axweo
+ dnl STAT UCOMM VSZ RSS USER PPID COMMAND
+ if ps -axwo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i ["^ *STAT +UCOMM +VSZ +RSS +USER +UID +PPID +COMMAND"] > /dev/null
+ then
+@@ -434,19 +445,19 @@
+ AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss])
+ echo " ps syntax... $PATH_TO_PS -axwo 'stat uid ppid comm args'"
+ dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
+-elif ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
++elif ps -axweo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null
+ then
+ AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
+ AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output])
+- AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -weo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint])
++ AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS -axweo 'stat user ppid args'",[Verbatim command to execute for ps in check_netsaint])
+ EXTRAS="$EXTRAS check_nagios"
+- AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -weo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs])
++ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -axweo 'stat uid ppid comm args'",[Verbatim command to execute for ps in check_procs])
+ AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
+- AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -weo 'vsz comm'",[Verbatim command to execute for ps in check_vsz])
++ AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -axweo 'vsz comm'",[Verbatim command to execute for ps in check_vsz])
+ AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[Format string for scanning ps output in check_vsz])
+- AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -weo 'rss comm'",[Verbatim command to execute for ps in check_rss])
++ AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -axweo 'rss comm'",[Verbatim command to execute for ps in check_rss])
+ AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss])
+- echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'"
++ echo " ps syntax... $PATH_TO_PS -axweo 'stat comm vsz rss user ppid args'"
+ dnl FreeBSD
+ elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null
+ then
@@ -841,6 +852,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO",[path and arguments for invoking 'who'])
fi
--- happ ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list