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
|
||||
###################################################################
|
||||
# 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";
|
||||
}
|
|
@ -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";
|
||||
}
|
|
@ -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
|
||||
###################################################################
|
||||
# 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";
|
||||
}
|
|
@ -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
|
||||
#
|
||||
|
@ -165,7 +167,6 @@ for (my $i = 0; $i < scalar(@nb_in_errors); $i++) {
|
|||
}
|
||||
|
||||
$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"};
|
||||
|
@ -234,10 +235,10 @@ exit($ERRORS{$status});
|
|||
}
|
||||
|
||||
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";
|
||||
}
|
|
@ -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";
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -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";
|
||||
}
|
|
@ -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;
|
||||
|
@ -137,12 +131,6 @@ 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";
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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
|
||||
# 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";
|
||||
}
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue