Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
icinga
:
production
>
icinga-nagtrap
> nagtrap-1.5.0_DBIx-DBCluster.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nagtrap-1.5.0_DBIx-DBCluster.patch of Package icinga-nagtrap
Index: plugin/check_snmptraps.pl.in =================================================================== --- plugin/check_snmptraps.pl.in (Revision 11721) +++ plugin/check_snmptraps.pl.in (Arbeitskopie) @@ -59,6 +59,7 @@ use utils qw($TIMEOUT %ERRORS &print_revision &support); use Time::HiRes qw(time); use DBI(); +use DBIx::DBCluster; # ==================== Database connect information ==================== our $dbHost; our $dbName; @@ -229,7 +230,8 @@ } # Connect to the database. -my $dbConnect = DBI->connect("DBI:mysql:database=$dbName;host=$dbHost","$dbUser","$dbPass") || +#my $dbConnect = DBI->connect("DBI:mysql:database=$dbName;host=$dbHost","$dbUser","$dbPass") || +my $dbConnect = DBIx::DBCluster->connect("DBI:mysql:database=$dbName;host=$dbHost","$dbUser","$dbPass") || die "ERROR - Can't connect to MySQL-Database: ".$DBI::errstr."\n"; &debug(1,"Connect to DB: TRUE"); Index: plugin/check_jobs.pl.in =================================================================== --- plugin/check_jobs.pl.in (Revision 11721) +++ plugin/check_jobs.pl.in (Arbeitskopie) @@ -44,6 +44,7 @@ use utils qw($TIMEOUT %ERRORS &print_revision &support); use Time::HiRes qw(time); use DBI(); +use DBIx::DBCluster; # ==================== Database connect information ==================== our $dbHost; our $dbName; @@ -141,7 +142,8 @@ &debug(0); # Connect to the database. -my $dbConnect = DBI->connect("DBI:mysql:database=$dbName;host=$dbHost","$dbUser","$dbPass") || +#my $dbConnect = DBI->connect("DBI:mysql:database=$dbName;host=$dbHost","$dbUser","$dbPass") || +my $dbConnect = DBIx::DBCluster->connect("DBI:mysql:database=$dbName;host=$dbHost","$dbUser","$dbPass") || die "ERROR - Can't connect to MySQL-Database: ".$DBI::errstr."\n"; &debug(1,"Connect to DB: TRUE");