set good macros for installer
git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@4873 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
4bbc90c39a
commit
d85a2e3cde
|
@ -28,7 +28,7 @@ use strict;
|
|||
use Net::SNMP qw(:snmp);
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin";
|
||||
use lib "/srv/nagios/libexec/";
|
||||
use lib "@NAGIOS_PLUGINS@";
|
||||
use utils qw($TIMEOUT %ERRORS &print_revision &support);
|
||||
|
||||
if (eval "require oreon" ) {
|
||||
|
|
|
@ -152,8 +152,8 @@ foreach my $err (oid_lex_sort(keys %$result_out)) {
|
|||
# ##
|
||||
|
||||
for (my $i = 0; $i < scalar(@nb_in_errors); $i++) {
|
||||
if (-e "@CENTREON_TMP@/packet_errors_if".$i."_".$opt_H.".tmp") {
|
||||
open(FILE,"<"."@CENTREON_TMP@/packet_errors_if".$i."_".$opt_H.".tmp");
|
||||
if (-e "@CENTPLUGINS_TMP@/packet_errors_if".$i."_".$opt_H.".tmp") {
|
||||
open(FILE,"<"."@CENTPLUGINS_TMP@/packet_errors_if".$i."_".$opt_H.".tmp");
|
||||
while($row = <FILE>){
|
||||
my @last_values = split(":",$row);
|
||||
$last_check_time[$i] = $last_values[0];
|
||||
|
@ -167,8 +167,8 @@ for (my $i = 0; $i < scalar(@nb_in_errors); $i++) {
|
|||
}
|
||||
|
||||
$update_time = time;
|
||||
unless (open(FILE,">"."@CENTREON_TMP@/packet_errors_if".$i."_".$opt_H.".tmp")){
|
||||
print "Unknown - @CENTREON_TMP@/packet_errors_if".$i."_".$opt_H.".tmp!\n";
|
||||
unless (open(FILE,">"."@CENTPLUGINS_TMP@/packet_errors_if".$i."_".$opt_H.".tmp")){
|
||||
print "Unknown - @CENTPLUGINS_TMP@/packet_errors_if".$i."_".$opt_H.".tmp!\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
print FILE "$update_time:$nb_in_errors[$i]:$nb_out_errors[$i]";
|
||||
|
|
|
@ -28,8 +28,7 @@ use strict;
|
|||
use Net::SNMP qw(:snmp oid_lex_sort);
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin";
|
||||
use lib "/usr/local/nagios/libexec";
|
||||
#use lib "@NAGIOS_PLUGINS@";
|
||||
use lib "@NAGIOS_PLUGINS@";
|
||||
use utils qw($TIMEOUT %ERRORS &print_revision &support);
|
||||
if (eval "require centreon" ) {
|
||||
use centreon qw(get_parameters);
|
||||
|
|
Loading…
Reference in New Issue