Skip to content

Commit

Permalink
Update probe.pm
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxken authored May 5, 2017
1 parent ad19c97 commit 3039331
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Nimprobe/probe.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package Nimprobe::probe;
use lib "D:/apps/Nimsoft/perllib";
use lib "D:/apps/Nimsoft/Perl64/lib/Win32API";
use Nimbus::API;
use Nimbus::PDS;
use Nimbus::CFG;
Expand Down Expand Up @@ -130,6 +132,7 @@ sub parseCONF {

foreach my $key ( keys %{ $final } ) {
my $Authorize_Insert = 1;
my $ActiveVal = $final->{$key}{active};
if($PCM{$monitored}{$monitoredSection}{needed_key}) {
foreach my $CONF_STR_Profile ( keys $PCM{$monitored}{$monitoredSection}{needed_key} ) {
if($final->{$key} ne '') {
Expand All @@ -143,14 +146,14 @@ sub parseCONF {
}
}
if($Authorize_Insert) {
my $INSERT_CONF = $DB->prepare("INSERT INTO probes_config (id,probeid,probe,profile) VALUES(NULL,?,?,?)");
my $INSERT_CONF = $DB->prepare("INSERT INTO probes_config (id,probeid,probe,profile,active) VALUES(NULL,?,?,?,?)");
if(lc $monitored eq "cdm") {
$key =~ s/#/\//g;
}
elsif(lc $monitored eq "logmon") {
$key =~ s/\//#/g;
}
$INSERT_CONF->execute($this->{id},uc $monitored,$key);
$INSERT_CONF->execute($this->{id},uc $monitored,$key,$ActiveVal);
$INSERT_CONF->finish;
}
}
Expand Down

0 comments on commit 3039331

Please sign in to comment.