mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-25 14:44:43 +02:00
+centreon 2.5 compatibility
This commit is contained in:
parent
b16cb94a99
commit
2d65e5a098
@ -39,22 +39,22 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use DBI;
|
use DBI;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use vars qw($mysql_user $mysql_passwd $mysql_host $mysql_database_oreon $mysql_database_ods);
|
use vars qw($centreon_config);
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
# GLOBAL VARIABLES COMMON TO ALL PLUGINS
|
# GLOBAL VARIABLES COMMON TO ALL PLUGINS
|
||||||
########################################
|
########################################
|
||||||
|
|
||||||
my $PROGNAME = $0;
|
my $PROGNAME = $0;
|
||||||
my $VERSION = "2.4";
|
my $VERSION = "2.5";
|
||||||
my $MODIF_DATE = "03-14-2013";
|
my $MODIF_DATE = "07-22-2013";
|
||||||
|
|
||||||
my %ERRORS = ( "OK" => 0, "WARNING" => 1, "CRITICAL" => 2, "UNKNOWN" => 3);
|
my %ERRORS = ( "OK" => 0, "WARNING" => 1, "CRITICAL" => 2, "UNKNOWN" => 3);
|
||||||
my %DSTYPE = ( "0" => "g", "1" => "c", "2" => "d", "3" => "a");
|
my %DSTYPE = ( "0" => "g", "1" => "c", "2" => "d", "3" => "a");
|
||||||
|
|
||||||
require "@CENTREON_ETC@/conf.pm";
|
require "@CENTREON_ETC@/centreon-config.pm";
|
||||||
my $dbh = DBI->connect("DBI:mysql:database=$mysql_database_oreon;host=$mysql_host","$mysql_user", "$mysql_passwd",{'RaiseError' => 1});
|
my $dbh = DBI->connect("DBI:mysql:database=$centreon_config->{centreon_db};host=$centreon_config->{db_host}","$centreon_config->{db_user}", "$centreon_config->{db_passwd}",{'RaiseError' => 1});
|
||||||
my $db_centstorage = DBI->connect("DBI:mysql:database=$mysql_database_ods;host=$mysql_host","$mysql_user", "$mysql_passwd",{'RaiseError' => 1});
|
my $db_centstorage = DBI->connect("DBI:mysql:database=$centreon_config->{centstorage_db};host=$centreon_config->{db_host}","$centreon_config->{db_user}", "$centreon_config->{db_passwd}",{'RaiseError' => 1});
|
||||||
|
|
||||||
my $row;
|
my $row;
|
||||||
my $ndo_prefix;
|
my $ndo_prefix;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user