[prev in list] [next in list] [prev in thread] [next in thread]
List: mon
Subject: mon & mysql
From: "d'Ursel R." <raphd () skynet ! be>
Date: 2004-06-01 22:02:08
Message-ID: 002001c44824$161ba6f0$7800000a () starsn7kwzj0zj
[Download RAW message or body]
Hi all,
thx for this mailing list.
I just want to know if someone has already write something to record
downtimes on a mysql database ?
As I'm not a programer and have no idea about what Perl is, I parsed the
code and add :
my $db = 'DBI:mysql:incident:myServer';
my $user = 'xxx';
my $passwd = 'xxx';
my $dbconnect = DBI->connect($db, $user, $passwd);
my $sql = qq{INSERT INTO mon ( now, group, service, first, duration) VALUES
('$data{"time"}','$data{"group"}','$data{"service"}','$data{"first"}','$data
{"duration"}'); };
$dbconnect->do($sql);
$dbconnect->disconnect();
Anyway, if somebody has something similar but service dependent (as an
alert, fi), I'll be glad to have a look on it.
Thx.
Raphael
_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic