Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2012-07-30 10:52:56 UTC (rev 6)
+++ trunk/Makefile 2012-07-30 11:07:05 UTC (rev 7)
@@ -557,8 +557,13 @@
cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_check_http_connect_method.patch
#cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_lmstat_path.patch
#cd ${NAGIOSPLUG} && aclocal -I gl/m4 -I m4 && autoconf -f
- cd ${NAGIOSPLUG} && rm perlmods/*.tar.gz && cp ../patches/nagios-plugins-perlmods/*.tar.gz perlmods
- cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_withbuildplsupport.patch
+ # Have disabled below for the moment. Will be re-instated for single opsview-base work on ubuntu12
+ #cd ${NAGIOSPLUG} && rm perlmods/*.tar.gz && cp ../patches/nagios-plugins-perlmods/*.tar.gz perlmods
+ #cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_withbuildplsupport.patch
+ # Below added due to not being able to compile on Ubuntu12. This has an impact of using pm only for all agents on all platforms,
+ # but this is okay
+ cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagios_plugins_params_validate_noxs.patch
+ cd ${NAGIOSPLUG} && patch -p1 < ../patches/nagiosplug_check_snmp_override_perfstat_units.patch
if [ `uname -s` = Linux ] ; then \
cd ${NAGIOSPLUG} && PATH="/usr/bin:/usr/sbin:$$PATH" CFLAGS="${CFLAGS}" ./configure --with-mysql --with-nagios-user=$(NAGIOS_USER) --with-nagios-group=$(NAGIOS_GROUP) ${NAGIOSPLUG_CONFIGURE_PERL_MODULES} --localstatedir=/usr/local/nagios/var/plugins && make ; \
elif [ `uname -s` = Darwin ] ; then \
Modified: trunk/installer/opsview_base_postinstall
===================================================================
--- trunk/installer/opsview_base_postinstall 2012-07-30 10:52:56 UTC (rev 6)
+++ trunk/installer/opsview_base_postinstall 2012-07-30 11:07:05 UTC (rev 7)
@@ -70,11 +70,11 @@
}
}
+# We don't care if this fails - changing where possible is sufficient
logmsg("Making sure the web server can write where it needs to");
system(
-'chgrp -R nagcmd /usr/local/nagios/nagvis/var /usr/local/nagios/nagvis/etc/maps'
- ) == 0
- or die 'Did not change group permission';
+'chgrp -R nagcmd /usr/local/nagios/nagvis/var /usr/local/nagios/nagvis/etc/maps > /dev/null 2>&1'
+ );
# == == == == == == == == == ==
sub logmsg {
Added: trunk/patches/nagios_plugins_params_validate_noxs.patch
===================================================================
--- trunk/patches/nagios_plugins_params_validate_noxs.patch (rev 0)
+++ trunk/patches/nagios_plugins_params_validate_noxs.patch 2012-07-30 11:07:05 UTC (rev 7)
@@ -0,0 +1,20 @@
+diff -ur nagios-plugins-1.4.15/tools/build_perl_modules nagios-plugins-1.4.15.noxs/tools/build_perl_modules
+--- nagios-plugins-1.4.15/tools/build_perl_modules 2010-07-27 20:47:16.000000000 +0000
++++ nagios-plugins-1.4.15.noxs/tools/build_perl_modules 2012-07-26 12:02:56.294714659 +0000
+@@ -65,7 +65,15 @@
+ unless (-e $dir) {
+ system("gunzip -c $tarball | tar -xf -") == 0 or die "Cannot extract $tarball";
+ chdir $dir or die "Can't chdir into $dir";
+- system("perl Makefile.PL PREFIX=$destdir INSTALLDIRS=site LIB=$destdir/lib") == 0 or die "Can't run perl Makefile.PL";
++
++ my $extra_args = "";
++
++ # Hackity hack! Params::Validate has problems compiling xs on Ubuntu12. We disable XS compiling
++ if ($dir =~ /Params-Validate/) {
++ $extra_args = "--pm";
++ }
++
++ system("perl Makefile.PL PREFIX=$destdir INSTALLDIRS=site LIB=$destdir/lib $extra_args") == 0 or die "Can't run perl Makefile.PL";
+ system("make") == 0 or die "Can't run make";
+ chdir $topdir or die "Can't chdir to top";;
+ }
Added: trunk/patches/nagiosplug_check_snmp_override_perfstat_units.patch
===================================================================
--- trunk/patches/nagiosplug_check_snmp_override_perfstat_units.patch (rev 0)
+++ trunk/patches/nagiosplug_check_snmp_override_perfstat_units.patch 2012-07-30 11:07:05 UTC (rev 7)
@@ -0,0 +1,113 @@
+diff -ur nagios-plugins-1.4.15.orig/plugins/check_snmp.c nagios-plugins-1.4.15/plugins/check_snmp.c
+--- nagios-plugins-1.4.15.orig/plugins/check_snmp.c 2012-07-18 10:17:59.000000000 +0000
++++ nagios-plugins-1.4.15/plugins/check_snmp.c 2012-07-26 12:00:10.000000000 +0000
+@@ -113,16 +113,20 @@
+ char **oids = NULL;
+ char *label;
+ char *units;
++char *unittypes;
+ char *port;
+ char *snmpcmd;
+ char string_value[MAX_INPUT_BUFFER] = "";
+ int invert_search=0;
+ char **labels = NULL;
+ char **unitv = NULL;
++char **unittypesv = NULL;
+ size_t nlabels = 0;
+ size_t labels_size = 8;
+ size_t nunits = 0;
+ size_t unitv_size = 8;
++size_t nunittypes = 0;
++size_t unittypesv_size = 8;
+ int numoids = 0;
+ int numauthpriv = 0;
+ int verbose = 0;
+@@ -181,11 +185,13 @@
+
+ labels = malloc (labels_size);
+ unitv = malloc (unitv_size);
++ unittypesv = malloc (unittypesv_size);
+ for (i = 0; i < MAX_OIDS; i++)
+ eval_method[i] = CHECK_UNDEF;
+
+ label = strdup ("SNMP");
+ units = strdup ("");
++ unittypes = strdup ("");
+ port = strdup (DEFAULT_PORT);
+ outbuff = strdup ("");
+ delimiter = strdup (" = ");
+@@ -396,6 +402,12 @@
+ else
+ show = response;
+
++ if(!calculate_rate) {
++ if (nunittypes > (size_t)0 && (size_t)i < nunittypes && unittypesv[i] != NULL)
++ //asprintf (&outbuff, "%s %s", outbuff, unitsv[i]);
++ strcpy(type, unittypesv[i]);
++ }
++
+ iresult = STATE_DEPENDENT;
+
+ /* Process this block for numeric comparisons */
+@@ -569,6 +581,7 @@
+ {"eregi", required_argument, 0, 'R'},
+ {"label", required_argument, 0, 'l'},
+ {"units", required_argument, 0, 'u'},
++ {"unit_type", required_argument, 0, 'T'},
+ {"port", required_argument, 0, 'p'},
+ {"retries", required_argument, 0, 'e'},
+ {"miblist", required_argument, 0, 'm'},
+@@ -600,7 +613,7 @@
+ }
+
+ while (1) {
+- c = getopt_long (argc, argv, "nhvVt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:",
++ c = getopt_long (argc, argv, "nhvVt:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:L:U:a:x:A:X:T:",
+ longopts, &option);
+
+ if (c == -1 || c == EOF)
+@@ -786,6 +799,35 @@
+ unitv[nunits - 1] = ptr;
+ }
+ break;
++ case 'T': /* units */
++ unittypes = optarg;
++ nunittypes++;
++ if (nunittypes >= unittypesv_size) {
++ unittypesv_size += 8;
++ unittypesv = realloc (unittypesv, unittypesv_size);
++ if (unittypesv == NULL)
++ die (STATE_UNKNOWN, _("Could not reallocate unit types [%d]\n"), (int)nunittypes);
++ }
++ unittypesv[nunittypes - 1] = optarg;
++ ptr = thisarg (optarg);
++ unittypesv[nunittypes - 1] = ptr;
++ if (strstr (ptr, "'") == ptr)
++ unittypesv[nunittypes - 1] = ptr + 1;
++ while (ptr && (ptr = nextarg (ptr))) {
++ if (nunittypes >= unittypesv_size) {
++ unittypesv_size += 8;
++ unittypesv = realloc (unittypesv, unittypesv_size);
++ if (unittypes == NULL)
++ die (STATE_UNKNOWN, _("Could not realloc() unit types\n"));
++ }
++ nunittypes++;
++ ptr = thisarg (ptr);
++ if (strstr (ptr, "'") == ptr)
++ unittypesv[nunittypes - 1] = ptr + 1;
++ else
++ unittypesv[nunittypes - 1] = ptr;
++ }
++ break;
+ case L_CALCULATE_RATE:
+ if(calculate_rate==0)
+ np_enable_state(NULL, 1);
+@@ -1056,6 +1098,8 @@
+ printf (" %s\n", _("Prefix label for output from plugin"));
+ printf (" %s\n", "-u, --units=STRING");
+ printf (" %s\n", _("Units label(s) for output data (e.g., 'sec.')."));
++ printf (" %s\n", "-T, --unit_type=STRING");
++ printf (" %s\n", _("Override calculated performance data unit type(s) for output data"));
+ printf (" %s\n", "-D, --output-delimiter=STRING");
+ printf (" %s\n", _("Separates output on multiple OID requests"));
+
Modified: trunk/patches/nrpe_ssl_compile_directory_ubuntu12.patch
===================================================================
--- trunk/patches/nrpe_ssl_compile_directory_ubuntu12.patch 2012-07-30 10:52:56 UTC (rev 6)
+++ trunk/patches/nrpe_ssl_compile_directory_ubuntu12.patch 2012-07-30 11:07:05 UTC (rev 7)
@@ -6,7 +6,7 @@
AC_MSG_CHECKING(for SSL libraries)
found_ssl=no
- for dir in $ssl_lib_dir $ssl_dir /usr/lib64 /usr/lib /usr/local/lib /usr/lib/ssl /usr/ssl/lib /usr/openssl/lib /usr/pkg/lib /usr/freeware/lib/openssl $ssldir/lib; do
-+ for dir in $ssl_lib_dir $ssl_dir /usr/lib64 /usr/lib /usr/local/lib /usr/lib/ssl /usr/ssl/lib /usr/openssl/lib /usr/pkg/lib /usr/freeware/lib/openssl $ssldir/lib /usr/lib/i386-linux-gnu; do
++ for dir in $ssl_lib_dir $ssl_dir /usr/lib64 /usr/lib /usr/local/lib /usr/lib/ssl /usr/ssl/lib /usr/openssl/lib /usr/pkg/lib /usr/freeware/lib/openssl $ssldir/lib /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu; do
ssllibdir="$dir"
if test -f "$dir/libssl.so"; then
found_ssl=yes