diff --git a/centreon-plugins/src/check_centreon_TcpConn b/centreon-plugins/src/check_centreon_TcpConn index fab4f44cb..6d8d672f2 100644 --- a/centreon-plugins/src/check_centreon_TcpConn +++ b/centreon-plugins/src/check_centreon_TcpConn @@ -1,24 +1,28 @@ #! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_TcpConn.pl,v 1.2 2005/11/17 10:21:49 Sugumaran Mat $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# This plugin is developped under GPL Licence: -# http://www.fsf.org/licenses/gpl.txt +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran # -# Developped by Merethis SARL : http://www.merethis.com +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Plugin init # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# MERETHIS 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 LINAGORA web site. -# In no event will MERETHIS be liable for any direct, indirect, punitive, special, -# incidental or consequential damages however they may arise and even if MERETHIS has -# been previously advised of the possibility of such damages. - -## -## Plugin init -## use strict; use Net::SNMP qw(:snmp); use FindBin; @@ -130,11 +134,10 @@ sub print_usage () { } sub print_help () { - print "#=========================================\n"; - print "# Copyright (c) 2005 Merethis SARL =\n"; - print "# Developped by Julien Mathis =\n"; - print "# Bugs to http://www.oreon-project.org/ =\n"; - print "#=========================================\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_dummy b/centreon-plugins/src/check_centreon_dummy index b0d97d346..51e320106 100644 --- a/centreon-plugins/src/check_centreon_dummy +++ b/centreon-plugins/src/check_centreon_dummy @@ -1,23 +1,25 @@ #! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_packetsErrors.pl,v 1.2 2005/07/27 22:21:49 Julio $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# Oreon's plugins are developped with GPL Licence : -# http://www.fsf.org/licenses/gpl.txt -# Developped by : Julien Mathis - Romain Le Merlus - Sugumaran Mat +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran # -# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf -# Modified By Julien Mathis For Merethis Company +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# OREON 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 -# been previously advised of the possibility of such damages. - +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### # # Plugin init # @@ -81,10 +83,10 @@ sub print_usage () { } sub print_help () { - print "##########################################\n"; - print "# Copyright (c) 2004-2006 Oreon #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "##########################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_http b/centreon-plugins/src/check_centreon_http deleted file mode 100644 index 8b15905af..000000000 --- a/centreon-plugins/src/check_centreon_http +++ /dev/null @@ -1,191 +0,0 @@ -#! /usr/bin/perl -w -# -# $Id: check_graph_http,v 1.4 2005/08/01 18:03:52 gollum123 Exp $ -# -# This plugin is developped under GPL Licence: -# http://www.fsf.org/licenses/gpl.txt -# -# Modified for Oreon Project by : Sugumaran Mathavarajan - 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, -# 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 -# been previously advised of the possibility of such damages. - -## -## Plugin init -## -use strict; -use FindBin; -use lib "$FindBin::Bin"; -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(); -} else { - print "Unable to load oreon perl module\n"; - exit $ERRORS{'UNKNOWN'}; -} - -use Getopt::Long; -use vars qw($opt_h $opt_V $opt_g $opt_D $opt_S $opt_H $opt_I $opt_e $opt_s $opt_u $opt_p $opt_P $opt_w $opt_c - $opt_t $opt_a $opt_L $opt_f $opt_l $opt_r $opt_R $opt_z $opt_C $opt_step $step); -use vars qw($PROGNAME); - -## -## Plugin var init -## -my $pathtolibexechttp = $oreon{GLOBAL}{ NAGIOS_LIBEXEC}."check_http"; - -$PROGNAME = "$0"; -sub print_help (); -sub print_usage (); - -Getopt::Long::Configure('bundling'); -GetOptions - ("h" => \$opt_h, "help" => \$opt_h, - "V" => \$opt_V, "version" => \$opt_V, - "H=s" => \$opt_H, "hostname=s" => \$opt_H, - "I=s" => \$opt_I, "IP-address=s" => \$opt_I, - "e=s" => \$opt_e, "expect=s" => \$opt_e, - "s=s" => \$opt_s, "string=s" => \$opt_s, - "u=s" => \$opt_u, "url=s" => \$opt_u, - "p=s" => \$opt_p, "port=s" => \$opt_p, - "P=s" => \$opt_P, "post=s" => \$opt_P, - "w=s" => \$opt_w, "warning=s" => \$opt_w, - "c=s" => \$opt_c, "critical=s" => \$opt_c, - "t=s" => \$opt_t, "timeout=s" => \$opt_t, - "a=s" => \$opt_a, "authorization=s" => \$opt_a, - "L=s" => \$opt_L, "link=s" => \$opt_L, - "f=s" => \$opt_f, "onredirect=s" => \$opt_f, - "l=s" => \$opt_l, "linespan=s" => \$opt_l, - "r=s" => \$opt_r, "regex=s" => \$opt_r, - "R=s" => \$opt_R, "eregi=s" => \$opt_R, - "C=s" => \$opt_C, "certificate=s" => \$opt_C, - "z" => \$opt_R, "ssl" => \$opt_z - - ); - -if ($opt_V) { - print_revision($PROGNAME,'$Revision: 1.3 $'); - exit $ERRORS{'OK'}; -} - -if ($opt_h) { - print_help(); - exit $ERRORS{'OK'}; -} - -$opt_H = shift unless ($opt_H); -(print_usage() && exit $ERRORS{'OK'}) unless ($opt_H); - -($opt_step) || ($opt_step = shift) || ($opt_step = "300"); -$step = $1 if ($opt_step =~ /(\d+)/); - -my $args_check_http = ""; -if ( $opt_H ) { - $args_check_http .= " -H $opt_H"; -} -if ( $opt_I ) { - $args_check_http .= " -I $opt_I"; -} -if ( $opt_e ) { - $args_check_http .= " -e $opt_e"; -} -if ( $opt_s ) { - $args_check_http .= " -s $opt_s"; -} -if ( $opt_u ) { - $args_check_http .= " -u $opt_u"; -} -if ( $opt_p ) { - $args_check_http .= " -p $opt_p"; -} -if ( $opt_P ) { - $args_check_http .= " -P $opt_P"; -} -if ( $opt_I ) { - $args_check_http .= " -I $opt_I"; -} -if ( $opt_e ) { - $args_check_http .= " -e $opt_e"; -} -if ( $opt_w ) { - $args_check_http .= " -w $opt_w"; -} -if ( $opt_c ) { - $args_check_http .= " -c $opt_c"; -} -if ( $opt_t ) { - $args_check_http .= " -t $opt_t"; -} -if ( $opt_a ) { - $args_check_http .= " -a $opt_a"; -} -if ( $opt_L ) { - $args_check_http .= " -L $opt_L"; -} -if ( $opt_f ) { - $args_check_http .= " -f $opt_f"; -} -if ( $opt_l ) { - $args_check_http .= " -l $opt_l"; -} -if ( $opt_r ) { - $args_check_http .= " -r $opt_r"; -} -if ( $opt_R ) { - $args_check_http .= " -R $opt_R"; -} -if ( $opt_C ) { - $args_check_http .= " -C $opt_C"; -} -if ( $opt_z ) { - $args_check_http .= " --ssl"; -} - - - -my $start=time; -my $name = $0; -$name =~ s/\.pl.*//g; - -## -## Plugin requests -## -# print "args: $args_check_http \n"; -my $result = `$pathtolibexechttp $args_check_http`; -my $return_code = $? / 256; - -$_ = $result; -m/time=\s*(\d*\.\d*)/; -my $time = $1; - - -print "$result"; -exit $return_code; - -## -## Plugin return code -## -sub print_usage () { - my $screen = `$pathtolibexechttp -h`; - $screen =~ s/check_http/check_graph_http/g; - $screen =~ s/-S/-Z/; - print $screen; -} - -sub print_help () { - print "Copyright (c) 2005 LINAGORA SA\n"; - print "Bugs to http://www.linagora.com/\n"; - print "\n"; - print_usage(); - print "\n"; -} diff --git a/centreon-plugins/src/check_centreon_nt b/centreon-plugins/src/check_centreon_nt index 830a81a58..e27130b3c 100644 --- a/centreon-plugins/src/check_centreon_nt +++ b/centreon-plugins/src/check_centreon_nt @@ -1,26 +1,29 @@ #! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_graph_nt.pl,v 1.4 2005/08/01 18:04:00 gollum123 Exp $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# Oreon's plugins are developped with GPL Licence : -# http://www.fsf.org/licenses/gpl.txt -# Developped by : Julien Mathis - Mathieu Mettre +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran # -# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf -# Modified for Oreon Project by : Sugumaran Mathavarajan - msugumaran@merethis.com +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Plugin init # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# OREON 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 -# been previously advised of the possibility of such damages. -## -## Plugin init -## use strict; use FindBin; use lib "$FindBin::Bin"; @@ -153,15 +156,13 @@ if ($op_v) { if ($op_t) {$op_t = "-t ".$op_t;} else { $op_t = " ";} if ($op_s) {$op_s = "-s ".$op_s;} else { $op_s = " ";} if ($op_d) {$op_d = "-d ".$op_d;} else { $op_d = " ";} -# print "$pathtolibexecnt -H $opt_H $op_v $port $warning $critical $op_l $op_t $op_s $op_d\n"; $_ = `$pathtolibexecnt -H $opt_H $op_v $port $warning $critical $op_l $op_t $op_s $op_d 2>/dev/null`; my $return = $_; $return =~ s/\\//g; $return_code = $? / 256; - ## - ## CLIENTVERSION - ## + # CLIENTVERSION + # if ($op_v =~ /CLIENTVERSION/){ print "CLIENTVERSION impossible to Graph!\n"; exit $ERRORS{'UNKNOWN'}; @@ -328,9 +329,10 @@ sub print_usage () { } sub print_help () { - print "Copyright (c) 2004 OREON\n"; - print "Bugs to http://www.oreon.org/\n"; - print "\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_packetErrors b/centreon-plugins/src/check_centreon_packetErrors index 572c0f686..0f5f2d853 100644 --- a/centreon-plugins/src/check_centreon_packetErrors +++ b/centreon-plugins/src/check_centreon_packetErrors @@ -1,23 +1,25 @@ #! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_packetsErrors.pl,v 1.2 2005/07/27 22:21:49 Julio $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# Oreon's plugins are developped with GPL Licence : -# http://www.fsf.org/licenses/gpl.txt -# Developped by : Julien Mathis - Romain Le Merlus - Sugumaran Mat +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran # -# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf -# Modified By Julien Mathis For Merethis Company +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# OREON 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 -# been previously advised of the possibility of such damages. - +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### # # Plugin init # @@ -151,29 +153,28 @@ foreach my $err (oid_lex_sort(keys %$result_out)) { for (my $i = 0; $i < scalar(@nb_in_errors); $i++) { if (-e "/tmp/packet_errors_if".$i."_".$opt_H.".tmp") { - open(FILE,"<"."/tmp/packet_errors_if".$i."_".$opt_H.".tmp"); - while($row = ){ - my @last_values = split(":",$row); - $last_check_time[$i] = $last_values[0]; - $last_in_errors[$i] = $last_values[1]; - $last_out_errors[$i] = $last_values[2]; - $flg_created[$i] = 1; - } - close(FILE); + open(FILE,"<"."/tmp/packet_errors_if".$i."_".$opt_H.".tmp"); + while($row = ){ + my @last_values = split(":",$row); + $last_check_time[$i] = $last_values[0]; + $last_in_errors[$i] = $last_values[1]; + $last_out_errors[$i] = $last_values[2]; + $flg_created[$i] = 1; + } + close(FILE); } else { - $flg_created[$i] = 0; + $flg_created[$i] = 0; } $update_time = time; - unless (open(FILE,">"."/tmp/packet_errors_if".$i."_".$opt_H.".tmp")){ print "Unknown - /tmp/tmp/packet_errors_if".$i."_".$opt_H.".tmp!\n"; exit $ERRORS{"UNKNOWN"}; - } +} print FILE "$update_time:$nb_in_errors[$i]:$nb_out_errors[$i]"; close(FILE); if ($flg_created[$i] eq 0){ - print "First execution : Buffer in creation.... \n"; + print "First execution : Buffer in creation.... \n"; } } @@ -186,19 +187,19 @@ my $diff_test = 0; for (my $i = 0; $i < scalar(@nb_in_errors); $i++) { my $interface = $i+1; if ($flg_created[$i]) { - if (($nb_in_errors[$i] - $last_in_errors[$i] >= $critical) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $critical)){ - $msg[$i] = "$interface:critical "; - $status = "CRITICAL"; - } - if(($nb_in_errors[$i] - $last_in_errors[$i] >= $warning) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $warning)){ - if (!defined($msg[$i])) { - $msg[$i] = "$interface:warning "; - } - if ($status ne "CRITICAL") { - $status = "WARNING"; - } - } - $diff_test = 1; + if (($nb_in_errors[$i] - $last_in_errors[$i] >= $critical) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $critical)){ + $msg[$i] = "$interface:critical "; + $status = "CRITICAL"; + } + if (($nb_in_errors[$i] - $last_in_errors[$i] >= $warning) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $warning)){ + if (!defined($msg[$i])) { + $msg[$i] = "$interface:warning "; + } + if ($status ne "CRITICAL") { + $status = "WARNING"; + } + } + $diff_test = 1; } } @@ -213,7 +214,7 @@ for (my $i = 0; $i < scalar (@msg); $i++) { } if ($output ne ""){ print $output."\n"; -}else { +} else { print "Status OK on all interfaces\n"; } exit($ERRORS{$status}); @@ -231,13 +232,13 @@ exit($ERRORS{$status}); print " (default 100)\n"; print " -V (--version) Plugin version\n"; print " -h (--help) usage help\n"; - } +} - sub print_help () { - print "##########################################\n"; - print "# Copyright (c) 2004-2006 Oreon #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "##########################################\n"; - print_usage(); - print "\n"; - } +sub print_help () { + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; + print_usage(); + print "\n"; +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_ping b/centreon-plugins/src/check_centreon_ping index 29da08658..924ab990a 100644 --- a/centreon-plugins/src/check_centreon_ping +++ b/centreon-plugins/src/check_centreon_ping @@ -1,23 +1,25 @@ #! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_oreon_ping,v 1.3 2006/04/28 10:21:49 Julien Mathis $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# Oreon's plugins are developped with GPL Licence : -# http://www.fsf.org/licenses/gpl.txt -# Developped by : Julien Mathis - Mathieu Mettre - Romain Le Merlus +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran # -# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf -# Modified By Julien Mathis - Sugumaran Mathavarajan For Merethis Company +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# OREON 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 -# been previously advised of the possibility of such damages. - +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### # # Plugin init # @@ -192,10 +194,10 @@ sub print_usage () { } sub print_help () { - print "######################################################\n"; - print "# Copyright (c) 2004-2006 Oreon-project #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "######################################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_snmp_loadaverage b/centreon-plugins/src/check_centreon_snmp_loadaverage index f75ca6e71..8c317412c 100644 --- a/centreon-plugins/src/check_centreon_snmp_loadaverage +++ b/centreon-plugins/src/check_centreon_snmp_loadaverage @@ -193,11 +193,10 @@ sub print_usage () { } sub print_help () { - print "######################################################\n"; - print "# Copyright (c) 2004-2007 Oreon-project #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "######################################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} - +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_snmp_process b/centreon-plugins/src/check_centreon_snmp_process index c3df74b2d..6397f7359 100644 --- a/centreon-plugins/src/check_centreon_snmp_process +++ b/centreon-plugins/src/check_centreon_snmp_process @@ -199,12 +199,11 @@ sub print_usage () { print " -V (--version) Plugin version\n"; print " -h (--help) usage help\n"; } - sub print_help () { - print "######################################################\n"; - print "# Copyright (c) 2004-2007 Oreon-project #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "######################################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_snmp_remote_storage b/centreon-plugins/src/check_centreon_snmp_remote_storage index d8ecd13b5..87db96ff0 100644 --- a/centreon-plugins/src/check_centreon_snmp_remote_storage +++ b/centreon-plugins/src/check_centreon_snmp_remote_storage @@ -321,11 +321,10 @@ sub print_usage () { } sub print_help () { - print "######################################################\n"; - print "# Copyright (c) 2004-2007 Oreon-project #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "######################################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} - +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_snmp_traffic b/centreon-plugins/src/check_centreon_snmp_traffic index 21d150787..038edc77b 100644 --- a/centreon-plugins/src/check_centreon_snmp_traffic +++ b/centreon-plugins/src/check_centreon_snmp_traffic @@ -461,10 +461,10 @@ sub print_usage () { } sub print_help () { - print "######################################################\n"; - print "# Copyright (c) 2004-2007 Oreon-project #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "######################################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_snmp_uptime b/centreon-plugins/src/check_centreon_snmp_uptime index 2adffd9f4..5c456b4e3 100644 --- a/centreon-plugins/src/check_centreon_snmp_uptime +++ b/centreon-plugins/src/check_centreon_snmp_uptime @@ -1,28 +1,28 @@ #! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_graph_uptime.pl,v 1.3 2005/07/27 22:21:49 wistof Exp $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# This plugin is developped under GPL Licence: -# http://www.fsf.org/licenses/gpl.txt - -# Developped by Linagora SA: http://www.linagora.com - -# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf -# Modified For Oreon compatibility by Julien Mathis - Sugumaran mathavarajan For Merethis +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran +# +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Plugin init # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# LINAGORA 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 LINAGORA web site. -# In no event will LINAGORA be liable for any direct, indirect, punitive, special, -# incidental or consequential damages however they may arise and even if LINAGORA has -# been previously advised of the possibility of such damages. - -# based on "graph plugins" developped by Oreon Team. See http://www.oreon.org. -## -## Plugin init -## use strict; use Net::SNMP qw(:snmp); use FindBin; @@ -80,10 +80,8 @@ my $name = $0; $name =~ s/\.pl.*//g; my $day = 0; -## -## Plugin snmp requests -## +# 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}; @@ -95,9 +93,7 @@ if ( !defined($session) ) { exit $ERRORS{'CRITICAL'}; } -my $result = $session->get_request( - -varbindlist => [$OID_OBJECTID] - ); +my $result = $session->get_request(-varbindlist => [$OID_OBJECTID]); if (!defined($result)) { printf("UNKNOWN: %s.\n", $session->error); $session->close; @@ -112,9 +108,7 @@ if ($return_result =~ /.*Windows.*/i ) { $OID = $OID_UPTIME_OTHER; } -$result = $session->get_request( - -varbindlist => [$OID] - ); +$result = $session->get_request(-varbindlist => [$OID]); if (!defined($result)) { printf("UNKNOWN: %s.\n", $session->error); $session->close; @@ -125,24 +119,18 @@ my $un = 0; $return_result = $result->{$OID}; if ( $return_result =~ m/(\d*) day[s]?,\s*(\d*):(\d*):(\d*).(\d*)/ ) { - $un = $5 + $4 * 100 + $3 * 100 * 60 + $2 * 100 * 60 * 60 + $1 * 100 * 60 * 60 * 24; - $day = $1; + $un = $5 + $4 * 100 + $3 * 100 * 60 + $2 * 100 * 60 * 60 + $1 * 100 * 60 * 60 * 24; + $day = $1; } if ( $return_result =~ m/(\d*) hour.*(\d*):(\d*).(\d*)/ ) { - $un = $4 + $3 * 100 + $3 * 100 * 60 + $1 * 100 * 60 * 60 ; + $un = $4 + $3 * 100 + $3 * 100 * 60 + $1 * 100 * 60 * 60 ; } if ($opt_d) { $un = $day; } -#print "un : $un\n"; - -## -## Plugin return code -## - if ($un || ( $un == 0) ){ if ($opt_d) { print "OK - Uptime (in day): $un|uptime=".$un."hs\n"; @@ -172,10 +160,10 @@ sub print_usage () { } sub print_help () { - print "Copyright (c) 2005 Linagora\n"; - print "Modified by Merethis \n"; - print "Bugs to http://www.linagora.com/\n"; - print "\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_centreon_snmp_value b/centreon-plugins/src/check_centreon_snmp_value index 8bbb424fd..cb83db804 100644 --- a/centreon-plugins/src/check_centreon_snmp_value +++ b/centreon-plugins/src/check_centreon_snmp_value @@ -195,10 +195,10 @@ sub print_usage () { } sub print_help () { - print "######################################################\n"; - print "# Copyright (c) 2004-2007 Oreon-project #\n"; - print "# Bugs to http://www.oreon-project.org/ #\n"; - print "######################################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; } diff --git a/centreon-plugins/src/check_meta_service b/centreon-plugins/src/check_meta_service index 85dd4a66a..a9fdad270 100644 --- a/centreon-plugins/src/check_meta_service +++ b/centreon-plugins/src/check_meta_service @@ -1,25 +1,28 @@ #! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_meta_service.pl,v 1.2 2005/07/27 22:21:49 Julio $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# Oreon's plugins are developped with GPL Licence : -# http://www.fsf.org/licenses/gpl.txt -# Developped by : Julien Mathis - Romain Le Merlus +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran # -# Developped by Julien Mathis for Merethis SARL +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Plugin init # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# OREON 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 -# been previously advised of the possibility of such damages. - -## -## Plugin init -## use strict; use DBI; @@ -393,14 +396,11 @@ sub print_usage () { print " -h (--help) usage help\n"; } -sub print_help () -{ - print "###########################################\n"; - print "# #\n"; - print "# Copyright (c) 2004-2007 Merethis #\n"; - print "# Bugs to http://www.oreon-services.com #\n"; - print "# #\n"; - print "###########################################\n"; +sub print_help () { + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; -} +} \ No newline at end of file diff --git a/centreon-plugins/src/check_nt_centreon b/centreon-plugins/src/check_nt_centreon index 9c99e77cf..0279bd080 100644 --- a/centreon-plugins/src/check_nt_centreon +++ b/centreon-plugins/src/check_nt_centreon @@ -1,25 +1,28 @@ -#! /usr/bin/perl +#! /usr/bin/perl -w +################################################################### +# Oreon is developped with GPL Licence 2.0 # -# $Id: check_graph_nt.pl,v 1.3 2005/08/01 18:04:00 gollum123 Exp $ +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt # -# Oreon's plugins are developped with GPL Licence : -# http://www.fsf.org/licenses/gpl.txt -# Developped by : Julien Mathis - Mathieu Mettre -# Under control of Flavien Astraud, Jerome Landrieu for Epitech. -# Oreon's plugins are developped in partnership with Linagora company. +# Developped by : Julien Mathis - Romain Le Merlus +# Mathavarajan Sugumaran # -# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Plugin init # -# The Software is provided to you AS IS and WITH ALL FAULTS. -# OREON 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 -# been previously advised of the possibility of such damages. - -## Plugin init use strict; use FindBin; @@ -336,9 +339,10 @@ sub print_usage () { } sub print_help () { - print "Copyright (c) 2004 OREON\n"; - print "Bugs to http://www.oreon.org/\n"; - print "\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; print_usage(); print "\n"; } diff --git a/centreon-plugins/src/oreon.conf b/centreon-plugins/src/oreon.conf index 0a8a6b0a2..ae06955df 100644 --- a/centreon-plugins/src/oreon.conf +++ b/centreon-plugins/src/oreon.conf @@ -45,5 +45,6 @@ IF_SPEED=.1.3.6.1.2.1.2.2.1.5 IF_DESC=.1.3.6.1.2.1.2.2.1.2 IF_IN_ERROR=.1.3.6.1.2.1.2.2.1.14 IF_OUT_ERROR=.1.3.6.1.2.1.2.2.1.20 +IF_OPERSTATUS=.1.3.6.1.2.1.2.2.1.8 diff --git a/centreon-plugins/src/process-service-perfdata b/centreon-plugins/src/process-service-perfdata index 471f9b784..0e17494ec 100644 --- a/centreon-plugins/src/process-service-perfdata +++ b/centreon-plugins/src/process-service-perfdata @@ -1,3 +1,28 @@ +################################################################### +# Oreon is developped with GPL Licence 2.0 +# +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +# +# Developped by : Julien Mathis - Romain Le Merlus +# Christophe Coraboeuf - Sugumaran Mathavarajan +# +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Script init +# + # some parameters passed on command line TIMET=$1 HOSTNAME=$2 diff --git a/centreon-plugins/src/submit_host_check_result b/centreon-plugins/src/submit_host_check_result index 801d5f325..6b26fd144 100644 --- a/centreon-plugins/src/submit_host_check_result +++ b/centreon-plugins/src/submit_host_check_result @@ -1,4 +1,28 @@ #!/bin/sh +################################################################### +# Oreon is developped with GPL Licence 2.0 +# +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +# +# Developped by : Julien Mathis - Romain Le Merlus +# Christophe Coraboeuf - Sugumaran Mathavarajan +# +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Script init +# # Arguments: # $1 = host_name (Short name of host that the service is @@ -29,6 +53,4 @@ esac # Test everything works fine -#/usr/bin/printf "%s\t%s\t%s\n" "$1" "$2" "$3" >> /tmp/test - /usr/bin/printf "%s\t%s\t%s\n" "$1" "$return_code" "$3" | /usr/sbin/send_nsca IP -p PORT -c /etc/send_nsca.cfg diff --git a/centreon-plugins/src/submit_service_check_result b/centreon-plugins/src/submit_service_check_result index 48fdfc0e6..f5b888a90 100644 --- a/centreon-plugins/src/submit_service_check_result +++ b/centreon-plugins/src/submit_service_check_result @@ -1,4 +1,28 @@ #!/bin/sh +################################################################### +# Oreon is developped with GPL Licence 2.0 +# +# GPL License: http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +# +# Developped by : Julien Mathis - Romain Le Merlus +# Christophe Coraboeuf - Sugumaran Mathavarajan +# +################################################################### +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# For information : contact@merethis.com +#################################################################### +# +# Script init +# # Arguments: # $1 = host_name (Short name of host that the service is @@ -33,6 +57,4 @@ esac # Test everything works fine -#/usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$3" "$4" >> /tmp/test - /usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$return_code" "$4" | /usr/sbin/send_nsca IP -p PORT -c /etc/send_nsca.cfg