From 6592fb4a032002e0b81b3e493b2ac458d3158d2e Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Fri, 25 Apr 2008 07:55:46 +0000 Subject: [PATCH] * CENTPLUGINS_TMP * NAGIOS_PLUGIN -> NAGIOS_PLUGINS git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@4868 6bcd3966-0018-0410-8128-fd23d134de7e --- centreon-plugins/install.sh | 12 ++++++------ centreon-plugins/src/centreon.conf | 2 +- centreon-plugins/src/centreon.pm | 4 ++-- .../src/check_centreon_MS_multiple_services | 2 +- centreon-plugins/src/check_centreon_nt | 4 ++-- centreon-plugins/src/check_centreon_ping | 2 +- centreon-plugins/src/check_centreon_snmp_TcpConn | 2 +- centreon-plugins/src/check_centreon_snmp_cpu | 2 +- centreon-plugins/src/check_centreon_snmp_loadaverage | 2 +- .../src/check_centreon_snmp_multiple_process | 2 +- .../src/check_centreon_snmp_packetErrors | 4 ++-- centreon-plugins/src/check_centreon_snmp_process | 2 +- .../src/check_centreon_snmp_process_detailed | 2 +- .../src/check_centreon_snmp_remote_storage | 2 +- centreon-plugins/src/check_centreon_snmp_traffic | 10 +++++----- centreon-plugins/src/check_centreon_snmp_uptime | 2 +- centreon-plugins/src/check_centreon_snmp_value | 2 +- centreon-plugins/src/check_meta_service | 2 +- centreon-plugins/src/check_nt_centreon | 4 ++-- centreon-plugins/src/check_snmp_cpfw.pl | 2 +- centreon-plugins/src/check_snmp_process.pl | 4 ++-- centreon-plugins/src/check_snmp_win.pl | 2 +- 22 files changed, 36 insertions(+), 36 deletions(-) diff --git a/centreon-plugins/install.sh b/centreon-plugins/install.sh index f309e8a17..7ff5e2863 100644 --- a/centreon-plugins/install.sh +++ b/centreon-plugins/install.sh @@ -127,13 +127,13 @@ fi echo "" fi - if [ -z $NAGIOS_PLUGIN ];then + if [ -z $NAGIOS_PLUGINS ];then #nagios plugins directory for oreon - NAGIOS_PLUGIN="$INSTALL_DIR_NAGIOS/libexec" + NAGIOS_PLUGINS="$INSTALL_DIR_NAGIOS/libexec" echo "Where are your nagios plugin / libexec directory ?" - echo -n "default to [$NAGIOS_PLUGIN]:" + echo -n "default to [$NAGIOS_PLUGINS]:" read temp - test_answer NAGIOS_PLUGIN $temp + test_answer NAGIOS_PLUGINS $temp echo "" fi @@ -210,10 +210,10 @@ echo "" echo "Other Stuff" echo "------------" -if test -d $NAGIOS_PLUGIN ; then +if test -d $NAGIOS_PLUGINS ; then echo_success "Nagios libexec directory" "OK" else - mkdir -p $NAGIOS_PLUGIN > /dev/null + mkdir -p $NAGIOS_PLUGINS > /dev/null echo_success "Nagios libexec directory created" "OK" fi diff --git a/centreon-plugins/src/centreon.conf b/centreon-plugins/src/centreon.conf index d6525fe18..6d42fdcef 100644 --- a/centreon-plugins/src/centreon.conf +++ b/centreon-plugins/src/centreon.conf @@ -3,7 +3,7 @@ DIR_OREON=@INSTALL_DIR_OREON@/ DIR_TRAFFICMAP=@INSTALL_DIR_OREON@/include/trafficMap/average/ DIR_NAGIOS=@INSTALL_DIR_NAGIOS@/ DIR_RRDTOOL=@INSTALL_DIR_OREON@/rrd/ -NAGIOS_PLUGIN=@NAGIOS_PLUGIN@/ +NAGIOS_PLUGINS=@NAGIOS_PLUGINS@/ NAGIOS_ETC=@NAGIOS_ETC@/ [NT] diff --git a/centreon-plugins/src/centreon.pm b/centreon-plugins/src/centreon.pm index 80c8dd937..b2ba57b17 100644 --- a/centreon-plugins/src/centreon.pm +++ b/centreon-plugins/src/centreon.pm @@ -27,7 +27,7 @@ package centreon; use Exporter (); use FindBin qw($Bin); use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); use utils qw($TIMEOUT %ERRORS &print_revision &support); @@ -62,7 +62,7 @@ my @ds = ("a","b","c","d","e","f","g","h","i","j","k","l"); # Get all parameters from the ini file ############################################################################### sub get_parameters { - $params_file = "@NAGIOS_PLUGIN@/$params_file"; + $params_file = "@NAGIOS_PLUGINS@/$params_file"; unless (-e $params_file) { print "Unknown - In centreon.pm :: $params_file :: $!\n"; exit $ERRORS{'UNKNOWN'}; diff --git a/centreon-plugins/src/check_centreon_MS_multiple_services b/centreon-plugins/src/check_centreon_MS_multiple_services index 773eed77e..511c70dc6 100644 --- a/centreon-plugins/src/check_centreon_MS_multiple_services +++ b/centreon-plugins/src/check_centreon_MS_multiple_services @@ -28,7 +28,7 @@ use strict; use Net::SNMP qw(:snmp oid_lex_sort); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { use centreon qw(get_parameters); diff --git a/centreon-plugins/src/check_centreon_nt b/centreon-plugins/src/check_centreon_nt index 8917b4cf6..1bc6e3cad 100644 --- a/centreon-plugins/src/check_centreon_nt +++ b/centreon-plugins/src/check_centreon_nt @@ -27,7 +27,7 @@ use strict; use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); use vars qw($PROGNAME); @@ -38,7 +38,7 @@ use vars qw($opt_H $opt_p $opt_s $opt_v $opt_V $opt_h $opt_w $opt_c $opt_t $opt_ # Plugin var init # -my $pathtolibexecnt = "@NAGIOS_PLUGIN@/check_nt"; +my $pathtolibexecnt = "@NAGIOS_PLUGINS@/check_nt"; my($op_v, $op_d, $op_s, $op_t, $op_l, $port, @values, @test, @test2, @test3, @test4, @test5, $warning, $critical, @w, @c, $uptime); my($warning2, $critical2, $warning3, $critical3, $warning4, $critical4, @output); diff --git a/centreon-plugins/src/check_centreon_ping b/centreon-plugins/src/check_centreon_ping index 5fd4a4fae..89a569364 100644 --- a/centreon-plugins/src/check_centreon_ping +++ b/centreon-plugins/src/check_centreon_ping @@ -27,7 +27,7 @@ use strict; use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { diff --git a/centreon-plugins/src/check_centreon_snmp_TcpConn b/centreon-plugins/src/check_centreon_snmp_TcpConn index ae3f9cf25..c183678b5 100644 --- a/centreon-plugins/src/check_centreon_snmp_TcpConn +++ b/centreon-plugins/src/check_centreon_snmp_TcpConn @@ -26,7 +26,7 @@ use strict; use Net::SNMP qw(:snmp); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { use centreon qw(get_parameters); diff --git a/centreon-plugins/src/check_centreon_snmp_cpu b/centreon-plugins/src/check_centreon_snmp_cpu index 6510605bf..a575fbdae 100644 --- a/centreon-plugins/src/check_centreon_snmp_cpu +++ b/centreon-plugins/src/check_centreon_snmp_cpu @@ -27,7 +27,7 @@ use strict; use Net::SNMP qw(:snmp); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { diff --git a/centreon-plugins/src/check_centreon_snmp_loadaverage b/centreon-plugins/src/check_centreon_snmp_loadaverage index 7a3de620a..6765a533e 100644 --- a/centreon-plugins/src/check_centreon_snmp_loadaverage +++ b/centreon-plugins/src/check_centreon_snmp_loadaverage @@ -28,7 +28,7 @@ use strict; use Net::SNMP qw(:snmp); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { diff --git a/centreon-plugins/src/check_centreon_snmp_multiple_process b/centreon-plugins/src/check_centreon_snmp_multiple_process index 5279e2e68..c5431d51c 100644 --- a/centreon-plugins/src/check_centreon_snmp_multiple_process +++ b/centreon-plugins/src/check_centreon_snmp_multiple_process @@ -28,7 +28,7 @@ use strict; use Net::SNMP qw(:snmp oid_lex_sort); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { use centreon qw(get_parameters); diff --git a/centreon-plugins/src/check_centreon_snmp_packetErrors b/centreon-plugins/src/check_centreon_snmp_packetErrors index 9efcc500b..86b4369a6 100644 --- a/centreon-plugins/src/check_centreon_snmp_packetErrors +++ b/centreon-plugins/src/check_centreon_snmp_packetErrors @@ -28,7 +28,7 @@ use strict; use Net::SNMP qw(:snmp oid_lex_sort); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { @@ -55,7 +55,7 @@ use vars qw($opt_V $opt_h $opt_v $opt_C $opt_H $opt_w $opt_c); $PROGNAME = "$0"; my ($row, @flg_created, @last_check_time, @last_in_errors, @last_out_errors, $result_in, $result_out, @nb_out_errors, @nb_in_errors, $update_time, $db_file); -my $pathtolibexecnt = $centreon{NAGIOS_PLUGIN}; +my $pathtolibexecnt = $centreon{NAGIOS_PLUGINS}; sub print_help (); sub print_usage (); diff --git a/centreon-plugins/src/check_centreon_snmp_process b/centreon-plugins/src/check_centreon_snmp_process index 6121acb60..bc130b21f 100644 --- a/centreon-plugins/src/check_centreon_snmp_process +++ b/centreon-plugins/src/check_centreon_snmp_process @@ -28,7 +28,7 @@ use strict; use Net::SNMP qw(:snmp oid_lex_sort); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { use centreon qw(get_parameters); diff --git a/centreon-plugins/src/check_centreon_snmp_process_detailed b/centreon-plugins/src/check_centreon_snmp_process_detailed index f0b6d1ebf..421157ffe 100644 --- a/centreon-plugins/src/check_centreon_snmp_process_detailed +++ b/centreon-plugins/src/check_centreon_snmp_process_detailed @@ -32,7 +32,7 @@ use Getopt::Long; # Nagios specific -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw(%ERRORS $TIMEOUT); # centreon specific diff --git a/centreon-plugins/src/check_centreon_snmp_remote_storage b/centreon-plugins/src/check_centreon_snmp_remote_storage index 4a7f1c606..df3c75e25 100644 --- a/centreon-plugins/src/check_centreon_snmp_remote_storage +++ b/centreon-plugins/src/check_centreon_snmp_remote_storage @@ -28,7 +28,7 @@ use strict; use Net::SNMP qw(:snmp); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { diff --git a/centreon-plugins/src/check_centreon_snmp_traffic b/centreon-plugins/src/check_centreon_snmp_traffic index 9ba9a243b..5b0558711 100644 --- a/centreon-plugins/src/check_centreon_snmp_traffic +++ b/centreon-plugins/src/check_centreon_snmp_traffic @@ -29,7 +29,7 @@ use Net::SNMP qw(:snmp oid_lex_sort); use FindBin; use lib "$FindBin::Bin"; use lib "/usr/local/nagios/libexec"; -#use lib "@NAGIOS_PLUGIN@"; +#use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { use centreon qw(get_parameters); @@ -325,8 +325,8 @@ $last_out_bits = 0; my $flg_created = 0; -if (-e "@CENTREON_TMP@/traffic_if".$interface."_".$opt_H) { - open(FILE,"<"."@CENTREON_TMP@/traffic_if".$interface."_".$opt_H); +if (-e "@CENTPLUGINS_TMP@/traffic_if".$interface."_".$opt_H) { + open(FILE,"<"."@CENTPLUGINS_TMP@/traffic_if".$interface."_".$opt_H); while($row = ){ @last_values = split(":",$row); $last_check_time = $last_values[0]; @@ -341,8 +341,8 @@ if (-e "@CENTREON_TMP@/traffic_if".$interface."_".$opt_H) { $update_time = time(); -unless (open(FILE,">"."@CENTREON_TMP@/traffic_if".$interface."_".$opt_H)){ - print "Check mod for temporary file : @CENTREON_TMP@/traffic_if".$interface."_".$opt_H. " !\n"; +unless (open(FILE,">"."@CENTPLUGINS_TMP@/traffic_if".$interface."_".$opt_H)){ + print "Check mod for temporary file : @CENTPLUGINS_TMP@/traffic_if".$interface."_".$opt_H. " !\n"; exit $ERRORS{"UNKNOWN"}; } print FILE "$update_time:$in_bits:$out_bits"; diff --git a/centreon-plugins/src/check_centreon_snmp_uptime b/centreon-plugins/src/check_centreon_snmp_uptime index a0d090cef..6bfcb36cd 100644 --- a/centreon-plugins/src/check_centreon_snmp_uptime +++ b/centreon-plugins/src/check_centreon_snmp_uptime @@ -27,7 +27,7 @@ use strict; use Net::SNMP qw(:snmp); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { diff --git a/centreon-plugins/src/check_centreon_snmp_value b/centreon-plugins/src/check_centreon_snmp_value index dc90bc6d3..fe57ba70e 100644 --- a/centreon-plugins/src/check_centreon_snmp_value +++ b/centreon-plugins/src/check_centreon_snmp_value @@ -28,7 +28,7 @@ use strict; use Net::SNMP qw(:snmp); use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); use vars qw($PROGNAME); diff --git a/centreon-plugins/src/check_meta_service b/centreon-plugins/src/check_meta_service index e2479dcf9..3c2812e4b 100644 --- a/centreon-plugins/src/check_meta_service +++ b/centreon-plugins/src/check_meta_service @@ -29,7 +29,7 @@ use DBI; use vars qw($PROGNAME); use Getopt::Long; use vars qw($opt_V $opt_H $opt_h $opt_i); -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); ## For Debug mode = 1 diff --git a/centreon-plugins/src/check_nt_centreon b/centreon-plugins/src/check_nt_centreon index 8dd578c32..34316e27e 100644 --- a/centreon-plugins/src/check_nt_centreon +++ b/centreon-plugins/src/check_nt_centreon @@ -27,7 +27,7 @@ use strict; use FindBin; use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { @@ -45,7 +45,7 @@ use vars qw($opt_H $opt_p $opt_s $opt_v $opt_V $opt_h $opt_w $opt_c $opt_S $opt_ ## Plugin var init -my $pathtolibexecnt = $centreon{GLOBAL}{NAGIOS_PLUGIN}."check_nt"; +my $pathtolibexecnt = $centreon{GLOBAL}{NAGIOS_PLUGINS}."check_nt"; my($op_v, $op_d, $op_s, $op_t, $op_l, $port, @values, @test, @test2, @test3, @test4, @test5, $warning, $critical, @w, @c, $uptime); my($warning2, $critical2, $warning3, $critical3, $warning4, $critical4, @output); $PROGNAME = $0; diff --git a/centreon-plugins/src/check_snmp_cpfw.pl b/centreon-plugins/src/check_snmp_cpfw.pl index 2540876e1..da52a9323 100644 --- a/centreon-plugins/src/check_snmp_cpfw.pl +++ b/centreon-plugins/src/check_snmp_cpfw.pl @@ -18,7 +18,7 @@ use Getopt::Long; # Nagios specific -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw(%ERRORS $TIMEOUT); #my $TIMEOUT = 15; #my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); diff --git a/centreon-plugins/src/check_snmp_process.pl b/centreon-plugins/src/check_snmp_process.pl index 695966eb4..2754fe942 100644 --- a/centreon-plugins/src/check_snmp_process.pl +++ b/centreon-plugins/src/check_snmp_process.pl @@ -21,14 +21,14 @@ use Getopt::Long; # Nagios specific -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw(%ERRORS $TIMEOUT); #my $TIMEOUT = 5; #my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); # centreon specific -#use lib "@NAGIOS_PLUGIN@"; +#use lib "@NAGIOS_PLUGINS@"; if (eval "require centreon" ) { use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); use vars qw($VERSION %centreon); diff --git a/centreon-plugins/src/check_snmp_win.pl b/centreon-plugins/src/check_snmp_win.pl index 4488ed70e..a3b9c7c6f 100644 --- a/centreon-plugins/src/check_snmp_win.pl +++ b/centreon-plugins/src/check_snmp_win.pl @@ -16,7 +16,7 @@ use Getopt::Long; # Nagios specific -use lib "@NAGIOS_PLUGIN@"; +use lib "@NAGIOS_PLUGINS@"; use utils qw(%ERRORS $TIMEOUT); #my $TIMEOUT = 5; #my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);