From 24b95a66ca95c46168e62770d50b216026bfe5c8 Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Tue, 6 Nov 2007 19:27:31 +0000 Subject: [PATCH] replace oreon.pm by centreon.pm use git-svn-id: http://svn.centreon.com/trunk/plugins@3431 6bcd3966-0018-0410-8128-fd23d134de7e --- centreon-plugins/src/centreon.pm | 6 ++--- .../src/check_centreon_MS_multiple_services | 2 +- centreon-plugins/src/check_centreon_nt | 4 +-- ...on_TcpConn => check_centreon_snmp_TcpConn} | 0 centreon-plugins/src/check_centreon_snmp_cpu | 10 ++++---- .../src/check_centreon_snmp_loadaverage | 6 ++--- .../src/check_centreon_snmp_multiple_process | 8 +++--- ...rrors => check_centreon_snmp_packetErrors} | 2 +- .../src/check_centreon_snmp_process | 6 ++--- .../src/check_centreon_snmp_process_detailed | 2 +- .../src/check_centreon_snmp_remote_storage | 8 +++--- .../src/check_centreon_snmp_traffic | 24 +++++++++--------- .../src/check_centreon_snmp_uptime | 6 ++--- centreon-plugins/src/check_meta_service | 2 +- centreon-plugins/src/check_nt_centreon | 2 +- centreon-plugins/src/check_snmp_cpfw.pl | 20 +++++++-------- centreon-plugins/src/check_snmp_load.pl | 25 ++++++++----------- centreon-plugins/src/check_snmp_mem.pl | 12 ++++----- centreon-plugins/src/check_snmp_process.pl | 14 +++++------ .../src/check_snmp_processus_loaded.pl | 12 ++++----- .../src/check_snmp_script_result.pl | 24 +++++++++--------- centreon-plugins/src/check_snmp_storage.pl | 20 +++++++-------- 22 files changed, 105 insertions(+), 110 deletions(-) rename centreon-plugins/src/{check_centreon_TcpConn => check_centreon_snmp_TcpConn} (100%) rename centreon-plugins/src/{check_centreon_packetErrors => check_centreon_snmp_packetErrors} (96%) diff --git a/centreon-plugins/src/centreon.pm b/centreon-plugins/src/centreon.pm index 0e5f772b4..d2f2d0e3a 100644 --- a/centreon-plugins/src/centreon.pm +++ b/centreon-plugins/src/centreon.pm @@ -64,7 +64,7 @@ my @ds = ("a","b","c","d","e","f","g","h","i","j","k","l"); sub get_parameters { $params_file = "@NAGIOS_PLUGINS@/$params_file"; unless (-e $params_file) { - print "Unknown - In oreon.pm :: $params_file :: $!\n"; + print "Unknown - In centreon.pm :: $params_file :: $!\n"; exit $ERRORS{'UNKNOWN'}; } my %centreon; @@ -182,7 +182,7 @@ centreon - shared module for Oreon plugins =head1 SYNOPSIS - use oreon; + use centreon; centreon::get_parameters() centreon::create_rrd( ) centreon::update_rrd( ) @@ -191,7 +191,7 @@ centreon - shared module for Oreon plugins =head2 Functions -B create a rrd database. +B create a rrd database. create_rrd($rrd, $nb_ds ,$start, $step, $min, $max, $type ); diff --git a/centreon-plugins/src/check_centreon_MS_multiple_services b/centreon-plugins/src/check_centreon_MS_multiple_services index b7d7c0b37..511c70dc6 100644 --- a/centreon-plugins/src/check_centreon_MS_multiple_services +++ b/centreon-plugins/src/check_centreon_MS_multiple_services @@ -31,7 +31,7 @@ use lib "$FindBin::Bin"; use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); if (eval "require centreon" ) { - use oreon qw(get_parameters); + use centreon qw(get_parameters); use vars qw($VERSION %centreon); %centreon=get_parameters(); } else { diff --git a/centreon-plugins/src/check_centreon_nt b/centreon-plugins/src/check_centreon_nt index 6cfaf7a5c..55095fd96 100644 --- a/centreon-plugins/src/check_centreon_nt +++ b/centreon-plugins/src/check_centreon_nt @@ -35,7 +35,7 @@ if (eval "require centreon" ) { use vars qw($VERSION %centreon); %centreon = get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } @@ -46,7 +46,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 = $oreon{GLOBAL}{NAGIOS_LIBEXEC}."check_nt"; +my $pathtolibexecnt = $centreon{GLOBAL}{NAGIOS_LIBEXEC}."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_TcpConn b/centreon-plugins/src/check_centreon_snmp_TcpConn similarity index 100% rename from centreon-plugins/src/check_centreon_TcpConn rename to centreon-plugins/src/check_centreon_snmp_TcpConn diff --git a/centreon-plugins/src/check_centreon_snmp_cpu b/centreon-plugins/src/check_centreon_snmp_cpu index 9851a18f5..a575fbdae 100644 --- a/centreon-plugins/src/check_centreon_snmp_cpu +++ b/centreon-plugins/src/check_centreon_snmp_cpu @@ -27,13 +27,13 @@ use strict; use Net::SNMP qw(:snmp); use FindBin; use lib "$FindBin::Bin"; -use lib "/usr/local/nagios/libexec"; +use lib "@NAGIOS_PLUGINS@"; use utils qw($TIMEOUT %ERRORS &print_revision &support); -if (eval "require oreon" ) { - use oreon qw(get_parameters); - use vars qw($VERSION %oreon); - %oreon = get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters); + use vars qw($VERSION %centreon); + %centreon = get_parameters(); } else { print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; diff --git a/centreon-plugins/src/check_centreon_snmp_loadaverage b/centreon-plugins/src/check_centreon_snmp_loadaverage index e9401105b..6765a533e 100644 --- a/centreon-plugins/src/check_centreon_snmp_loadaverage +++ b/centreon-plugins/src/check_centreon_snmp_loadaverage @@ -129,9 +129,9 @@ $name =~ s/\.pl.*//g; # Plugin snmp requests -my $OID_CPULOAD_1 =$oreon{UNIX}{CPU_LOAD_1M}; -my $OID_CPULOAD_5 =$oreon{UNIX}{CPU_LOAD_5M}; -my $OID_CPULOAD_15 =$oreon{UNIX}{CPU_LOAD_15M}; +my $OID_CPULOAD_1 = $centreon{UNIX}{CPU_LOAD_1M}; +my $OID_CPULOAD_5 = $centreon{UNIX}{CPU_LOAD_5M}; +my $OID_CPULOAD_15 =$centreon{UNIX}{CPU_LOAD_15M}; my ($session, $error); if ($snmp eq "1" || $snmp eq "2") { diff --git a/centreon-plugins/src/check_centreon_snmp_multiple_process b/centreon-plugins/src/check_centreon_snmp_multiple_process index 2457ca165..c5431d51c 100644 --- a/centreon-plugins/src/check_centreon_snmp_multiple_process +++ b/centreon-plugins/src/check_centreon_snmp_multiple_process @@ -120,10 +120,10 @@ $parameters[scalar(@parameters)] = $tab[1]; my $name = $0; # Plugin snmp requests -my $OID_SW_RunName = $oreon{MIB2}{SW_RUNNAME}; -my $OID_SW_RunParameters = $oreon{MIB2}{SW_RUNPARAMETERS}; -my $OID_SW_RunIndex =$oreon{MIB2}{SW_RUNINDEX}; -my $OID_SW_RunStatus =$oreon{MIB2}{SW_RUNSTATUS}; +my $OID_SW_RunName = $centreon{MIB2}{SW_RUNNAME}; +my $OID_SW_RunParameters = $centreon{MIB2}{SW_RUNPARAMETERS}; +my $OID_SW_RunIndex =$centreon{MIB2}{SW_RUNINDEX}; +my $OID_SW_RunStatus =$centreon{MIB2}{SW_RUNSTATUS}; my ($session, $error); if ($snmp eq "1" || $snmp eq "2") { diff --git a/centreon-plugins/src/check_centreon_packetErrors b/centreon-plugins/src/check_centreon_snmp_packetErrors similarity index 96% rename from centreon-plugins/src/check_centreon_packetErrors rename to centreon-plugins/src/check_centreon_snmp_packetErrors index 5b949c034..17faf90a6 100644 --- a/centreon-plugins/src/check_centreon_packetErrors +++ b/centreon-plugins/src/check_centreon_snmp_packetErrors @@ -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 = $oreon{NAGIOS_LIBEXEC}; +my $pathtolibexecnt = $centreon{NAGIOS_LIBEXEC}; 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 652095d77..308f9f989 100644 --- a/centreon-plugins/src/check_centreon_snmp_process +++ b/centreon-plugins/src/check_centreon_snmp_process @@ -113,9 +113,9 @@ my $name = $0; $name =~ s/\.pl.*//g; # Plugin snmp requests -my $OID_SW_RunName = $oreon{MIB2}{SW_RUNNAME}; -my $OID_SW_RunIndex =$oreon{MIB2}{SW_RUNINDEX}; -my $OID_SW_RunStatus =$oreon{MIB2}{SW_RUNSTATUS}; +my $OID_SW_RunName = $centreon{MIB2}{SW_RUNNAME}; +my $OID_SW_RunIndex =$centreon{MIB2}{SW_RUNINDEX}; +my $OID_SW_RunStatus =$centreon{MIB2}{SW_RUNSTATUS}; my ($session, $error); if ($snmp eq "1" || $snmp eq "2") { diff --git a/centreon-plugins/src/check_centreon_snmp_process_detailed b/centreon-plugins/src/check_centreon_snmp_process_detailed index 4c73351ae..8c9ef161f 100644 --- a/centreon-plugins/src/check_centreon_snmp_process_detailed +++ b/centreon-plugins/src/check_centreon_snmp_process_detailed @@ -10,7 +10,7 @@ # # help : ./check_snmp_process -h -############################## check_oreon_snmp_process_detailed ############## +############################## check_centreon_snmp_process_detailed ############## # Version : 1.2.2 # Date : Jun 20 2007 # Author : Sugumaran Mathavarajan - msugumaran@merethis.com diff --git a/centreon-plugins/src/check_centreon_snmp_remote_storage b/centreon-plugins/src/check_centreon_snmp_remote_storage index d1c16a9db..20214850a 100644 --- a/centreon-plugins/src/check_centreon_snmp_remote_storage +++ b/centreon-plugins/src/check_centreon_snmp_remote_storage @@ -148,11 +148,11 @@ my $OID_hrStorageDescr = ""; if (defined($opt_t) && ($opt_t eq "AIX" || $opt_t eq "AS400")){ $OID_hrStorageDescr = ".1.3.6.1.2.1.25.3.8.1.2"; } else { - $OID_hrStorageDescr = $oreon{MIB2}{HR_STORAGE_DESCR}; + $OID_hrStorageDescr = $centreon{MIB2}{HR_STORAGE_DESCR}; } -my $OID_hrStorageAllocationUnits = $oreon{MIB2}{HR_STORAGE_ALLOCATION_UNITS}; -my $OID_hrStorageSize = $oreon{MIB2}{HR_STORAGE_SIZE}; -my $OID_hrStorageUsed = $oreon{MIB2}{HR_STORAGE_USED}; +my $OID_hrStorageAllocationUnits = $centreon{MIB2}{HR_STORAGE_ALLOCATION_UNITS}; +my $OID_hrStorageSize = $centreon{MIB2}{HR_STORAGE_SIZE}; +my $OID_hrStorageUsed = $centreon{MIB2}{HR_STORAGE_USED}; # create a SNMP session my ($session, $error); diff --git a/centreon-plugins/src/check_centreon_snmp_traffic b/centreon-plugins/src/check_centreon_snmp_traffic index a201ddc7e..3f5c5cadf 100644 --- a/centreon-plugins/src/check_centreon_snmp_traffic +++ b/centreon-plugins/src/check_centreon_snmp_traffic @@ -163,8 +163,8 @@ if (defined ($opt_64bits)) { ##### Plugin snmp requests ## -my $OID_DESC =$oreon{MIB2}{IF_DESC}; -my $OID_OPERSTATUS =$oreon{MIB2}{IF_OPERSTATUS}; +my $OID_DESC =$centreon{MIB2}{IF_DESC}; +my $OID_OPERSTATUS =$centreon{MIB2}{IF_OPERSTATUS}; my @operstatus = ("up","down","testing", "unknown", "dormant", "notPresent", "lowerLayerDown"); # create a SNMP session @@ -207,13 +207,13 @@ if ($opt_n) { } my ($OID_IN, $OID_OUT, $OID_SPEED); if ($opt_64bits) { - $OID_IN =$oreon{MIB2}{IF_IN_OCTET_64_BITS}.".".$interface; -$OID_OUT = $oreon{MIB2}{IF_OUT_OCTET_64_BITS}.".".$interface; -$OID_SPEED = $oreon{MIB2}{IF_SPEED_64_BITS}.".".$interface; + $OID_IN =$centreon{MIB2}{IF_IN_OCTET_64_BITS}.".".$interface; +$OID_OUT = $centreon{MIB2}{IF_OUT_OCTET_64_BITS}.".".$interface; +$OID_SPEED = $centreon{MIB2}{IF_SPEED_64_BITS}.".".$interface; }else { - $OID_IN =$oreon{MIB2}{IF_IN_OCTET}.".".$interface; -$OID_OUT = $oreon{MIB2}{IF_OUT_OCTET}.".".$interface; -$OID_SPEED = $oreon{MIB2}{IF_SPEED}.".".$interface; + $OID_IN =$centreon{MIB2}{IF_IN_OCTET}.".".$interface; +$OID_OUT = $centreon{MIB2}{IF_OUT_OCTET}.".".$interface; +$OID_SPEED = $centreon{MIB2}{IF_SPEED}.".".$interface; } # Get desctiption table @@ -308,8 +308,8 @@ $last_out_bits = 0; my $flg_created = 0; -if (-e "/tmp/oreon_traffic_if".$interface."_".$opt_H) { - open(FILE,"<"."/tmp/oreon_traffic_if".$interface."_".$opt_H); +if (-e "/tmp/centreon_traffic_if".$interface."_".$opt_H) { + open(FILE,"<"."/tmp/centreon_traffic_if".$interface."_".$opt_H); while($row = ){ @last_values = split(":",$row); $last_check_time = $last_values[0]; @@ -324,8 +324,8 @@ if (-e "/tmp/oreon_traffic_if".$interface."_".$opt_H) { $update_time = time(); -unless (open(FILE,">"."/tmp/oreon_traffic_if".$interface."_".$opt_H)){ - print "Unknown - /tmp/oreon_traffic_if".$interface."_".$opt_H. " !\n"; +unless (open(FILE,">"."/tmp/centreon_traffic_if".$interface."_".$opt_H)){ + print "Unknown - /tmp/centreon_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 4908422cb..6bfcb36cd 100644 --- a/centreon-plugins/src/check_centreon_snmp_uptime +++ b/centreon-plugins/src/check_centreon_snmp_uptime @@ -82,9 +82,9 @@ my $day = 0; # Plugin snmp requests -my $OID_OBJECTID =$oreon{MIB2}{OBJECTID}; -my $OID_UPTIME_WINDOWS =$oreon{MIB2}{UPTIME_WINDOWS}; -my $OID_UPTIME_OTHER =$oreon{MIB2}{UPTIME_OTHER}; +my $OID_OBJECTID =$centreon{MIB2}{OBJECTID}; +my $OID_UPTIME_WINDOWS =$centreon{MIB2}{UPTIME_WINDOWS}; +my $OID_UPTIME_OTHER =$centreon{MIB2}{UPTIME_OTHER}; # create a SNMP session my ( $session, $error ) = Net::SNMP->session(-hostname => $opt_H,-community => $opt_C, -version => $snmp); diff --git a/centreon-plugins/src/check_meta_service b/centreon-plugins/src/check_meta_service index a9fdad270..acedc2078 100644 --- a/centreon-plugins/src/check_meta_service +++ b/centreon-plugins/src/check_meta_service @@ -48,7 +48,7 @@ GetOptions ########################### ## Set Database information ########################### -use vars qw($mysql_database_oreon $mysql_database_ods $mysql_host $mysql_user $mysql_passwd); +use vars qw($mysql_database_centreon $mysql_database_ods $mysql_host $mysql_user $mysql_passwd); require "@INSTALL_DIR_OREON@/ODS/etc/conf.pm"; my $dbh = DBI->connect("DBI:mysql:database=$mysql_database_oreon;host=$mysql_host", diff --git a/centreon-plugins/src/check_nt_centreon b/centreon-plugins/src/check_nt_centreon index 82211b94e..c13e9985e 100644 --- a/centreon-plugins/src/check_nt_centreon +++ b/centreon-plugins/src/check_nt_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 = $oreon{GLOBAL}{NAGIOS_LIBEXEC}."check_nt"; +my $pathtolibexecnt = $centreon{GLOBAL}{NAGIOS_LIBEXEC}."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 14b29fa5d..da52a9323 100644 --- a/centreon-plugins/src/check_snmp_cpfw.pl +++ b/centreon-plugins/src/check_snmp_cpfw.pl @@ -25,16 +25,16 @@ use utils qw(%ERRORS $TIMEOUT); # Oreon specific -if (eval "require oreon" ) { - use oreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); - use vars qw($VERSION %oreon); - %oreon=get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); + use vars qw($VERSION %centreon); + %centreon=get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } -my $pathtorrdbase = $oreon{GLOBAL}{DIR_RRDTOOL}; +my $pathtorrdbase = $centreon{GLOBAL}{DIR_RRDTOOL}; ########### SNMP Datas ########### @@ -108,7 +108,7 @@ my $o_perf= undef; # Performance data output my $o_login= undef; # Login for snmpv3 my $o_passwd= undef; # Pass for snmpv3 -# Oreon specific +# centreon specific my $o_step= undef; my $o_g= undef; my $o_S= undef; @@ -172,7 +172,7 @@ sub help { prints version number -g (--rrdgraph) Create a rrd base if necessary and add datas into this one --rrd_step Specifies the base interval in seconds with which data will be fed into the RRD (300 by default) --S (--ServiceId) Oreon Service Id +-S (--ServiceId) centreon Service Id EOT } @@ -199,7 +199,7 @@ sub check_options { 'p:s' => \$o_policy, 'policy:s' => \$o_policy, 'c:s' => \$o_conn, 'connexions:s' => \$o_conn, 'f' => \$o_perf, 'perfparse' => \$o_perf, - # For Oreon rrdtool graph + # For centreon rrdtool graph "rrd_step:s" => \$o_step, "g" => \$o_g, "rrdgraph" => \$o_g, "S=s" => \$o_S, "ServiceId=s" => \$o_S @@ -235,7 +235,7 @@ sub check_options { if (!defined($o_fw) && !defined($o_ha) && !defined($o_mgmt) && !defined($o_svn)) { print "Must select a product to check !\n";print_usage(); exit $ERRORS{"UNKNOWN"}} - ###### Oreon ####### + ###### centreon ####### if (!defined($o_S)) { $o_S="1_1" } $ServiceId = is_valid_serviceid($o_S); diff --git a/centreon-plugins/src/check_snmp_load.pl b/centreon-plugins/src/check_snmp_load.pl index 714a51e6f..f77be3eaa 100644 --- a/centreon-plugins/src/check_snmp_load.pl +++ b/centreon-plugins/src/check_snmp_load.pl @@ -26,16 +26,16 @@ use utils qw(%ERRORS $TIMEOUT); # Oreon specific -if (eval "require oreon" ) { - use oreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); - use vars qw($VERSION %oreon); - %oreon=get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); + use vars qw($VERSION %centreon); + %centreon=get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } -my $pathtorrdbase = $oreon{GLOBAL}{DIR_RRDTOOL}; +my $pathtorrdbase = $centreon{GLOBAL}{DIR_RRDTOOL}; # SNMP Datas @@ -110,7 +110,7 @@ my $o_version2= undef; # use snmp v2c # SNMPv3 specific my $o_login= undef; # Login for snmpv3 my $o_passwd= undef; # Pass for snmpv3 -# Oreon specific +# centreon specific my $o_step= undef; my $o_g= undef; my $o_S= undef; @@ -184,7 +184,7 @@ sub help { These options are for backward compatibility (version<1.2) -g (--rrdgraph) Create a rrd base if necessary and add datas into this one --rrd_step Specifies the base interval in seconds with which data will be fed into the RRD (300 by default) --S (--ServiceId) Oreon Service Id +-S (--ServiceId) centreon Service Id EOT } @@ -214,7 +214,7 @@ sub check_options { 'A' => \$o_as400, 'as400' => \$o_as400, 'I' => \$o_cisco, 'cisco' => \$o_cisco, 'N' => \$o_linuxC, 'netsnmp' => \$o_linuxC, -# For Oreon rrdtool graph +# For centreon rrdtool graph "rrd_step:s" => \$o_step, "g" => \$o_g, "rrdgraph" => \$o_g, "S=s" => \$o_S, "ServiceId=s" => \$o_S @@ -259,7 +259,7 @@ sub check_options { { print "warning <= critical ! \n";print_usage(); exit $ERRORS{"UNKNOWN"}} } - ###### Oreon ####### + ###### centreon ####### if (!defined($o_S)) { $o_S="1_1" } $ServiceId = is_valid_serviceid($o_S); @@ -267,13 +267,8 @@ sub check_options { if (!defined($o_step)) { $o_step="300" } $step = $1 if ($o_step =~ /(\d+)/); - } - - - - ########## MAIN ####### check_options(); diff --git a/centreon-plugins/src/check_snmp_mem.pl b/centreon-plugins/src/check_snmp_mem.pl index 485e925d3..9b1b8c272 100644 --- a/centreon-plugins/src/check_snmp_mem.pl +++ b/centreon-plugins/src/check_snmp_mem.pl @@ -24,16 +24,16 @@ use utils qw(%ERRORS $TIMEOUT); # Oreon specific -if (eval "require oreon" ) { - use oreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); - use vars qw($VERSION %oreon); - %oreon=get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); + use vars qw($VERSION %centreon); + %centreon=get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } -my $pathtorrdbase = $oreon{GLOBAL}{DIR_RRDTOOL}; +my $pathtorrdbase = $centreon{GLOBAL}{DIR_RRDTOOL}; # SNMP Datas diff --git a/centreon-plugins/src/check_snmp_process.pl b/centreon-plugins/src/check_snmp_process.pl index 41d4bfde3..2754fe942 100644 --- a/centreon-plugins/src/check_snmp_process.pl +++ b/centreon-plugins/src/check_snmp_process.pl @@ -26,19 +26,19 @@ use utils qw(%ERRORS $TIMEOUT); #my $TIMEOUT = 5; #my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); -# Oreon specific +# centreon specific #use lib "@NAGIOS_PLUGINS@"; -if (eval "require oreon" ) { - use oreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); - use vars qw($VERSION %oreon); - %oreon=get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); + use vars qw($VERSION %centreon); + %centreon=get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } -my $pathtorrdbase = $oreon{GLOBAL}{DIR_RRDTOOL}; +my $pathtorrdbase = $centreon{GLOBAL}{DIR_RRDTOOL}; # SNMP Datas diff --git a/centreon-plugins/src/check_snmp_processus_loaded.pl b/centreon-plugins/src/check_snmp_processus_loaded.pl index f4e7fe78a..c23366f71 100644 --- a/centreon-plugins/src/check_snmp_processus_loaded.pl +++ b/centreon-plugins/src/check_snmp_processus_loaded.pl @@ -27,12 +27,12 @@ use lib "$FindBin::Bin"; use lib "/usr/local/nagios/libexec"; use utils qw($TIMEOUT %ERRORS &print_revision &support); -if (eval "require oreon" ) { - use oreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); - use vars qw($VERSION %oreon); - %oreon=get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); + use vars qw($VERSION %centreon); + %centreon=get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } @@ -169,7 +169,7 @@ sub print_usage () { sub print_help () { print "##########################################\n"; - print "# Copyright (c) 2004-2006 Oreon #\n"; + print "# Copyright (c) 2004-2006 centreon #\n"; print "# Bugs to http://www.oreon-project.org/ #\n"; print "##########################################\n"; print_usage(); diff --git a/centreon-plugins/src/check_snmp_script_result.pl b/centreon-plugins/src/check_snmp_script_result.pl index c45b15ff6..0204b58ad 100644 --- a/centreon-plugins/src/check_snmp_script_result.pl +++ b/centreon-plugins/src/check_snmp_script_result.pl @@ -3,19 +3,19 @@ # # $Id: check_graph_remote_storage.pl,v 1.2 2005/07/27 22:21:49 wistof Exp $ # -# Oreon's plugins are developped with GPL Licence : +# centreon's plugins are developped with GPL Licence : # http://www.fsf.org/licenses/gpl.txt # Developped by : Julien Mathis - Mathieu Mettre - Romain Le Merlus - Yohann Lecarpentier # -# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf +# Modified for centreon Project by : Mathieu Chateau - Christophe Coraboeuf # # The Software is provided to you AS IS and WITH ALL FAULTS. -# OREON makes no representation and gives no warranty whatsoever, +# centreon makes no representation and gives no warranty whatsoever, # whether express or implied, and without limitation, with regard to the quality, # safety, contents, performance, merchantability, non-infringement or suitability for -# any particular or intended purpose of the Software found on the OREON web site. -# In no event will OREON be liable for any direct, indirect, punitive, special, -# incidental or consequential damages however they may arise and even if OREON has +# any particular or intended purpose of the Software found on the centreon web site. +# In no event will centreon be liable for any direct, indirect, punitive, special, +# incidental or consequential damages however they may arise and even if centreon has # been previously advised of the possibility of such damages. # Plugin init @@ -27,12 +27,12 @@ use lib "$FindBin::Bin"; use lib "/usr/local/nagios/libexec"; use utils qw($TIMEOUT %ERRORS &print_revision &support); -if (eval "require oreon" ) { - use oreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); - use vars qw($VERSION %oreon); - %oreon=get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); + use vars qw($VERSION %centreon); + %centreon=get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } @@ -188,7 +188,7 @@ sub print_usage () { sub print_help () { print "##########################################\n"; - print "# Copyright (c) 2004-2006 Oreon #\n"; + print "# Copyright (c) 2004-2006 centreon #\n"; print "# Bugs to http://www.oreon-project.org/ #\n"; print "##########################################\n"; print_usage(); diff --git a/centreon-plugins/src/check_snmp_storage.pl b/centreon-plugins/src/check_snmp_storage.pl index 7bb5b3d3d..861e7a1bb 100644 --- a/centreon-plugins/src/check_snmp_storage.pl +++ b/centreon-plugins/src/check_snmp_storage.pl @@ -24,16 +24,16 @@ use utils qw(%ERRORS $TIMEOUT); # Oreon specific #use lib "@NAGIOS_PLUGINS@"; -if (eval "require oreon" ) { - use oreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); - use vars qw($VERSION %oreon); - %oreon=get_parameters(); +if (eval "require centreon" ) { + use centreon qw(get_parameters create_rrd update_rrd &is_valid_serviceid); + use vars qw($VERSION %centreon); + %centreon=get_parameters(); } else { - print "Unable to load oreon perl module\n"; + print "Unable to load centreon perl module\n"; exit $ERRORS{'UNKNOWN'}; } -my $pathtorrdbase = $oreon{GLOBAL}{DIR_RRDTOOL}; +my $pathtorrdbase = $centreon{GLOBAL}{DIR_RRDTOOL}; # SNMP Datas my $storage_table= '1.3.6.1.2.1.25.2.3.1'; @@ -96,7 +96,7 @@ my @o_shortL= undef; # output type,where,cut # SNMP V3 specific my $o_login= undef; # snmp v3 login my $o_passwd= undef; # snmp v3 passwd -# Oreon specific +# centreon specific my $o_step= undef; my $o_g= undef; my $o_S= undef; @@ -206,7 +206,7 @@ warn if %used > warn and critical if %used > crit prints version number -g (--rrdgraph) Create a rrd base if necessary and add datas into this one --rrd_step Specifies the base interval in seconds with which data will be fed into the RRD (300 by default) --S (--ServiceId) Oreon Service Id +-S (--ServiceId) centreon Service Id Note : with T=pu or T=bu : OK < warn < crit @@ -254,7 +254,7 @@ sub check_options { '2' => \$o_version2, 'v2c' => \$o_version2, 'S:s' => \$o_short, 'short:s' => \$o_short, 'f' => \$o_perf, 'perfparse' => \$o_perf, - # For Oreon rrdtool graph + # For centreon rrdtool graph "rrd_step:s" => \$o_step, "g" => \$o_g, "rrdgraph" => \$o_g, # "S=s" => \$o_S, @@ -306,7 +306,7 @@ sub check_options { if (defined ($o_shortL[2]) && isnnum($o_shortL[2])) {print "-S last option must be an integer\n";print_usage(); exit $ERRORS{"UNKNOWN"};} } - ###### Oreon ####### + ###### centreon ####### if (!defined($o_S)) { $o_S="1_1" } $ServiceId = is_valid_serviceid($o_S);