matteocorti / nagios_plugins

18 stars 7 forks source link

update to #129 #115

Closed matteocorti closed 8 years ago

matteocorti commented 8 years ago

Original reporter: anonymous

Hi Corti,

Thanks for the quick responses.

I was not able to disable embedded perl. I'm using nagios 2.12 on CentOS5 from the EPEL repo. Apparently nagios 2.12 does not have a configuration flag to disable embedded perl. and I'm not really looking forward to compile my own version.

what I did do was edit the capture-plugins mentioned earlier, to disable logging:

#!/usr/bin/perl -w

use strict;

my ($cmd, $ret_code, $output);
# First display all arguments
my ($numArgs, $argnum);
$numArgs = $#ARGV + 1;

# create the command-line
$cmd = $ARGV[0];
foreach $argnum (1 .. $#ARGV) {
  $cmd = $cmd . " '" . $ARGV[$argnum] . "'"
}

# now execute the command
$output = `$cmd 2>&1`;
$ret_code = $?>>8;

# now return the original result to Nagios
print $output;
exit "$ret_code";

and then start check_updates through this.

I now works, although it's not an elegant solution :)

I'm now in a "works for me" stage. As I will be migration this machine somewhere in the near future to CentOS6 which sports nagios 3.4.3 from EPEL, I will leave it as is.

Again thanks for the pointers, and I hope other people can use this ticket if they encounter the same issue.

Jacco

PS still no option to add a comment to a ticket :(

matteocorti commented 8 years ago

Original reporter: matteo@corti.li

Embedded Perl disabled by the plugin itself.