mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Testing
This commit is contained in:
parent
311186a70a
commit
50dd166cb3
@ -22,6 +22,7 @@ use warnings;
|
|||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
use threads;
|
use threads;
|
||||||
use Digest::MD5 qw(md5_hex);
|
use Digest::MD5 qw(md5_hex);
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
# Default lib dir for RPM and DEB packages
|
# Default lib dir for RPM and DEB packages
|
||||||
use lib '/usr/lib/perl5';
|
use lib '/usr/lib/perl5';
|
||||||
@ -712,6 +713,7 @@ sub main() {
|
|||||||
my $curl_execution = "'".$Config{'console_api_url'}."?op=get&op2=test&apipass=".$Config{"console_api_pass"}."&user=".$Config{"console_user"}."&pass=".$Config{"console_pass"}."'";
|
my $curl_execution = "'".$Config{'console_api_url'}."?op=get&op2=test&apipass=".$Config{"console_api_pass"}."&user=".$Config{"console_user"}."&pass=".$Config{"console_pass"}."'";
|
||||||
my $exe_testing_api = `curl $curl_execution 2>/dev/null`;
|
my $exe_testing_api = `curl $curl_execution 2>/dev/null`;
|
||||||
my @res_testing_api = split(',', $exe_testing_api);
|
my @res_testing_api = split(',', $exe_testing_api);
|
||||||
|
logger(\%Config, Dumper(@res_testing_api), 1);
|
||||||
if ( $res_testing_api[0] ne 'OK' ) {
|
if ( $res_testing_api[0] ne 'OK' ) {
|
||||||
logger(\%Config, "Warning! The server does not have access to the API, this can trigger problems in the generation of reports and graphs.", 1);
|
logger(\%Config, "Warning! The server does not have access to the API, this can trigger problems in the generation of reports and graphs.", 1);
|
||||||
pandora_event (\%Config, "Server does not have access to the API", 0, 0, 0, 0, 0, 'system', 0, $DBH);
|
pandora_event (\%Config, "Server does not have access to the API", 0, 0, 0, 0, 0, 'system', 0, $DBH);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user