mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-23 05:35:01 +02:00
indompte code
git-svn-id: http://svn.centreon.com/Plugins/Dev@2231 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
parent
c06de4235e
commit
ec22bb43c2
@ -51,9 +51,7 @@ if ($opt_h) {
|
||||
exit $ERRORS{'OK'};
|
||||
}
|
||||
|
||||
my $dbh = DBI->connect("DBI:mysql:database=oreon;host=localhost",
|
||||
"oreon", "oreon-pwd",
|
||||
{'RaiseError' => 1});
|
||||
my $dbh = DBI->connect("DBI:mysql:database=oreon;host=localhost","oreon", "oreon-pwd",{'RaiseError' => 1});
|
||||
|
||||
my $sth1 = $dbh->prepare("SELECT * FROM `cfg_perfparse`");
|
||||
if (!$sth1->execute) {die "Error: cannot prepare query\n";}
|
||||
@ -69,7 +67,6 @@ my $metric_id;
|
||||
|
||||
sub return_value($$$){
|
||||
|
||||
#print "warning : ".$warning."-Critical : ".$critical.":$result\b";
|
||||
if ($opt_d) {
|
||||
$opt_d =~ s/\%d/$result/g;
|
||||
}
|
||||
@ -122,7 +119,7 @@ sub return_value($$$){
|
||||
} else{
|
||||
if ($opt_d) {
|
||||
print "$opt_d|OMS=" . $result . ";".$warning.";".$critical."\n";
|
||||
}else {
|
||||
} else {
|
||||
print "OK result : " . $result . "|OMS=" . $result . ";".$warning.";".$critical."\n";
|
||||
}
|
||||
exit $ERRORS{'OK'};
|
||||
|
Loading…
x
Reference in New Issue
Block a user