change footer links and add header for synchro scripts
git-svn-id: http://svn.centreon.com/Plugins/Dev@2815 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
639116b9b2
commit
90b77004a6
|
@ -1,24 +1,28 @@
|
||||||
#! /usr/bin/perl -w
|
#! /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:
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# 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 strict;
|
||||||
use Net::SNMP qw(:snmp);
|
use Net::SNMP qw(:snmp);
|
||||||
use FindBin;
|
use FindBin;
|
||||||
|
@ -130,11 +134,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "#=========================================\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2005 Merethis SARL =\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Developped by Julien Mathis =\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ =\n";
|
print "##############################################\n";
|
||||||
print "#=========================================\n";
|
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -1,23 +1,25 @@
|
||||||
#! /usr/bin/perl -w
|
#! /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 :
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# Mathavarajan Sugumaran
|
||||||
# Developped by : Julien Mathis - Romain Le Merlus - Sugumaran Mat
|
|
||||||
#
|
#
|
||||||
# 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.
|
# This program is distributed in the hope that it will be useful,
|
||||||
# OREON makes no representation and gives no warranty whatsoever,
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# whether express or implied, and without limitation, with regard to the quality,
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# safety, contents, performance, merchantability, non-infringement or suitability for
|
# GNU General Public License for more details.
|
||||||
# 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,
|
# For information : contact@merethis.com
|
||||||
# incidental or consequential damages however they may arise and even if OREON has
|
####################################################################
|
||||||
# been previously advised of the possibility of such damages.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Plugin init
|
# Plugin init
|
||||||
#
|
#
|
||||||
|
@ -81,10 +83,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "##########################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2006 Oreon #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "##########################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -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";
|
|
||||||
}
|
|
|
@ -1,26 +1,29 @@
|
||||||
#! /usr/bin/perl -w
|
#! /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 :
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# Mathavarajan Sugumaran
|
||||||
# Developped by : Julien Mathis - Mathieu Mettre
|
|
||||||
#
|
#
|
||||||
# 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 strict;
|
||||||
use FindBin;
|
use FindBin;
|
||||||
use lib "$FindBin::Bin";
|
use lib "$FindBin::Bin";
|
||||||
|
@ -153,15 +156,13 @@ if ($op_v) {
|
||||||
if ($op_t) {$op_t = "-t ".$op_t;} else { $op_t = " ";}
|
if ($op_t) {$op_t = "-t ".$op_t;} else { $op_t = " ";}
|
||||||
if ($op_s) {$op_s = "-s ".$op_s;} else { $op_s = " ";}
|
if ($op_s) {$op_s = "-s ".$op_s;} else { $op_s = " ";}
|
||||||
if ($op_d) {$op_d = "-d ".$op_d;} else { $op_d = " ";}
|
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`;
|
$_ = `$pathtolibexecnt -H $opt_H $op_v $port $warning $critical $op_l $op_t $op_s $op_d 2>/dev/null`;
|
||||||
my $return = $_;
|
my $return = $_;
|
||||||
$return =~ s/\\//g;
|
$return =~ s/\\//g;
|
||||||
$return_code = $? / 256;
|
$return_code = $? / 256;
|
||||||
|
|
||||||
##
|
# CLIENTVERSION
|
||||||
## CLIENTVERSION
|
#
|
||||||
##
|
|
||||||
if ($op_v =~ /CLIENTVERSION/){
|
if ($op_v =~ /CLIENTVERSION/){
|
||||||
print "CLIENTVERSION impossible to Graph!\n";
|
print "CLIENTVERSION impossible to Graph!\n";
|
||||||
exit $ERRORS{'UNKNOWN'};
|
exit $ERRORS{'UNKNOWN'};
|
||||||
|
@ -328,9 +329,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "Copyright (c) 2004 OREON\n";
|
print "##############################################\n";
|
||||||
print "Bugs to http://www.oreon.org/\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -1,23 +1,25 @@
|
||||||
#! /usr/bin/perl -w
|
#! /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 :
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# Mathavarajan Sugumaran
|
||||||
# Developped by : Julien Mathis - Romain Le Merlus - Sugumaran Mat
|
|
||||||
#
|
#
|
||||||
# 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.
|
# This program is distributed in the hope that it will be useful,
|
||||||
# OREON makes no representation and gives no warranty whatsoever,
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# whether express or implied, and without limitation, with regard to the quality,
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# safety, contents, performance, merchantability, non-infringement or suitability for
|
# GNU General Public License for more details.
|
||||||
# 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,
|
# For information : contact@merethis.com
|
||||||
# incidental or consequential damages however they may arise and even if OREON has
|
####################################################################
|
||||||
# been previously advised of the possibility of such damages.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Plugin init
|
# 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++) {
|
for (my $i = 0; $i < scalar(@nb_in_errors); $i++) {
|
||||||
if (-e "/tmp/packet_errors_if".$i."_".$opt_H.".tmp") {
|
if (-e "/tmp/packet_errors_if".$i."_".$opt_H.".tmp") {
|
||||||
open(FILE,"<"."/tmp/packet_errors_if".$i."_".$opt_H.".tmp");
|
open(FILE,"<"."/tmp/packet_errors_if".$i."_".$opt_H.".tmp");
|
||||||
while($row = <FILE>){
|
while($row = <FILE>){
|
||||||
my @last_values = split(":",$row);
|
my @last_values = split(":",$row);
|
||||||
$last_check_time[$i] = $last_values[0];
|
$last_check_time[$i] = $last_values[0];
|
||||||
$last_in_errors[$i] = $last_values[1];
|
$last_in_errors[$i] = $last_values[1];
|
||||||
$last_out_errors[$i] = $last_values[2];
|
$last_out_errors[$i] = $last_values[2];
|
||||||
$flg_created[$i] = 1;
|
$flg_created[$i] = 1;
|
||||||
}
|
}
|
||||||
close(FILE);
|
close(FILE);
|
||||||
} else {
|
} else {
|
||||||
$flg_created[$i] = 0;
|
$flg_created[$i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_time = time;
|
$update_time = time;
|
||||||
|
|
||||||
unless (open(FILE,">"."/tmp/packet_errors_if".$i."_".$opt_H.".tmp")){
|
unless (open(FILE,">"."/tmp/packet_errors_if".$i."_".$opt_H.".tmp")){
|
||||||
print "Unknown - /tmp/tmp/packet_errors_if".$i."_".$opt_H.".tmp!\n";
|
print "Unknown - /tmp/tmp/packet_errors_if".$i."_".$opt_H.".tmp!\n";
|
||||||
exit $ERRORS{"UNKNOWN"};
|
exit $ERRORS{"UNKNOWN"};
|
||||||
}
|
}
|
||||||
print FILE "$update_time:$nb_in_errors[$i]:$nb_out_errors[$i]";
|
print FILE "$update_time:$nb_in_errors[$i]:$nb_out_errors[$i]";
|
||||||
close(FILE);
|
close(FILE);
|
||||||
if ($flg_created[$i] eq 0){
|
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++) {
|
for (my $i = 0; $i < scalar(@nb_in_errors); $i++) {
|
||||||
my $interface = $i+1;
|
my $interface = $i+1;
|
||||||
if ($flg_created[$i]) {
|
if ($flg_created[$i]) {
|
||||||
if (($nb_in_errors[$i] - $last_in_errors[$i] >= $critical) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $critical)){
|
if (($nb_in_errors[$i] - $last_in_errors[$i] >= $critical) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $critical)){
|
||||||
$msg[$i] = "$interface:critical ";
|
$msg[$i] = "$interface:critical ";
|
||||||
$status = "CRITICAL";
|
$status = "CRITICAL";
|
||||||
}
|
}
|
||||||
if(($nb_in_errors[$i] - $last_in_errors[$i] >= $warning) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $warning)){
|
if (($nb_in_errors[$i] - $last_in_errors[$i] >= $warning) or ($nb_out_errors[$i] - $last_out_errors[$i] >= $warning)){
|
||||||
if (!defined($msg[$i])) {
|
if (!defined($msg[$i])) {
|
||||||
$msg[$i] = "$interface:warning ";
|
$msg[$i] = "$interface:warning ";
|
||||||
}
|
}
|
||||||
if ($status ne "CRITICAL") {
|
if ($status ne "CRITICAL") {
|
||||||
$status = "WARNING";
|
$status = "WARNING";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$diff_test = 1;
|
$diff_test = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +214,7 @@ for (my $i = 0; $i < scalar (@msg); $i++) {
|
||||||
}
|
}
|
||||||
if ($output ne ""){
|
if ($output ne ""){
|
||||||
print $output."\n";
|
print $output."\n";
|
||||||
}else {
|
} else {
|
||||||
print "Status OK on all interfaces\n";
|
print "Status OK on all interfaces\n";
|
||||||
}
|
}
|
||||||
exit($ERRORS{$status});
|
exit($ERRORS{$status});
|
||||||
|
@ -231,13 +232,13 @@ exit($ERRORS{$status});
|
||||||
print " (default 100)\n";
|
print " (default 100)\n";
|
||||||
print " -V (--version) Plugin version\n";
|
print " -V (--version) Plugin version\n";
|
||||||
print " -h (--help) usage help\n";
|
print " -h (--help) usage help\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "##########################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2006 Oreon #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "##########################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -1,23 +1,25 @@
|
||||||
#! /usr/bin/perl -w
|
#! /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 :
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# Mathavarajan Sugumaran
|
||||||
# Developped by : Julien Mathis - Mathieu Mettre - Romain Le Merlus
|
|
||||||
#
|
#
|
||||||
# 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.
|
# This program is distributed in the hope that it will be useful,
|
||||||
# OREON makes no representation and gives no warranty whatsoever,
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# whether express or implied, and without limitation, with regard to the quality,
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# safety, contents, performance, merchantability, non-infringement or suitability for
|
# GNU General Public License for more details.
|
||||||
# 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,
|
# For information : contact@merethis.com
|
||||||
# incidental or consequential damages however they may arise and even if OREON has
|
####################################################################
|
||||||
# been previously advised of the possibility of such damages.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Plugin init
|
# Plugin init
|
||||||
#
|
#
|
||||||
|
@ -192,10 +194,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2006 Oreon-project #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -193,11 +193,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2007 Oreon-project #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,12 +199,11 @@ sub print_usage () {
|
||||||
print " -V (--version) Plugin version\n";
|
print " -V (--version) Plugin version\n";
|
||||||
print " -h (--help) usage help\n";
|
print " -h (--help) usage help\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2007 Oreon-project #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -321,11 +321,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2007 Oreon-project #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,10 +461,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2007 Oreon-project #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -1,28 +1,28 @@
|
||||||
#! /usr/bin/perl -w
|
#! /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:
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# Mathavarajan Sugumaran
|
||||||
|
#
|
||||||
# Developped by Linagora SA: http://www.linagora.com
|
###################################################################
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
# Modified for Oreon Project by : Mathieu Chateau - Christophe Coraboeuf
|
# modify it under the terms of the GNU General Public License
|
||||||
# Modified For Oreon compatibility by Julien Mathis - Sugumaran mathavarajan For Merethis
|
# 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 strict;
|
||||||
use Net::SNMP qw(:snmp);
|
use Net::SNMP qw(:snmp);
|
||||||
use FindBin;
|
use FindBin;
|
||||||
|
@ -80,10 +80,8 @@ my $name = $0;
|
||||||
$name =~ s/\.pl.*//g;
|
$name =~ s/\.pl.*//g;
|
||||||
my $day = 0;
|
my $day = 0;
|
||||||
|
|
||||||
##
|
|
||||||
## Plugin snmp requests
|
|
||||||
##
|
|
||||||
|
|
||||||
|
# Plugin snmp requests
|
||||||
my $OID_OBJECTID =$oreon{MIB2}{OBJECTID};
|
my $OID_OBJECTID =$oreon{MIB2}{OBJECTID};
|
||||||
my $OID_UPTIME_WINDOWS =$oreon{MIB2}{UPTIME_WINDOWS};
|
my $OID_UPTIME_WINDOWS =$oreon{MIB2}{UPTIME_WINDOWS};
|
||||||
my $OID_UPTIME_OTHER =$oreon{MIB2}{UPTIME_OTHER};
|
my $OID_UPTIME_OTHER =$oreon{MIB2}{UPTIME_OTHER};
|
||||||
|
@ -95,9 +93,7 @@ if ( !defined($session) ) {
|
||||||
exit $ERRORS{'CRITICAL'};
|
exit $ERRORS{'CRITICAL'};
|
||||||
}
|
}
|
||||||
|
|
||||||
my $result = $session->get_request(
|
my $result = $session->get_request(-varbindlist => [$OID_OBJECTID]);
|
||||||
-varbindlist => [$OID_OBJECTID]
|
|
||||||
);
|
|
||||||
if (!defined($result)) {
|
if (!defined($result)) {
|
||||||
printf("UNKNOWN: %s.\n", $session->error);
|
printf("UNKNOWN: %s.\n", $session->error);
|
||||||
$session->close;
|
$session->close;
|
||||||
|
@ -112,9 +108,7 @@ if ($return_result =~ /.*Windows.*/i ) {
|
||||||
$OID = $OID_UPTIME_OTHER;
|
$OID = $OID_UPTIME_OTHER;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $session->get_request(
|
$result = $session->get_request(-varbindlist => [$OID]);
|
||||||
-varbindlist => [$OID]
|
|
||||||
);
|
|
||||||
if (!defined($result)) {
|
if (!defined($result)) {
|
||||||
printf("UNKNOWN: %s.\n", $session->error);
|
printf("UNKNOWN: %s.\n", $session->error);
|
||||||
$session->close;
|
$session->close;
|
||||||
|
@ -125,24 +119,18 @@ my $un = 0;
|
||||||
|
|
||||||
$return_result = $result->{$OID};
|
$return_result = $result->{$OID};
|
||||||
if ( $return_result =~ m/(\d*) day[s]?,\s*(\d*):(\d*):(\d*).(\d*)/ ) {
|
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;
|
$un = $5 + $4 * 100 + $3 * 100 * 60 + $2 * 100 * 60 * 60 + $1 * 100 * 60 * 60 * 24;
|
||||||
$day = $1;
|
$day = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $return_result =~ m/(\d*) hour.*(\d*):(\d*).(\d*)/ ) {
|
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) {
|
if ($opt_d) {
|
||||||
$un = $day;
|
$un = $day;
|
||||||
}
|
}
|
||||||
|
|
||||||
#print "un : $un\n";
|
|
||||||
|
|
||||||
##
|
|
||||||
## Plugin return code
|
|
||||||
##
|
|
||||||
|
|
||||||
if ($un || ( $un == 0) ){
|
if ($un || ( $un == 0) ){
|
||||||
if ($opt_d) {
|
if ($opt_d) {
|
||||||
print "OK - Uptime (in day): $un|uptime=".$un."hs\n";
|
print "OK - Uptime (in day): $un|uptime=".$un."hs\n";
|
||||||
|
@ -172,10 +160,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "Copyright (c) 2005 Linagora\n";
|
print "##############################################\n";
|
||||||
print "Modified by Merethis \n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "Bugs to http://www.linagora.com/\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -195,10 +195,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print "# Copyright (c) 2004-2007 Oreon-project #\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# Bugs to http://www.oreon-project.org/ #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "######################################################\n";
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,28 @@
|
||||||
#! /usr/bin/perl -w
|
#! /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 :
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# Mathavarajan Sugumaran
|
||||||
# Developped by : Julien Mathis - Romain Le Merlus
|
|
||||||
#
|
#
|
||||||
# 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 strict;
|
||||||
use DBI;
|
use DBI;
|
||||||
|
@ -393,14 +396,11 @@ sub print_usage () {
|
||||||
print " -h (--help) usage help\n";
|
print " -h (--help) usage help\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help ()
|
sub print_help () {
|
||||||
{
|
print "##############################################\n";
|
||||||
print "###########################################\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "# #\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
print "# Copyright (c) 2004-2007 Merethis #\n";
|
print "##############################################\n";
|
||||||
print "# Bugs to http://www.oreon-services.com #\n";
|
|
||||||
print "# #\n";
|
|
||||||
print "###########################################\n";
|
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
|
@ -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 :
|
# Developped by : Julien Mathis - Romain Le Merlus
|
||||||
# http://www.fsf.org/licenses/gpl.txt
|
# Mathavarajan Sugumaran
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
# 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 strict;
|
||||||
use FindBin;
|
use FindBin;
|
||||||
|
@ -336,9 +339,10 @@ sub print_usage () {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub print_help () {
|
sub print_help () {
|
||||||
print "Copyright (c) 2004 OREON\n";
|
print "##############################################\n";
|
||||||
print "Bugs to http://www.oreon.org/\n";
|
print "# Copyright (c) 2004-2007 Centreon #\n";
|
||||||
print "\n";
|
print "# Bugs to http://bugs.oreon-project.org/ #\n";
|
||||||
|
print "##############################################\n";
|
||||||
print_usage();
|
print_usage();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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_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_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_OUT_ERROR=.1.3.6.1.2.1.2.2.1.20
|
||||||
|
IF_OPERSTATUS=.1.3.6.1.2.1.2.2.1.8
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
# some parameters passed on command line
|
||||||
TIMET=$1
|
TIMET=$1
|
||||||
HOSTNAME=$2
|
HOSTNAME=$2
|
||||||
|
|
|
@ -1,4 +1,28 @@
|
||||||
#!/bin/sh
|
#!/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:
|
# Arguments:
|
||||||
# $1 = host_name (Short name of host that the service is
|
# $1 = host_name (Short name of host that the service is
|
||||||
|
@ -29,6 +53,4 @@
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Test everything works fine
|
# 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
|
/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
|
||||||
|
|
|
@ -1,4 +1,28 @@
|
||||||
#!/bin/sh
|
#!/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:
|
# Arguments:
|
||||||
# $1 = host_name (Short name of host that the service is
|
# $1 = host_name (Short name of host that the service is
|
||||||
|
@ -33,6 +57,4 @@
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Test everything works fine
|
# 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
|
/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
|
||||||
|
|
Loading…
Reference in New Issue