From e6a1822d8e75c7a11610a29c62a23dbaae05ff81 Mon Sep 17 00:00:00 2001 From: Julien Mathis Date: Wed, 24 Feb 2010 11:05:19 +0000 Subject: [PATCH] change usage and copyright date git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@10069 6bcd3966-0018-0410-8128-fd23d134de7e --- centreon-plugins/src/centreon.pm | 2 +- .../src/check_centreon_MS_multiple_services | 6 +- centreon-plugins/src/check_centreon_dummy | 6 +- centreon-plugins/src/check_centreon_nt | 365 ------------------ centreon-plugins/src/check_centreon_ping | 6 +- .../src/check_centreon_snmp_TcpConn | 6 +- centreon-plugins/src/check_centreon_snmp_cpu | 4 +- .../src/check_centreon_snmp_loadaverage | 8 +- .../src/check_centreon_snmp_memory | 13 +- .../src/check_centreon_snmp_multiple_process | 8 +- .../src/check_centreon_snmp_packetErrors | 8 +- .../src/check_centreon_snmp_process | 10 +- .../src/check_centreon_snmp_remote_storage | 4 +- .../src/check_centreon_snmp_traffic | 9 +- .../src/check_centreon_snmp_uptime | 6 +- .../src/check_centreon_snmp_value | 6 +- centreon-plugins/src/check_meta_service | 2 +- centreon-plugins/src/process-service-perfdata | 2 +- centreon-plugins/src/submit_host_check_result | 2 +- .../src/submit_service_check_result | 2 +- 20 files changed, 56 insertions(+), 419 deletions(-) delete mode 100644 centreon-plugins/src/check_centreon_nt diff --git a/centreon-plugins/src/centreon.pm b/centreon-plugins/src/centreon.pm index a4b90a6e9..42a41516d 100644 --- a/centreon-plugins/src/centreon.pm +++ b/centreon-plugins/src/centreon.pm @@ -1,5 +1,5 @@ ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # diff --git a/centreon-plugins/src/check_centreon_MS_multiple_services b/centreon-plugins/src/check_centreon_MS_multiple_services index bc96c81a5..dc40ad8c0 100644 --- a/centreon-plugins/src/check_centreon_MS_multiple_services +++ b/centreon-plugins/src/check_centreon_MS_multiple_services @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -254,8 +254,8 @@ sub print_usage () { } sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_dummy b/centreon-plugins/src/check_centreon_dummy index 0fd813648..50af59aab 100644 --- a/centreon-plugins/src/check_centreon_dummy +++ b/centreon-plugins/src/check_centreon_dummy @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -99,8 +99,8 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_nt b/centreon-plugins/src/check_centreon_nt deleted file mode 100644 index 444848dde..000000000 --- a/centreon-plugins/src/check_centreon_nt +++ /dev/null @@ -1,365 +0,0 @@ -#! /usr/bin/perl -################################################################################ -# Copyright 2005-2009 MERETHIS -# Centreon is developped by : Julien Mathis and Romain Le Merlus under -# GPL Licence 2.0. -# -# 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, see . -# -# Linking this program statically or dynamically with other modules is making a -# combined work based on this program. Thus, the terms and conditions of the GNU -# General Public License cover the whole combination. -# -# As a special exception, the copyright holders of this program give MERETHIS -# permission to link this program with independent modules to produce an executable, -# regardless of the license terms of these independent modules, and to copy and -# distribute the resulting executable under terms of MERETHIS choice, provided that -# MERETHIS also meet, for each linked independent module, the terms and conditions -# of the license of that module. An independent module is a module which is not -# derived from this program. If you modify this program, you may extend this -# exception to your version of the program, but you are not obliged to do so. If you -# do not wish to do so, delete this exception statement from your version. -# -# For more information : contact@centreon.com -# -# SVN : $URL$ -# SVN : $Id$ -# -#################################################################################### -# -# Plugin init -# - -use strict; -use FindBin; -use lib "$FindBin::Bin"; -use lib "@NAGIOS_PLUGINS@"; -use utils qw($TIMEOUT %ERRORS &print_revision &support); - -use vars qw($PROGNAME); -use Getopt::Long; -use vars qw($opt_H $opt_p $opt_s $opt_v $opt_V $opt_h $opt_w $opt_c $opt_t $opt_l $opt_d $opt_D $opt_f); - -# -# Plugin var init -# - -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); -$PROGNAME = "$0"; -sub print_help (); -sub print_usage (); - -Getopt::Long::Configure('bundling'); -GetOptions - ("h" => \$opt_h, "help" => \$opt_h, - "p=s" => \$opt_p, "port=s" => \$opt_p, - "V" => \$opt_V, "version" => \$opt_V, - "s=s" => \$opt_s, "password=s" => \$opt_s, - "d=s" => \$opt_d, "showall=s" => \$opt_d, - "v=s" => \$opt_v, "variable=s" => \$opt_v, - "D=s" => \$opt_D, "directory=s" => \$opt_D, - "t=s" => \$opt_t, "timeout=s" => \$opt_t, - "l:s" => \$opt_l, "parameter:s" => \$opt_l, - "w=s" => \$opt_w, "warning=s" => \$opt_w, - "c=s" => \$opt_c, "critical=s" => \$opt_c, - "H=s" => \$opt_H, "hostname=s" => \$opt_H); - -if ($opt_h) { - print_help(); - exit $ERRORS{'OK'}; -} - -if ($opt_V) { - $_ = `$pathtolibexecnt -V`; - print "$_"; - exit $ERRORS{'OK'}; -} - -if ($opt_p) { - if ($opt_p =~ /([0-9]+)/){ - $port = $1; - } else { - print "Unknown -p : number expected... \n"; - exit $ERRORS{'UNKNOWN'}; - } -} - -$opt_H = shift unless ($opt_H); -(print_usage() && exit $ERRORS{'OK'}) unless ($opt_H); - -if ($opt_c) { - ($opt_c) || ($opt_c = shift); - $critical = $1 if ($opt_c =~ /([0-9]+)/); -} - -if ($opt_w) { - ($opt_w) || ($opt_w = shift); - $warning = $1 if ($opt_w =~ /([0-9]+)/); -} - -if (($critical && $warning) && ($critical <= $warning)) { - print "(--crit) must be superior to (--warn)"; - exit $ERRORS{'OK'}; -} - - -if ($opt_t) { - ($opt_t) || ($opt_t = shift); - $op_t = $1 if ($opt_t =~ /([-\.,\w]+)/); -} - -if ($opt_l) { - ($opt_l) || ($opt_l = shift); - $op_l = $1 if ($opt_l =~ /(.+)/); -} - -if ($opt_s) { - ($opt_s) || ($opt_s = shift); - $op_s = $1 if ($opt_s =~ /([-.,A-Za-z0-9]+)/); -} - -if ($opt_d) { - ($opt_d) || ($opt_d = shift); - $op_d = $1 if ($opt_d =~ /([-.,A-Za-z0-9]+)/); -} - -if ($opt_v) { - ($opt_v) || ($opt_v = shift); - $op_v = $1 if ($opt_v =~ /([-.,A-Za-z0-9]+)/); -} - -my $name = $0; -$name =~ s/\.pl.*//g; -my $return_code; - -# -# Plugin requests -# - -my $start=time; -if ($op_v) { - if ($op_v) {$op_v = "-v ".$op_v;} - if ($port) {$port = "-p ".$port;} else { $port = " ";} - if ($warning) {$warning = "-w ".$warning;} else { $warning = " ";} - if ($critical) {$critical = "-c ".$critical;} else { $critical = " ";} - if ($op_l) {$op_l = "-l \"".$op_l ."\"";} else { $op_l = " ";} - 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 = " ";} - $_ = `$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 - # - if ($op_v =~ /CLIENTVERSION/){ - print "CLIENTVERSION impossible to Graph!\n"; - exit $ERRORS{'UNKNOWN'}; - } - - if (($op_v =~ /CPULOAD/) && ($op_l =~ /([-\.,\w]+)/)){ ## CPULOAD - @output = split(/\|/,$_); - @values = $output[0] =~ /(\d*)\%/g ; - $start = time; - ## Print Plugins Output - - $start = time(); - @output = split(/\|/, $_); - $return = $output[0]; - @values = $output[1] =~ /\'([0-9]*)\ [a-zA-Z\ 0-9]*\'=(\d*)\%\;([0-9]*);([0-9]*);([0-9]*);([0-9]*)/g; - my $i = 0; - my $perfdata = ""; - foreach (@values){ - if ($i%6 == 0){ - $perfdata .= " cpu".$_."="; - } elsif ($i%6 == 1) { - $perfdata .= $_."%"; - } else { - $perfdata .= ";".$_; - } - $i++; - } - $perfdata .= "\n"; - $return =~ s/\n/ /g; - print $return."|".$perfdata; - exit $return_code; - } elsif ($op_v =~ /UPTIME/){ ## UPTIME - if ($_ =~ /.*[-:]+\s(\d+)\s.*$/ ) { - $uptime = $1; - } else { - print "unable to parse check_nt output: $_\n" ; - exit $ERRORS{'UNKNOWN'}; - } - $_ =~ s/\n/ /g; - if (defined($uptime)){ - print $_ . "|uptime=".$uptime."d\n"; - } else { - print $_ . "\n"; - } - exit $return_code; - } elsif (($op_v =~ /USEDDISKSPACE/) && ($op_l =~ /([-\.,\w]+)/)){ ## USEDDISKSPACE - my @test = split(/ /,$_); - if (defined($test[9]) && defined($test2[1])){ - @test2 = split(/\(/, $test[9]); - @test3 = split(/\%/, $test2[1]); - } - @c = split(/ /, $critical); - $critical = $c[1]; - @w = split(/ /, $warning); - $warning = $w[1]; - ## Print Plugins Output - $return =~ s/\n/ /g; - my @tab_return = split(/\|/, $return); - if ($test[4] =~ "Mb"){ - $test[3] = $test[3] * 1024 * 1024; - $test[7] = $test[7] * 1024 * 1024; - } elsif ($test[4] =~ "Gb"){ - $test[3] = $test[3] * 1024 * 1024 * 1024; - $test[7] = $test[7] * 1024 * 1024 * 1024; - } - if (defined($test[3]) && defined($test[7]) && defined($test[12])){ - print $tab_return[0]."|size=".$test[3]."o used=".$test[7]."o\n"; - } else { - print $tab_return[0]."\n"; - } - exit $return_code; - } elsif ($op_v =~ /MEMUSE/){ ## MEMUSE - $start=time; - my @test = split(/ /,$_); - if (defined($test[2])){ - @test4 = split(/:/, $test[2]); - } - @c = split(/ /, $critical); - $critical = $c[1]; - @w = split(/ /, $warning); - $warning = $w[1]; - - ## Print Plugins Output - if (defined($test[3]) && $test[3] =~ "Mb"){ - $test4[1] = $test4[1] * 1024 * 1024; - $test[6] = $test[6] * 1024 * 1024; - } elsif (defined($test[3]) && $test[3] =~ "Gb"){ - $test4[1] = $test4[1] * 1024 * 1024 * 1024; - $test[6] = $test[6] * 1024 * 1024 * 1024; - } - my @tab_return = split(/\|/, $return); - $tab_return[0] =~ s/\n/ /g; - if ($test4[1] && $test[6] && $test[11]){ - print $tab_return[0]."|total=".$test4[1]."o used=".$test[6]."o\n"; - } else { - print $tab_return[0]."\n"; - } - exit $return_code; - } elsif ($op_v =~ /SERVICESTATE/){## SERVICESTATE - my (@tab, $process, $nom, $etat); - @tab = split (' - ',$_); - foreach $process (@tab) { - ($nom,$etat) = split (': ', $process); - if (defined($etat)) { - $etat =~ s/\n//; - } else { - $etat = "Unknow"; - } - if ($etat =~ /Started/) - {$etat=1;} - elsif ($etat =~ /Stopped/) - {$etat=0;} - elsif ($etat =~ /Unknown/) - {$etat=-1;} - else { - print "Unable to get $nom status [$etat]: \n\t$_\n"; - exit $ERRORS{'UNKNOWN'}; - } - } - $return =~ s/%/ pct/g; - print $return; - exit $return_code; - } elsif ($op_v =~ /PROCSTATE/){## PROCSTATE - print "PROCSTATE not graphed\n"; - exit $ERRORS{'UNKNOWN'}; - } elsif (($op_v =~ /COUNTER/) && ($op_l =~ /(.+)/)) { ## COUNTER - @output = split(/\|/,$_); - @values = $output[0] =~ /([,\.\d]*)\s?\%/ ; - if (!@values) {@values = $output[0] =~ /([\d]*)/;} - $start=time; - ## Print Plugins Output - $return =~ s/\n/ /g; - $return =~ s/%/ pct/g; - print $return . "|counter=".@values."\n"; - exit $return_code; - } -} else { - print "Could not parse arguments\n"; - exit $ERRORS{'UNKNOWN'}; -} - -## -## Plugin return code -## - -sub print_usage () { - print "\nUsage:\n"; - print "$PROGNAME\n"; - print " Usage: check_centreon_nt -H host -v variable [-p port] [-s password] [-w warning] [-c critical] [-l params] [-d SHOWALL] [-t timeout] \n"; - print " Options:\n"; - print " -H, --hostname=HOST\n"; - print " Name of the host to check\n"; - print " -p, --port=INTEGER\n"; - print " Optional port number (default: 1248)\n"; - print " -s \n"; - print " Password needed for the request\n"; - print " -v, --variable=STRING\n"; - print " Variable to check. Valid variables are:\n"; - print " CLIENTVERSION = Not Graphed. Get the NSClient version\n"; - print " CPULOAD = Average CPU load on last x minutes. Request a -l parameter with the following syntax:\n"; - print " -l ,,. should be less than 24*60.\n"; - print " Thresholds are percentage and up to 10 requests can be done in one shot. ie: -l 60,90,95,120,90,95\n"; - print " and 4 requests can be graphed.\n"; - print " UPTIME = Only Days are graphed. Get the uptime of the machine. No specific parameters. No warning or critical threshold.\n"; - print " USEDDISKSPACE = Size and percentage of disk use. Request a -l parameter containing the drive letter only.\n"; - print " Warning and critical thresholds can be specified with -w and -c.\n"; - print " MEMUSE = Memory use. Warning and critical thresholds can be specified with -w and -c.\n"; - print " SERVICESTATE = Check and graph the state of one service. Request a -l parameters with the following syntax:\n"; - print " -l ... You MUST specify -d SHOWALL in the input command.\n"; - print " 1: Service Started - 0: Service Stopped - -1: Service Unknown.\n"; -# print " SERVICESTATE = Not Graphed. Check the state of one or several services. Request a -l parameters with the following syntax:\n"; -# print " -l ,,,... You can specify -d SHOWALL in case you want to see working services\n"; -# print " in the returned string.\n"; - print " PROCSTATE = Not Graphed. Check if one or several process are running. Same syntax as SERVICESTATE.\n"; - print " COUNTER = Check any performance counter of Windows NT/2000. Request a -l parameters with the following syntax:\n"; - print " -l \"counter\",\"\" The parameter is optional and\n"; - print " is given to a printf output command which require a float parameters. Some examples:\n"; - print " \"Paging file usage is %.2f %%\" or \"%.f %% paging file used.\"\n"; - print " -w, --warning=INTEGER\n"; - print " Threshold which will result in a warning status\n"; - print " -c, --critical=INTEGER\n"; - print " Threshold which will result in a critical status\n"; - print " -t, --timeout=INTEGER\n"; - print " Seconds before connection attempt times out (default: 10)\n"; - print " -h, --help\n"; - print " Print this help screen\n"; - print " -V, --version\n"; - print " Print version information\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 c02e44a80..a49a8ed6c 100644 --- a/centreon-plugins/src/check_centreon_ping +++ b/centreon-plugins/src/check_centreon_ping @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -208,8 +208,8 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_snmp_TcpConn b/centreon-plugins/src/check_centreon_snmp_TcpConn index 66e3bee9b..61f020464 100644 --- a/centreon-plugins/src/check_centreon_snmp_TcpConn +++ b/centreon-plugins/src/check_centreon_snmp_TcpConn @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -152,8 +152,8 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_snmp_cpu b/centreon-plugins/src/check_centreon_snmp_cpu index e82ed40b9..fbbb3ec2b 100644 --- a/centreon-plugins/src/check_centreon_snmp_cpu +++ b/centreon-plugins/src/check_centreon_snmp_cpu @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -237,7 +237,7 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2009 Merethis #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); diff --git a/centreon-plugins/src/check_centreon_snmp_loadaverage b/centreon-plugins/src/check_centreon_snmp_loadaverage index 881c35535..7cc442e21 100644 --- a/centreon-plugins/src/check_centreon_snmp_loadaverage +++ b/centreon-plugins/src/check_centreon_snmp_loadaverage @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -215,9 +215,9 @@ sub print_usage () { } sub print_help () { - print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_snmp_memory b/centreon-plugins/src/check_centreon_snmp_memory index 611338d1c..5f774e352 100644 --- a/centreon-plugins/src/check_centreon_snmp_memory +++ b/centreon-plugins/src/check_centreon_snmp_memory @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -279,11 +279,10 @@ sub print_usage () { } sub print_help () { - print "#=========================================\n"; - print "# Copyright (c) 2007-2009 Merethis SARL =\n"; - print "# Developped by Julien Mathis =\n"; - print "# Bugs to http://www.centreon.com =\n"; - print "#=========================================\n"; - print_usage(); + print "##############################################\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; + print "##############################################\n"; + print_usage(); print "\n"; } diff --git a/centreon-plugins/src/check_centreon_snmp_multiple_process b/centreon-plugins/src/check_centreon_snmp_multiple_process index 18de18d5c..53866edf8 100644 --- a/centreon-plugins/src/check_centreon_snmp_multiple_process +++ b/centreon-plugins/src/check_centreon_snmp_multiple_process @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -259,9 +259,9 @@ sub print_usage () { print " -h (--help) usage help\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 "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_snmp_packetErrors b/centreon-plugins/src/check_centreon_snmp_packetErrors index 14a7b056c..2a48014e6 100644 --- a/centreon-plugins/src/check_centreon_snmp_packetErrors +++ b/centreon-plugins/src/check_centreon_snmp_packetErrors @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -264,9 +264,9 @@ exit($ERRORS{$status}); } sub print_help () { - print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_snmp_process b/centreon-plugins/src/check_centreon_snmp_process index df05f2633..1a5542a2f 100644 --- a/centreon-plugins/src/check_centreon_snmp_process +++ b/centreon-plugins/src/check_centreon_snmp_process @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -232,10 +232,10 @@ sub print_usage () { print " -h (--help) usage help\n"; } sub print_help () { - print "######################################\n"; - print "# Copyright (c) 2004-2008 Centreon #\n"; - print "# Bugs to http://www.centreon.com/ #\n"; - print "######################################\n"; + print "##############################################\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\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 d05119497..e4a168168 100644 --- a/centreon-plugins/src/check_centreon_snmp_remote_storage +++ b/centreon-plugins/src/check_centreon_snmp_remote_storage @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -416,7 +416,7 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); diff --git a/centreon-plugins/src/check_centreon_snmp_traffic b/centreon-plugins/src/check_centreon_snmp_traffic index 675a4b5f5..229c59492 100644 --- a/centreon-plugins/src/check_centreon_snmp_traffic +++ b/centreon-plugins/src/check_centreon_snmp_traffic @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -488,9 +488,12 @@ if (($in_usage > $critical) or ($out_usage > $critical)){ $status = "CRITICAL"; } +my $warningBit = $warning * $speed_card / 100; +my $criticalBit = $critical * $speed_card / 100; + printf("Traffic In : %.2f ".$in_prefix."b/s (".$in_usage." %%), Out : %.2f ".$out_prefix."b/s (".$out_usage." %%) - ", $in_traffic, $out_traffic); printf("Total RX Bits In : %.2f ".$in_bits_unit."B, Out : %.2f ".$out_bits_unit."b", $in_bits, $out_bits); -printf("|traffic_in=".$in_perfparse_traffic_str."Bits/s;0;$speed_card traffic_out=".$out_perfparse_traffic_str."Bits/s;0;$speed_card\n"); +printf("|traffic_in=".$in_perfparse_traffic_str."Bits/s;$warningBit;$criticalBit;0;$speed_card traffic_out=".$out_perfparse_traffic_str."Bits/s;$warningBit;$criticalBit;0;$speed_card\n"); exit($ERRORS{$status}); sub print_usage () { @@ -517,7 +520,7 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2009 Centreon #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; print "# Bugs to http://trac.centreon.com #\n"; print "##############################################\n"; print_usage(); diff --git a/centreon-plugins/src/check_centreon_snmp_uptime b/centreon-plugins/src/check_centreon_snmp_uptime index e529fa764..0520bb51b 100644 --- a/centreon-plugins/src/check_centreon_snmp_uptime +++ b/centreon-plugins/src/check_centreon_snmp_uptime @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -180,8 +180,8 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_centreon_snmp_value b/centreon-plugins/src/check_centreon_snmp_value index 7ad84576f..6dfe58244 100644 --- a/centreon-plugins/src/check_centreon_snmp_value +++ b/centreon-plugins/src/check_centreon_snmp_value @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # @@ -211,8 +211,8 @@ sub print_usage () { sub print_help () { print "##############################################\n"; - print "# Copyright (c) 2004-2007 Centreon #\n"; - print "# Bugs to http://bugs.oreon-project.org/ #\n"; + print "# Copyright (c) 2004-2010 Centreon #\n"; + print "# Bugs to http://forge.centreon.com/ #\n"; print "##############################################\n"; print_usage(); print "\n"; diff --git a/centreon-plugins/src/check_meta_service b/centreon-plugins/src/check_meta_service index 1d7577495..51a98eb99 100644 --- a/centreon-plugins/src/check_meta_service +++ b/centreon-plugins/src/check_meta_service @@ -1,6 +1,6 @@ #! /usr/bin/perl -w ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # diff --git a/centreon-plugins/src/process-service-perfdata b/centreon-plugins/src/process-service-perfdata index 5b6bab38b..349c11c9f 100644 --- a/centreon-plugins/src/process-service-perfdata +++ b/centreon-plugins/src/process-service-perfdata @@ -1,6 +1,6 @@ #! /bin/sh ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # diff --git a/centreon-plugins/src/submit_host_check_result b/centreon-plugins/src/submit_host_check_result index 519dbc156..7b22b6f7f 100644 --- a/centreon-plugins/src/submit_host_check_result +++ b/centreon-plugins/src/submit_host_check_result @@ -1,6 +1,6 @@ #!/bin/sh ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. # diff --git a/centreon-plugins/src/submit_service_check_result b/centreon-plugins/src/submit_service_check_result index 1a7135bc0..7ae759a1f 100644 --- a/centreon-plugins/src/submit_service_check_result +++ b/centreon-plugins/src/submit_service_check_result @@ -1,6 +1,6 @@ #!/bin/sh ################################################################################ -# Copyright 2005-2009 MERETHIS +# Copyright 2004-2010 MERETHIS # Centreon is developped by : Julien Mathis and Romain Le Merlus under # GPL Licence 2.0. #