Merge remote-tracking branch 'origin/ent-EDF' into ent-4610-Alertas-de-logs
Conflicts: pandora_console/extras/mr/33.sql
|
@ -36,6 +36,8 @@ mkdir -p temp_package/usr/bin/
|
|||
mkdir -p temp_package/usr/sbin/
|
||||
mkdir -p temp_package/etc/pandora/plugins
|
||||
mkdir -p temp_package/etc/pandora/collections
|
||||
mkdir -p temp_package/etc/pandora/trans
|
||||
mkdir -p temp_package/etc/pandora/commands
|
||||
mkdir -p temp_package/etc/init.d/
|
||||
mkdir -p temp_package/var/log/pandora/
|
||||
mkdir -p temp_package/usr/share/man/man1/
|
||||
|
|
|
@ -324,6 +324,11 @@ install () {
|
|||
cp -r collections $PANDORA_BASE$PANDORA_HOME
|
||||
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/collections
|
||||
ln -s $PANDORA_BASE$PANDORA_HOME/collections $PANDORA_BASE$PANDORA_CFG
|
||||
|
||||
echo "Copying Pandora FMS Agent commands to $PANDORA_BASE$PANDORA_HOME/commands..."
|
||||
cp -r commands $PANDORA_BASE$PANDORA_HOME
|
||||
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/commands
|
||||
ln -s $PANDORA_BASE$PANDORA_HOME/commands $PANDORA_BASE$PANDORA_CFG
|
||||
|
||||
echo "Copying tentacle server to $PANDORA_BASE$TENTACLE_SERVER"
|
||||
cp tentacle_server $PANDORA_BASE$TENTACLE_SERVER
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.740-191108
|
||||
Version: 7.0NG.740-191113
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.740-191108"
|
||||
pandora_version="7.0NG.740-191113"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -36,6 +36,8 @@ mkdir -p temp_package/usr/bin/
|
|||
mkdir -p temp_package/usr/sbin/
|
||||
mkdir -p temp_package/etc/pandora/plugins
|
||||
mkdir -p temp_package/etc/pandora/collections
|
||||
mkdir -p temp_package/etc/pandora/trans
|
||||
mkdir -p temp_package/etc/pandora/commands
|
||||
mkdir -p temp_package/etc/init.d/
|
||||
mkdir -p temp_package/lib/systemd/system/
|
||||
mkdir -p temp_package/var/log/pandora/
|
||||
|
|
|
@ -24,6 +24,7 @@ Version 6.0
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use POSIX qw(strftime floor);
|
||||
use Sys::Hostname;
|
||||
use File::Basename;
|
||||
|
@ -32,6 +33,18 @@ use IO::Socket;
|
|||
use Sys::Syslog;
|
||||
use Time::Local;
|
||||
|
||||
my $YAML = 0;
|
||||
# Dynamic load. Avoid unwanted behaviour.
|
||||
eval {
|
||||
eval 'require YAML::Tiny;1' or die('YAML::Tiny lib not found, commands feature won\'t be available');
|
||||
};
|
||||
if ($@) {
|
||||
$YAML = 0;
|
||||
print STDERR $@;
|
||||
} else {
|
||||
$YAML = 1;
|
||||
}
|
||||
|
||||
# Agent XML data
|
||||
my $Xml;
|
||||
|
||||
|
@ -42,7 +55,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.740';
|
||||
use constant AGENT_BUILD => '191108';
|
||||
use constant AGENT_BUILD => '191113';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
@ -187,6 +200,7 @@ my %DefaultConf = (
|
|||
'custom_id' => '',
|
||||
'url_address' => '',
|
||||
'standby' => 0,
|
||||
'cmd_file' => undef,
|
||||
);
|
||||
my %Conf = %DefaultConf;
|
||||
|
||||
|
@ -268,6 +282,20 @@ sub error ($) {
|
|||
exit 1;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Try to load extra libraries.c
|
||||
################################################################################
|
||||
sub load_libraries() {
|
||||
# Dynamic load. Avoid unwanted behaviour.
|
||||
eval {eval 'require YAML::Tiny;1' or die('YAML::Tiny lib not found, commands feature won\'t be available');};
|
||||
if ($@) {
|
||||
$YAML = 0;
|
||||
print STDERR $@;
|
||||
} else {
|
||||
$YAML = 1;
|
||||
}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Check a regular expression. Returns 1 if its valid, 0 otherwise.
|
||||
################################################################################
|
||||
|
@ -284,6 +312,27 @@ sub valid_regexp ($) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Reads a file and returns entire content or undef if error.
|
||||
################################################################################
|
||||
sub read_file {
|
||||
my $path = shift;
|
||||
|
||||
my $_FILE;
|
||||
if( !open($_FILE, "<", $path) ) {
|
||||
# failed to open, return undef
|
||||
return undef;
|
||||
}
|
||||
|
||||
# Slurp configuration file content.
|
||||
my $content = do { local $/; <$_FILE> };
|
||||
|
||||
# Close file
|
||||
close($_FILE);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Recursively delete files and directories.
|
||||
################################################################################
|
||||
|
@ -682,6 +731,13 @@ sub parse_conf_modules($) {
|
|||
# Macros
|
||||
} elsif ($line =~ /^\s*module_macro(\S+)\s+(.*)\s*$/) {
|
||||
$module->{'macros'}{$1} = $2;
|
||||
# Commands
|
||||
} elsif ($line =~ /^\s*cmd_file\s+(.+)$/) {
|
||||
if (ref ($Conf{'commands'}) ne "HASH") {
|
||||
$Conf{'commands'} = {};
|
||||
}
|
||||
# Initialize empty command hash.
|
||||
$Conf{'commands'}->{$1} = {};
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -1157,14 +1213,14 @@ sub recv_file {
|
|||
};
|
||||
|
||||
if ($@) {
|
||||
log_message ('error', "Error retrieving file: File transfer command is not responding.");
|
||||
log_message ('error', "Error retrieving file: '.$file.' File transfer command is not responding.");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Get the errorlevel
|
||||
my $rc = $? >> 8;
|
||||
if ($rc != 0) {
|
||||
log_message ('error', "Error retrieving file: $output");
|
||||
log_message ('error', "Error retrieving file: '$file' $output");
|
||||
}
|
||||
exit $rc;
|
||||
}
|
||||
|
@ -1362,6 +1418,220 @@ sub check_collections () {
|
|||
}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Check for remote commands defined.
|
||||
################################################################################
|
||||
sub prepare_remote_commands {
|
||||
if ($YAML == 0) {
|
||||
log_message(
|
||||
'error',
|
||||
'Cannot use commands without YAML dependency, please install it.'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
foreach my $ref (keys %{$Conf{'commands'}}) {
|
||||
my $file_content;
|
||||
my $download = 0;
|
||||
my $rcmd_file = $ConfDir.'/commands/'.$ref.'.rcmd';
|
||||
|
||||
# Check for local .rcmd.done files
|
||||
if (-e $Conf{'temporal'}.'/'.$ref.'.rcmd.done') {
|
||||
# Ignore.
|
||||
delete $Conf{'commands'}->{$ref};
|
||||
next;
|
||||
}
|
||||
|
||||
# Search for local .rcmd file
|
||||
if (-e $rcmd_file) {
|
||||
my $remote_md5_file = $Conf{'temporal'}.'/'.$ref.'.md5';
|
||||
|
||||
$file_content = read_file($rcmd_file);
|
||||
if (recv_file($ref.'.md5', $remote_md5_file) != 0) {
|
||||
# Remote file could not be retrieved, skip.
|
||||
delete $Conf{'commands'}->{$ref};
|
||||
next;
|
||||
}
|
||||
|
||||
my $local_md5 = md5($file_content);
|
||||
my $remote_md5 = md5(read_file($remote_md5_file));
|
||||
|
||||
if ($local_md5 ne $remote_md5) {
|
||||
# Must be downloaded again.
|
||||
$download = 1;
|
||||
}
|
||||
} else {
|
||||
$download = 1;
|
||||
}
|
||||
|
||||
# Search for remote .rcmd file
|
||||
if ($download == 1) {
|
||||
# Download .rcmd file
|
||||
if (recv_file($ref.'.rcmd') != 0) {
|
||||
# Remote file could not be retrieved, skip.
|
||||
delete $Conf{'commands'}->{$ref};
|
||||
next;
|
||||
} else {
|
||||
# Success
|
||||
move($Conf{'temporal'}.'/'.$ref.'.rcmd', $rcmd_file);
|
||||
}
|
||||
}
|
||||
|
||||
# Parse and prepare in memory skel.
|
||||
eval {
|
||||
$Conf{'commands'}->{$ref} = YAML::Tiny->read($rcmd_file);
|
||||
};
|
||||
if ($@) {
|
||||
# Failed.
|
||||
log_message('error', 'Failed to decode command. ' . "\n".$@);
|
||||
delete $Conf{'commands'}->{$ref};
|
||||
next;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Command report.
|
||||
################################################################################
|
||||
sub report_command {
|
||||
my ($ref, $err_level) = @_;
|
||||
|
||||
# Retrieve content from .stdout and .stderr
|
||||
my $stdout_file = $Conf{'temporal'}.'/'.$ref.'.stdout';
|
||||
my $stderr_file = $Conf{'temporal'}.'/'.$ref.'.stderr';
|
||||
|
||||
my $return;
|
||||
eval {
|
||||
$return = {
|
||||
'error_level' => $err_level,
|
||||
'stdout' => read_file($stdout_file),
|
||||
'stderr' => read_file($stderr_file),
|
||||
};
|
||||
|
||||
$return->{'name'} = $Conf{'commands'}->{$ref}->[0]->{'name'};
|
||||
};
|
||||
if ($@) {
|
||||
log_message('error', 'Failed to report command output. ' . $@);
|
||||
}
|
||||
|
||||
# Cleanup
|
||||
unlink($stdout_file) if (-e $stdout_file);
|
||||
unlink($stderr_file) if (-e $stderr_file);
|
||||
|
||||
# Mark command as done.
|
||||
open (my $R_FILE, '> '.$ConfDir.'/commands/'.$ref.'.rcmd.done');
|
||||
print $R_FILE $err_level;
|
||||
close($R_FILE);
|
||||
|
||||
|
||||
$return->{'stdout'} = '' unless defined ($return->{'stdout'});
|
||||
$return->{'stderr'} = '' unless defined ($return->{'stderr'});
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Executes a command using defined timeout.
|
||||
################################################################################
|
||||
sub execute_command_timeout {
|
||||
my ($command, $timeout) = @_;
|
||||
|
||||
if (!looks_like_number($timeout)) {
|
||||
`$command`;
|
||||
} else {
|
||||
`$command`;
|
||||
}
|
||||
|
||||
return $?>>8;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Executes a block of commands, returns error level, leaves output in
|
||||
# redirection set by $std_files. E.g:
|
||||
# $std_files = ' >> /tmp/stdout 2>> /tmp/stderr
|
||||
################################################################################
|
||||
sub execute_command_block {
|
||||
my ($commands, $std_files, $timeout) = @_;
|
||||
|
||||
return 0 unless defined($commands);
|
||||
|
||||
my $err_level = 0;
|
||||
$std_files = '' unless defined ($std_files);
|
||||
|
||||
if (ref($commands) ne "ARRAY") {
|
||||
return 0 if $commands eq '';
|
||||
$err_level = execute_command_timeout(
|
||||
"($commands) $std_files",
|
||||
$timeout
|
||||
);
|
||||
|
||||
} else {
|
||||
foreach my $comm (@{$commands}) {
|
||||
next unless defined($comm);
|
||||
$err_level = execute_command_timeout(
|
||||
"($comm) $std_files",
|
||||
$timeout
|
||||
);
|
||||
|
||||
last unless ($err_level == 0);
|
||||
}
|
||||
}
|
||||
|
||||
return $err_level;
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Evalate given command.
|
||||
################################################################################
|
||||
sub evaluate_command {
|
||||
my ($ref) = @_;
|
||||
|
||||
# Not found.
|
||||
return unless defined $Conf{'commands'}->{$ref};
|
||||
|
||||
# Already completed.
|
||||
return if (-e $ConfDir.'/commands/'.$ref.'.rcmd.done');
|
||||
|
||||
# [0] because how library works.
|
||||
my $cmd = $Conf{'commands'}->{$ref}->[0];
|
||||
|
||||
my $std_files = ' >> '.$Conf{'temporal'}.'/'.$ref.'.stdout ';
|
||||
$std_files .= ' 2>> '.$Conf{'temporal'}.'/'.$ref.'.stderr ';
|
||||
|
||||
# Check preconditions
|
||||
my $err_level;
|
||||
|
||||
$err_level = execute_command_block(
|
||||
$cmd->{'preconditions'},
|
||||
$std_files,
|
||||
$cmd->{'timeout'}
|
||||
);
|
||||
|
||||
# Precondition not satisfied.
|
||||
return report_command($ref, $err_level) unless ($err_level == 0);
|
||||
|
||||
# Main run.
|
||||
$err_level = execute_command_block(
|
||||
$cmd->{'script'},
|
||||
$std_files,
|
||||
$cmd->{'timeout'}
|
||||
);
|
||||
|
||||
# Script not success.
|
||||
return report_command($ref, $err_level) unless ($err_level == 0);
|
||||
|
||||
# Check postconditions
|
||||
$err_level = execute_command_block(
|
||||
$cmd->{'postconditions'},
|
||||
$std_files,
|
||||
$cmd->{'timeout'}
|
||||
);
|
||||
|
||||
# Return results.
|
||||
return report_command($ref, $err_level);
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Sleep function
|
||||
################################################################################
|
||||
|
@ -2985,6 +3255,8 @@ my $iter_base_time = time();
|
|||
$LogFileIdx = -1;
|
||||
# Loop
|
||||
while (1) {
|
||||
load_libraries();
|
||||
|
||||
if (-e $Conf{'logfile'} && (stat($Conf{'logfile'}))[7] > $Conf{'logsize'}) {
|
||||
rotate_log();
|
||||
}
|
||||
|
@ -2999,6 +3271,25 @@ while (1) {
|
|||
# Check file collections
|
||||
check_collections () unless ($Conf{'debug'} eq '1');
|
||||
|
||||
if ($Conf{'debug'} ne '1') {
|
||||
# Check remote commands
|
||||
prepare_remote_commands ();
|
||||
|
||||
# Cleanup old .rcmd.done files.
|
||||
my %registered = map { $_.'.rcmd.done' => 1 } keys %{$Conf{'commands'}};
|
||||
if(opendir(my $dir, $ConfDir.'/commands/')) {
|
||||
while (my $item = readdir($dir)) {
|
||||
# Skip other files.
|
||||
next if ($item !~ /\.rcmd\.done$/);
|
||||
|
||||
# Clean .rcmd.done file if its command is not referenced in conf.
|
||||
if (!defined($registered{$item})) {
|
||||
unlink ($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Launch broker agents
|
||||
@BrokerPid = ();
|
||||
my @broker_agents = read_config ('broker_agent');
|
||||
|
@ -3128,6 +3419,24 @@ while (1) {
|
|||
}
|
||||
}
|
||||
|
||||
if (ref ($Conf{'commands'}) eq "HASH") {
|
||||
foreach my $command (keys %{$Conf{'commands'}}) {
|
||||
my $result = evaluate_command($command);
|
||||
if (ref($result) eq "HASH") {
|
||||
# Process command result.
|
||||
$Xml .= "<cmd_report>\n";
|
||||
$Xml .= " <cmd_response>\n";
|
||||
$Xml .= " <cmd_name><![CDATA[".$result->{'name'}."]]></cmd_name>\n";
|
||||
$Xml .= " <cmd_key><![CDATA[".$command."]]></cmd_key>\n";
|
||||
$Xml .= " <cmd_errorlevel><![CDATA[".$result->{'error_level'}."]]></cmd_errorlevel>\n";
|
||||
$Xml .= " <cmd_stdout><![CDATA[".$result->{'stdout'}."]]></cmd_stdout>\n";
|
||||
$Xml .= " <cmd_stderr><![CDATA[".$result->{'stderr'}."]]></cmd_stderr>\n";
|
||||
$Xml .= " </cmd_response>\n";
|
||||
$Xml .= "</cmd_report>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Wait for all the threads
|
||||
$ThreadSem->down ($Conf{'agent_threads'}) if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||
$ThreadSem->up ($Conf{'agent_threads'}) if (defined ($ThreadSem) && $Conf{'agent_threads'} > 1);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.740
|
||||
%define release 191108
|
||||
%define release 191113
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -99,6 +99,11 @@ if [ ! -e /etc/pandora/collections ]; then
|
|||
ln -s /usr/share/pandora_agent/collections /etc/pandora
|
||||
fi
|
||||
|
||||
if [ ! -e /etc/pandora/commands ]; then
|
||||
mkdir -p /usr/share/pandora_agent/commands
|
||||
ln -s /usr/share/pandora_agent/commands /etc/pandora
|
||||
fi
|
||||
|
||||
mkdir -p /var/spool/pandora/data_out
|
||||
if [ ! -d /var/log/pandora ]; then
|
||||
mkdir -p /var/log/pandora
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.740
|
||||
%define release 191108
|
||||
%define release 191113
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -90,6 +90,11 @@ fi
|
|||
if [ ! -e /etc/pandora/collections ]; then
|
||||
mkdir /etc/pandora/collections
|
||||
fi
|
||||
|
||||
if [ ! -e /etc/pandora/commands ]; then
|
||||
mkdir /etc/pandora/commands
|
||||
fi
|
||||
|
||||
cp -aRf /usr/share/pandora_agent/pandora_agent_logrotate /etc/logrotate.d/pandora_agent
|
||||
|
||||
# Enable the service on SystemD
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.740"
|
||||
PI_BUILD="191108"
|
||||
PI_BUILD="191113"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -400,6 +400,11 @@ install () {
|
|||
mkdir -p $PANDORA_BASE$PANDORA_HOME/collections
|
||||
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/collections
|
||||
ln -s $PANDORA_BASE_REAL$PANDORA_HOME/collections $PANDORA_BASE$PANDORA_CFG
|
||||
|
||||
echo "Creating the commands directory in $PANDORA_BASE$PANDORA_HOME/commands..."
|
||||
mkdir -p $PANDORA_BASE$PANDORA_HOME/commands
|
||||
chmod -R 700 $PANDORA_BASE$PANDORA_HOME/commands
|
||||
ln -s $PANDORA_BASE_REAL$PANDORA_HOME/commands $PANDORA_BASE$PANDORA_CFG
|
||||
|
||||
if [ $WITHOUT_TENTACLE_SERVER -eq 0 ]
|
||||
then
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{191108}
|
||||
{191113}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.740(Build 191108)")
|
||||
#define PANDORA_VERSION ("7.0NG.740(Build 191113)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(7.0NG.740(Build 191108))"
|
||||
VALUE "ProductVersion", "(7.0NG.740(Build 191113))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 7.0NG.740-191108
|
||||
Version: 7.0NG.740-191113
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.740-191108"
|
||||
pandora_version="7.0NG.740-191113"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -13,7 +13,264 @@
|
|||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
// Begin.
|
||||
|
||||
|
||||
/**
|
||||
* Extra JS.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function agents_modules_load_js()
|
||||
{
|
||||
$ignored_params['refresh'] = '';
|
||||
|
||||
?>
|
||||
<style type='text/css'>
|
||||
.rotate_text_module {
|
||||
-ms-transform: rotate(270deg);
|
||||
-webkit-transform: rotate(270deg);
|
||||
-moz-transform: rotate(270deg);
|
||||
-o-transform: rotate(270deg);
|
||||
writing-mode: lr-tb;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function () {
|
||||
//Get max width of name of modules
|
||||
max_width = 0;
|
||||
$.each($('.th_class_module_r'), function (i, elem) {
|
||||
id = $(elem).attr('id').replace('th_module_r_', '');
|
||||
|
||||
width = $("#div_module_r_" + id).width();
|
||||
|
||||
if (max_width < width) {
|
||||
max_width = width;
|
||||
}
|
||||
});
|
||||
|
||||
$.each($('.th_class_module_r'), function (i, elem) {
|
||||
id = $(elem).attr('id').replace('th_module_r_', '');
|
||||
$("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px');
|
||||
$("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px');
|
||||
$("#div_module_r_" + id).show();
|
||||
});
|
||||
|
||||
var refr = '<?php echo get_parameter('refresh', 0); ?>';
|
||||
var pure = '<?php echo get_parameter('pure', 0); ?>';
|
||||
var href =' <?php echo ui_get_url_refresh($ignored_params); ?>';
|
||||
|
||||
if (pure) {
|
||||
var startCountDown = function (duration, cb) {
|
||||
$('div.vc-countdown').countdown('destroy');
|
||||
if (!duration) return;
|
||||
var t = new Date();
|
||||
t.setTime(t.getTime() + duration * 1000);
|
||||
$('div.vc-countdown').countdown({
|
||||
until: t,
|
||||
format: 'MS',
|
||||
layout: '(%M%nn%M:%S%nn%S <?php echo __('Until next'); ?>) ',
|
||||
alwaysExpire: true,
|
||||
onExpiry: function () {
|
||||
$('div.vc-countdown').countdown('destroy');
|
||||
url = js_html_entity_decode( href ) + duration;
|
||||
$(document).attr ("location", url);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(refr>0){
|
||||
startCountDown(refr, false);
|
||||
}
|
||||
|
||||
var controls = document.getElementById('vc-controls');
|
||||
autoHideElement(controls, 1000);
|
||||
|
||||
$('select#refresh').change(function (event) {
|
||||
refr = Number.parseInt(event.target.value, 10);
|
||||
startCountDown(refr, false);
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
var agentes_id = $("#id_agents2").val();
|
||||
var id_agentes = getQueryParam("full_agents_id");
|
||||
if (agentes_id === null && id_agentes !== null) {
|
||||
id_agentes = id_agentes.split(";")
|
||||
id_agentes.forEach(function(element) {
|
||||
$("#id_agents2 option[value="+ element +"]").attr("selected",true);
|
||||
});
|
||||
|
||||
selection_agent_module();
|
||||
}
|
||||
|
||||
$('#refresh').change(function () {
|
||||
$('#hidden-vc_refr').val($('#refresh option:selected').val());
|
||||
});
|
||||
}
|
||||
|
||||
$("#group_id").change (function () {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_agents_group_json" : 1,
|
||||
"id_group" : this.value,
|
||||
"privilege" : "AW",
|
||||
"keys_prefix" : "_",
|
||||
"recursion" : $('#checkbox-recursion').is(':checked')
|
||||
},
|
||||
function (data, status) {
|
||||
$("#id_agents2").html('');
|
||||
$("#module").html('');
|
||||
jQuery.each (data, function (id, value) {
|
||||
// Remove keys_prefix from the index
|
||||
id = id.substring(1);
|
||||
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente"])
|
||||
.html (value["alias"]);
|
||||
$("#id_agents").append (option);
|
||||
$("#id_agents2").append (option);
|
||||
});
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
|
||||
$("#checkbox-recursion").change (function () {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_agents_group_json" : 1,
|
||||
"id_group" : $("#group_id").val(),
|
||||
"privilege" : "AW",
|
||||
"keys_prefix" : "_",
|
||||
"recursion" : $('#checkbox-recursion').is(':checked')
|
||||
},
|
||||
function (data, status) {
|
||||
$("#id_agents2").html('');
|
||||
$("#module").html('');
|
||||
jQuery.each (data, function (id, value) {
|
||||
// Remove keys_prefix from the index
|
||||
id = id.substring(1);
|
||||
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente"])
|
||||
.html (value["alias"]);
|
||||
$("#id_agents").append (option);
|
||||
$("#id_agents2").append (option);
|
||||
});
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
|
||||
$("#modulegroup").change (function () {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_modules_group_json" : 1,
|
||||
"id_module_group" : this.value,
|
||||
"id_agents" : $("#id_agents2").val(),
|
||||
"selection" : $("#selection_agent_module").val()
|
||||
},
|
||||
function (data, status) {
|
||||
$("#module").html('');
|
||||
if(data){
|
||||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente_modulo"])
|
||||
.html (value["nombre"]);
|
||||
$("#module").append (option);
|
||||
});
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
|
||||
$("#id_agents2").click (function(){
|
||||
selection_agent_module();
|
||||
});
|
||||
|
||||
$("#selection_agent_module").change(function() {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_modules_group_json" : 1,
|
||||
"id_module_group" : $("#modulegroup").val(),
|
||||
"id_agents" : $("#id_agents2").val(),
|
||||
"selection" : $("#selection_agent_module").val()
|
||||
},
|
||||
function (data, status) {
|
||||
$("#module").html('');
|
||||
if(data){
|
||||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente_modulo"])
|
||||
.html (value["nombre"]);
|
||||
$("#module").append (option);
|
||||
});
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
function selection_agent_module() {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_modules_group_json" : 1,
|
||||
"id_module_group" : $("#modulegroup").val(),
|
||||
"id_agents" : $("#id_agents2").val(),
|
||||
"selection" : $("#selection_agent_module").val()
|
||||
},
|
||||
function (data, status) {
|
||||
$("#module").html('');
|
||||
if(data){
|
||||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente_modulo"])
|
||||
.html (value["nombre"]);
|
||||
$("#module").append (option);
|
||||
});
|
||||
|
||||
var id_modules = getQueryParam("full_modules_selected");
|
||||
if(id_modules !== null) {
|
||||
id_modules = id_modules.split(";");
|
||||
id_modules.forEach(function(element) {
|
||||
$("#module option[value="+ element +"]").attr("selected",true);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
}
|
||||
|
||||
function getQueryParam (key) {
|
||||
key = key.replace(/[[]/, '[');
|
||||
key = key.replace(/[]]/, ']');
|
||||
var pattern = "[?&]" + key + "=([^&#]*)";
|
||||
var regex = new RegExp(pattern);
|
||||
var url = unescape(window.location.href);
|
||||
var results = regex.exec(url);
|
||||
if (results === null) {
|
||||
return null;
|
||||
} else {
|
||||
return results[1];
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Main method.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function mainAgentsModules()
|
||||
{
|
||||
global $config;
|
||||
|
@ -36,6 +293,9 @@ function mainAgentsModules()
|
|||
exit;
|
||||
}
|
||||
|
||||
// JS.
|
||||
agents_modules_load_js();
|
||||
|
||||
// Update network modules for this group
|
||||
// Check for Network FLAG change request
|
||||
// Made it a subquery, much faster on both the database and server side.
|
||||
|
@ -617,243 +877,3 @@ function mainAgentsModules()
|
|||
|
||||
extensions_add_operation_menu_option(__('Agents/Modules view'), 'estado', 'agents_modules/icon_menu.png', 'v1r1', 'view');
|
||||
extensions_add_main_function('mainAgentsModules');
|
||||
|
||||
$ignored_params['refresh'] = '';
|
||||
|
||||
?>
|
||||
<style type='text/css'>
|
||||
.rotate_text_module {
|
||||
-ms-transform: rotate(270deg);
|
||||
-webkit-transform: rotate(270deg);
|
||||
-moz-transform: rotate(270deg);
|
||||
-o-transform: rotate(270deg);
|
||||
writing-mode: lr-tb;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function () {
|
||||
//Get max width of name of modules
|
||||
max_width = 0;
|
||||
$.each($('.th_class_module_r'), function (i, elem) {
|
||||
id = $(elem).attr('id').replace('th_module_r_', '');
|
||||
|
||||
width = $("#div_module_r_" + id).width();
|
||||
|
||||
if (max_width < width) {
|
||||
max_width = width;
|
||||
}
|
||||
});
|
||||
|
||||
$.each($('.th_class_module_r'), function (i, elem) {
|
||||
id = $(elem).attr('id').replace('th_module_r_', '');
|
||||
$("#th_module_r_" + id).height(($("#div_module_r_" + id).width() + 10) + 'px');
|
||||
$("#div_module_r_" + id).css('margin-top', (max_width - 20) + 'px');
|
||||
$("#div_module_r_" + id).show();
|
||||
});
|
||||
|
||||
var refr = '<?php echo get_parameter('refresh', 0); ?>';
|
||||
var pure = '<?php echo get_parameter('pure', 0); ?>';
|
||||
var href =' <?php echo ui_get_url_refresh($ignored_params); ?>';
|
||||
|
||||
if (pure) {
|
||||
var startCountDown = function (duration, cb) {
|
||||
$('div.vc-countdown').countdown('destroy');
|
||||
if (!duration) return;
|
||||
var t = new Date();
|
||||
t.setTime(t.getTime() + duration * 1000);
|
||||
$('div.vc-countdown').countdown({
|
||||
until: t,
|
||||
format: 'MS',
|
||||
layout: '(%M%nn%M:%S%nn%S <?php echo __('Until next'); ?>) ',
|
||||
alwaysExpire: true,
|
||||
onExpiry: function () {
|
||||
$('div.vc-countdown').countdown('destroy');
|
||||
url = js_html_entity_decode( href ) + duration;
|
||||
$(document).attr ("location", url);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(refr>0){
|
||||
startCountDown(refr, false);
|
||||
}
|
||||
|
||||
var controls = document.getElementById('vc-controls');
|
||||
autoHideElement(controls, 1000);
|
||||
|
||||
$('select#refresh').change(function (event) {
|
||||
refr = Number.parseInt(event.target.value, 10);
|
||||
startCountDown(refr, false);
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
||||
var agentes_id = $("#id_agents2").val();
|
||||
var id_agentes = getQueryParam("full_agents_id");
|
||||
if (agentes_id === null && id_agentes !== null) {
|
||||
id_agentes = id_agentes.split(";")
|
||||
id_agentes.forEach(function(element) {
|
||||
$("#id_agents2 option[value="+ element +"]").attr("selected",true);
|
||||
});
|
||||
|
||||
selection_agent_module();
|
||||
}
|
||||
|
||||
$('#refresh').change(function () {
|
||||
$('#hidden-vc_refr').val($('#refresh option:selected').val());
|
||||
});
|
||||
}
|
||||
|
||||
$("#group_id").change (function () {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_agents_group_json" : 1,
|
||||
"id_group" : this.value,
|
||||
"privilege" : "AW",
|
||||
"keys_prefix" : "_",
|
||||
"recursion" : $('#checkbox-recursion').is(':checked')
|
||||
},
|
||||
function (data, status) {
|
||||
$("#id_agents2").html('');
|
||||
$("#module").html('');
|
||||
jQuery.each (data, function (id, value) {
|
||||
// Remove keys_prefix from the index
|
||||
id = id.substring(1);
|
||||
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente"])
|
||||
.html (value["alias"]);
|
||||
$("#id_agents").append (option);
|
||||
$("#id_agents2").append (option);
|
||||
});
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
|
||||
$("#checkbox-recursion").change (function () {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_agents_group_json" : 1,
|
||||
"id_group" : $("#group_id").val(),
|
||||
"privilege" : "AW",
|
||||
"keys_prefix" : "_",
|
||||
"recursion" : $('#checkbox-recursion').is(':checked')
|
||||
},
|
||||
function (data, status) {
|
||||
$("#id_agents2").html('');
|
||||
$("#module").html('');
|
||||
jQuery.each (data, function (id, value) {
|
||||
// Remove keys_prefix from the index
|
||||
id = id.substring(1);
|
||||
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente"])
|
||||
.html (value["alias"]);
|
||||
$("#id_agents").append (option);
|
||||
$("#id_agents2").append (option);
|
||||
});
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
|
||||
$("#modulegroup").change (function () {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_modules_group_json" : 1,
|
||||
"id_module_group" : this.value,
|
||||
"id_agents" : $("#id_agents2").val(),
|
||||
"selection" : $("#selection_agent_module").val()
|
||||
},
|
||||
function (data, status) {
|
||||
$("#module").html('');
|
||||
if(data){
|
||||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente_modulo"])
|
||||
.html (value["nombre"]);
|
||||
$("#module").append (option);
|
||||
});
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
|
||||
$("#id_agents2").click (function(){
|
||||
selection_agent_module();
|
||||
});
|
||||
|
||||
$("#selection_agent_module").change(function() {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_modules_group_json" : 1,
|
||||
"id_module_group" : $("#modulegroup").val(),
|
||||
"id_agents" : $("#id_agents2").val(),
|
||||
"selection" : $("#selection_agent_module").val()
|
||||
},
|
||||
function (data, status) {
|
||||
$("#module").html('');
|
||||
if(data){
|
||||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente_modulo"])
|
||||
.html (value["nombre"]);
|
||||
$("#module").append (option);
|
||||
});
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
function selection_agent_module() {
|
||||
jQuery.post ("ajax.php",
|
||||
{"page" : "operation/agentes/ver_agente",
|
||||
"get_modules_group_json" : 1,
|
||||
"id_module_group" : $("#modulegroup").val(),
|
||||
"id_agents" : $("#id_agents2").val(),
|
||||
"selection" : $("#selection_agent_module").val()
|
||||
},
|
||||
function (data, status) {
|
||||
$("#module").html('');
|
||||
if(data){
|
||||
jQuery.each (data, function (id, value) {
|
||||
option = $("<option></option>")
|
||||
.attr ("value", value["id_agente_modulo"])
|
||||
.html (value["nombre"]);
|
||||
$("#module").append (option);
|
||||
});
|
||||
|
||||
var id_modules = getQueryParam("full_modules_selected");
|
||||
if(id_modules !== null) {
|
||||
id_modules = id_modules.split(";");
|
||||
id_modules.forEach(function(element) {
|
||||
$("#module option[value="+ element +"]").attr("selected",true);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
}
|
||||
|
||||
function getQueryParam (key) {
|
||||
key = key.replace(/[[]/, '[');
|
||||
key = key.replace(/[]]/, ']');
|
||||
var pattern = "[?&]" + key + "=([^&#]*)";
|
||||
var regex = new RegExp(pattern);
|
||||
var url = unescape(window.location.href);
|
||||
var results = regex.exec(url);
|
||||
if (results === null) {
|
||||
return null;
|
||||
} else {
|
||||
return results[1];
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -23,12 +23,12 @@ function pluginreg_extension_main()
|
|||
return;
|
||||
}
|
||||
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
ui_print_page_header(__('Plugin registration'), 'images/extensions.png', false, '', true, '');
|
||||
|
||||
echo '<div class="new_task">
|
||||
<div class="image_task">';
|
||||
echo html_print_image('images/firts_task/icono_grande_import.png', true, ['title' => __('Plugin Registration') ]);
|
||||
echo html_print_image('images/first_task/icono_grande_import.png', true, ['title' => __('Plugin Registration') ]);
|
||||
echo '</div>';
|
||||
echo '<div class="text_task">';
|
||||
echo '<h3>'.__('Plugin registration').'</h3>';
|
||||
|
|
|
@ -333,12 +333,12 @@ function quickShellSettings()
|
|||
|
||||
$gotty_user = get_parameter(
|
||||
'gotty_user',
|
||||
$config['gotty_user']
|
||||
''
|
||||
);
|
||||
|
||||
$gotty_pass = get_parameter(
|
||||
'gotty_pass',
|
||||
io_output_password($config['gotty_pass'])
|
||||
''
|
||||
);
|
||||
|
||||
$gotty_pass = io_input_password($gotty_pass);
|
||||
|
@ -373,6 +373,7 @@ function quickShellSettings()
|
|||
}
|
||||
|
||||
if ($config['gotty_pass'] != $gotty_pass) {
|
||||
$gotty_pass = io_input_password($gotty_pass);
|
||||
config_update_value('gotty_pass', $gotty_pass);
|
||||
$changes++;
|
||||
$critical++;
|
||||
|
|
|
@ -12,4 +12,30 @@ ALTER TABLE `tevent_rule` ADD COLUMN `log_content` TEXT;
|
|||
ALTER TABLE `tevent_rule` ADD COLUMN `log_source` TEXT;
|
||||
ALTER TABLE `tevent_rule` ADD COLUMN `log_agent` TEXT;
|
||||
|
||||
CREATE TABLE `tremote_command` (
|
||||
`id` SERIAL,
|
||||
`name` varchar(150) NOT NULL,
|
||||
`timeout` int(10) unsigned NOT NULL default 30,
|
||||
`retries` int(10) unsigned NOT NULL default 3,
|
||||
`preconditions` text,
|
||||
`script` text,
|
||||
`postconditions` text,
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`id_group` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tremote_command_target` (
|
||||
`id` SERIAL,
|
||||
`rcmd_id` bigint unsigned NOT NULL,
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`stdout` text,
|
||||
`stderr` text,
|
||||
`errorlevel` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
COMMIT;
|
||||
|
|
|
@ -1250,13 +1250,13 @@ ALTER TABLE titem MODIFY `source_data` int(10) unsigned;
|
|||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 32);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('MR', 33);
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_docs_logo', 'default_docs.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_support_logo', 'default_support.png');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('custom_logo_white_bg_preview', 'pandora_logo_head_white_bg.png');
|
||||
UPDATE tconfig SET value = 'https://licensing.artica.es/pandoraupdate7/server.php' WHERE token='url_update_manager';
|
||||
DELETE FROM `tconfig` WHERE `token` = 'current_package_enterprise';
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '739');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('current_package_enterprise', '741');
|
||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('status_monitor_fields', 'policy,agent,data_type,module_name,server_type,interval,status,graph,warn,data,timestamp');
|
||||
UPDATE `tconfig` SET `value` = 'mini_severity,evento,id_agente,estado,timestamp' WHERE `token` LIKE 'event_fields';
|
||||
DELETE FROM `tconfig` WHERE `token` LIKE 'integria_api_password';
|
||||
|
@ -2303,3 +2303,44 @@ CREATE TABLE `tdeployment_hosts` (
|
|||
ON UPDATE CASCADE ON DELETE SET NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tremote_command`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE `tremote_command` (
|
||||
`id` SERIAL,
|
||||
`name` varchar(150) NOT NULL,
|
||||
`timeout` int(10) unsigned NOT NULL default 30,
|
||||
`retries` int(10) unsigned NOT NULL default 3,
|
||||
`preconditions` text,
|
||||
`script` text,
|
||||
`postconditions` text,
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`id_group` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tremote_command_target`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE `tremote_command_target` (
|
||||
`id` SERIAL,
|
||||
`rcmd_id` bigint unsigned NOT NULL,
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`stdout` text,
|
||||
`stderr` text,
|
||||
`errorlevel` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Extra tnetwork_component
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (786,'N. total processes','Number of running processes in a Windows system.',11,34,0,0,300,0,'tasklist /NH | findstr /c /v ""','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (787,'Free space in C:','Free space available in C:',11,34,0,0,300,0,'powershell $obj=(Get-WmiObject -class "Win32_LogicalDisk" -namespace "root\CIMV2") ; $obj.FreeSpace * 100 /$obj.Size','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (788,'Linux uptime','System uptime',43,36,0,0,300,0,'uptime |sed s/us\.*$//g | sed s/,\.*$//g','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (789,'Linux processes','Running processes',43,34,0,0,300,0,'ps elf | wc -l','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (790,'Linux system load','Current load (5 min)',43,34,0,0,300,0,'uptime | awk '{print $(NF-1)}' | tr -d ','','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (791,'Linux available memory percent','Available memory %',43,34,0,0,300,0,'free | grep Mem | awk '{print $NF/$2 * 100}'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (792,'Linux available disk /','Available free space in mountpoint /',43,34,0,0,300,0,'df / | tail -n +2 | awk '{print $(NF-1)}' | tr -d '%'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
|
|
|
@ -105,7 +105,7 @@ if (check_login()) {
|
|||
|
||||
echo __(
|
||||
"This is the online help for %s console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use %s. Official documentation of %s is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.<br><br>
|
||||
<a href='%s' target='_blanck' style='color: #82b92e; font-size: 10pt; text-decoration: underline;'>Download the official documentation</a>",
|
||||
<a href='%s' target='_blanck' class='pandora_green_text' style='font-size: 10pt; text-decoration: underline;'>Download the official documentation</a>",
|
||||
get_product_name(),
|
||||
get_product_name(),
|
||||
get_product_name(),
|
||||
|
|
|
@ -33,13 +33,13 @@ if (! check_acl($config['id_user'], 0, 'PM')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no HA clusters defined yet.') ]);
|
||||
?>
|
||||
|
||||
<div class="new_task_cluster">
|
||||
<div class="image_task_cluster">
|
||||
<?php echo html_print_image('images/firts_task/slave-mode.png', true, ['title' => __('Clusters')]); ?>
|
||||
<?php echo html_print_image('images/first_task/slave-mode.png', true, ['title' => __('Clusters')]); ?>
|
||||
</div>
|
||||
<div class="text_task_cluster">
|
||||
<h3> <?php echo __('PANDORA FMS DB CLUSTER'); ?></h3>
|
|
@ -24,7 +24,7 @@ if (! check_acl($config['id_user'], 0, 'AR') && ! check_acl($config['id_user'],
|
|||
return;
|
||||
}
|
||||
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no clusters defined yet.') ]);
|
||||
|
@ -32,7 +32,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no cluster
|
|||
|
||||
<div class="new_task_cluster">
|
||||
<div class="image_task_cluster">
|
||||
<?php echo html_print_image('images/firts_task/icono-cluster-activo.png', true, ['title' => __('Clusters')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono-cluster-activo.png', true, ['title' => __('Clusters')]); ?>
|
||||
</div>
|
||||
<div class="text_task_cluster">
|
||||
<h3> <?php echo __('Create Cluster'); ?></h3>
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no collections defined yet.') ]); ?>
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no custom fields defined yet.') ]);
|
||||
|
@ -21,7 +21,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no custom
|
|||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Custom Fields')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_reconserver.png', true, ['title' => __('Custom Fields')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Custom Fields'); ?></h3><p id="description_task">
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no custom graphs defined yet.') ]);
|
||||
|
@ -21,7 +21,7 @@ ui_print_info_message(['no_close' => true, 'message' => __('There are no custom
|
|||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_custom_reporting.png', true, ['title' => __('Custom Graphs')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_custom_reporting.png', true, ['title' => __('Custom Graphs')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Custom Graph'); ?></h3><p id="description_task">
|
|
@ -13,13 +13,13 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no custom fields defined yet.') ]); ?>
|
||||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Fields Manager')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_reconserver.png', true, ['title' => __('Fields Manager')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Fields Manager'); ?></h3><p id="description_task">
|
|
@ -15,7 +15,7 @@ global $config;
|
|||
global $incident_w;
|
||||
global $incident_m;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no incidents defined yet.') ]);
|
||||
|
@ -25,7 +25,7 @@ if ($incident_w || $incident_m) {
|
|||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_incidencia.png', true, ['title' => __('Incidents')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_incidencia.png', true, ['title' => __('Incidents')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Incidents'); ?></h3><p id="description_task">
|
|
@ -15,7 +15,7 @@ global $config;
|
|||
global $vconsoles_write;
|
||||
global $vconsoles_manage;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
|
||||
ui_print_info_message(
|
||||
[
|
||||
|
@ -28,7 +28,7 @@ if ($vconsoles_write || $vconsoles_manage) {
|
|||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_visualconsole.png', true, ['title' => __('Visual Console')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_visualconsole.png', true, ['title' => __('Visual Console')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Visual Console'); ?></h3><p id="description_task">
|
|
@ -13,7 +13,7 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no network map defined yet.') ]);
|
||||
|
@ -23,7 +23,7 @@ $networkmap_types = networkmap_get_types($strict_user);
|
|||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Network Map')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_reconserver.png', true, ['title' => __('Network Map')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Network Map'); ?></h3><p id="description_task">
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
/**
|
||||
* Omnishell first task.
|
||||
*
|
||||
* @category Omnishell
|
||||
* @package Pandora FMS
|
||||
* @subpackage Enterprise
|
||||
* @version 1.0.0
|
||||
* @license See below
|
||||
*
|
||||
* ______ ___ _______ _______ ________
|
||||
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||
*
|
||||
* ============================================================================
|
||||
* Copyright (c) 2007-2019 Artica Soluciones Tecnologicas, http://www.artica.es
|
||||
* This code is NOT free software. This code is NOT licenced under GPL2 licence
|
||||
* You cannnot redistribute it without written permission of copyright holder.
|
||||
* ============================================================================
|
||||
*/
|
||||
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There is no command defined yet.') ]); ?>
|
||||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/first_task/omnishell.png', true, ['title' => __('Omnishell')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Omnishell'); ?></h3><p id="description_task">
|
||||
<?php
|
||||
echo '<p>'.__(
|
||||
'Omnishell is an enterprise feature which allows you to execute a structured command along any agent in your %s. The only requirement is to have remote configuration enabled in your agent.',
|
||||
io_safe_output(get_product_name())
|
||||
).'</p>';
|
||||
|
||||
echo '<p>'.__(
|
||||
'You can execute any command on as many agents you need, and check the execution on all of them using the Omnishell Command View'
|
||||
).'</p>';
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if (enterprise_installed()) {
|
||||
?>
|
||||
<form action="index.php?sec=gextensions&sec2=enterprise/tools/omnishell&page=1" method="post">
|
||||
<input type="submit" class="button_task" value="<?php echo __('Define a command'); ?>" />
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
|
@ -13,13 +13,13 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no planned downtime defined yet.') ]); ?>
|
||||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_visualconsole.png', true, ['title' => __('Planned Downtime')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_visualconsole.png', true, ['title' => __('Planned Downtime')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Planned Downtime'); ?></h3><p id="description_task">
|
|
@ -13,13 +13,13 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no discovery tasks defined yet.') ]); ?>
|
||||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('Discovery server')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_reconserver.png', true, ['title' => __('Discovery server')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Discovery Task'); ?></h3><p id="description_task">
|
|
@ -15,14 +15,14 @@ global $config;
|
|||
global $agent_w;
|
||||
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no services defined yet.') ]); ?>
|
||||
|
||||
<?php if ($agent_w) { ?>
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_servicios.png', true, ['title' => __('Services')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_servicios.png', true, ['title' => __('Services')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Services'); ?></h3><p id="description_task">
|
|
@ -13,13 +13,13 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no SNMP filter defined yet.') ]); ?>
|
||||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_reconserver.png', true, ['title' => __('SNMP Filter')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_reconserver.png', true, ['title' => __('SNMP Filter')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create SNMP Filter'); ?></h3><p id="description_task">
|
|
@ -13,13 +13,13 @@
|
|||
// GNU General Public License for more details.
|
||||
global $config;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php ui_print_info_message(['no_close' => true, 'message' => __('There are no tags defined yet.') ]); ?>
|
||||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_gestiondetags.png', true, ['title' => __('Tags')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_gestiondetags.png', true, ['title' => __('Tags')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Tags'); ?></h3><p id="description_task">
|
|
@ -15,7 +15,7 @@ global $config;
|
|||
global $networkmaps_write;
|
||||
global $networkmaps_manage;
|
||||
check_login();
|
||||
ui_require_css_file('firts_task');
|
||||
ui_require_css_file('first_task');
|
||||
?>
|
||||
<?php
|
||||
ui_print_info_message(['no_close' => true, 'message' => __('There are no transactions defined yet.') ]);
|
||||
|
@ -25,7 +25,7 @@ if ($networkmaps_write || $networkmaps_manage) {
|
|||
|
||||
<div class="new_task">
|
||||
<div class="image_task">
|
||||
<?php echo html_print_image('images/firts_task/icono_grande_topology.png', true, ['title' => __('Transactions')]); ?>
|
||||
<?php echo html_print_image('images/first_task/icono_grande_topology.png', true, ['title' => __('Transactions')]); ?>
|
||||
</div>
|
||||
<div class="text_task">
|
||||
<h3> <?php echo __('Create Transactions'); ?></h3><p id="description_task">
|
|
@ -348,7 +348,7 @@ if ($config['menu_type'] == 'classic') {
|
|||
|
||||
|
||||
// Support.
|
||||
if (defined('PANDORA_ENTERPRISE')) {
|
||||
if (enterprise_installed()) {
|
||||
$header_support_link = $config['custom_support_url'];
|
||||
} else {
|
||||
$header_support_link = 'https://pandorafms.com/forums/';
|
||||
|
@ -635,12 +635,6 @@ if ($config['menu_type'] == 'classic') {
|
|||
* Loads modal from AJAX to add feedback.
|
||||
*/
|
||||
function show_feedback() {
|
||||
<?php
|
||||
// Require specific CSS and JS.
|
||||
ui_require_css_file('wizard');
|
||||
ui_require_css_file('discovery');
|
||||
ui_require_css_file('diagnostics');
|
||||
?>
|
||||
var btn_ok_text = '<?php echo __('Send'); ?>';
|
||||
var btn_cancel_text = '<?php echo __('Cancel'); ?>';
|
||||
var title = '<?php echo __('Report an issue'); ?>';
|
||||
|
@ -719,13 +713,15 @@ if ($config['menu_type'] == 'classic') {
|
|||
$("#agent_access").css("display","");
|
||||
});
|
||||
|
||||
// Feedback.
|
||||
$("#feedback-header").click(function () {
|
||||
// Clean DOM.
|
||||
$("#feedback-header").empty();
|
||||
// Function charge Modal.
|
||||
show_feedback();
|
||||
});
|
||||
<?php if (enterprise_installed()) { ?>
|
||||
// Feedback.
|
||||
$("#feedback-header").click(function () {
|
||||
// Clean DOM.
|
||||
$("#feedback-header").empty();
|
||||
// Function charge Modal.
|
||||
show_feedback();
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
function blinkpubli(){
|
||||
$(".publienterprise").delay(100).fadeTo(300,0.2).delay(100).fadeTo(300,1, blinkpubli);
|
||||
|
|
|
@ -88,6 +88,24 @@ if (!empty($config['login_background'])) {
|
|||
$login_body_style = "style=\"background:linear-gradient(74deg, #02020255 36%, transparent 36%), url('".$background_url."');\"";
|
||||
}
|
||||
|
||||
// Get alternative custom in case of db fail.
|
||||
$custom_fields = [
|
||||
'custom_logo_login',
|
||||
'custom_splash_login',
|
||||
'custom_title1_login',
|
||||
'custom_title2_login',
|
||||
'rb_product_name',
|
||||
];
|
||||
|
||||
foreach ($custom_fields as $field) {
|
||||
if (!isset($config[$field])) {
|
||||
if (isset($config[$field.'_alt'])) {
|
||||
$config[$field] = $config[$field.'_alt'];
|
||||
$custom_conf_enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get the custom icons.
|
||||
$docs_logo = ui_get_docs_logo();
|
||||
$support_logo = ui_get_support_logo();
|
||||
|
@ -96,16 +114,16 @@ echo '<div id="header_login">';
|
|||
|
||||
echo '<div id="list_icon_docs_support"><ul>';
|
||||
if ($docs_logo !== false) {
|
||||
echo '<li><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank"><img src="'.$docs_logo.'" alt="docs"></a></li>';
|
||||
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank"><img src="'.$docs_logo.'" alt="docs"></a></li>';
|
||||
}
|
||||
|
||||
echo '<li><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank">'.__('Docs').'</li>';
|
||||
echo '<li><a href="'.$config['custom_docs_url'].'" target="_blank">'.__('Docs').'</li>';
|
||||
if (file_exists(ENTERPRISE_DIR.'/load_enterprise.php')) {
|
||||
if ($support_logo !== false) {
|
||||
echo '<li id="li_margin_left"><a href="'.ui_get_full_external_url($config['custom_docs_url']).'" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
|
||||
echo '<li id="li_margin_left"><a href="'.$config['custom_docs_url'].'" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
|
||||
}
|
||||
|
||||
echo '<li><a href="'.ui_get_full_external_url($config['custom_support_url']).'" target="_blank">'.__('Support').'</li>';
|
||||
echo '<li><a href="'.$config['custom_support_url'].'" target="_blank">'.__('Support').'</li>';
|
||||
} else {
|
||||
echo '<li id="li_margin_left"><a href="https://pandorafms.com/monitoring-services/support/" target="_blank"><img src="'.$support_logo.'" alt="support"></a></li>';
|
||||
echo '<li>'.__('Support').'</li>';
|
||||
|
@ -133,7 +151,7 @@ if (defined('METACONSOLE')) {
|
|||
html_print_image('enterprise/images/custom_logo_login/'.$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
}
|
||||
} else {
|
||||
if (!isset($config['custom_logo_login']) || $config['custom_logo_login'] == 0) {
|
||||
if (!isset($config['custom_logo_login']) || $config['custom_logo_login'] === 0) {
|
||||
html_print_image('images/custom_logo_login/pandora_logo.png', false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
} else {
|
||||
html_print_image('images/custom_logo_login/'.$config['custom_logo_login'], false, ['class' => 'login_logo', 'alt' => 'logo', 'border' => 0, 'title' => $logo_title], false, true);
|
||||
|
@ -423,9 +441,14 @@ if ($login_screen == 'logout') {
|
|||
}
|
||||
|
||||
switch ($login_screen) {
|
||||
case 'error_authconfig':
|
||||
case 'error_dbconfig':
|
||||
$title = __('Problem with %s database', get_product_name());
|
||||
case 'error_authconfig':
|
||||
if (!isset($config['rb_product_name_alt'])) {
|
||||
$title = __('Problem with %s database', get_product_name());
|
||||
} else {
|
||||
$title = __('Problem with %s database', $config['rb_product_name_alt']);
|
||||
}
|
||||
|
||||
$message = __(
|
||||
'Cannot connect to the database, please check your database setup in the <b>include/config.php</b> file.<i><br/><br/>
|
||||
Probably your database, hostname, user or password values are incorrect or
|
||||
|
|
|
@ -83,7 +83,6 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="alert_messages_na">
|
||||
|
||||
<div class='modalheade'>
|
||||
|
@ -100,10 +99,29 @@ background:black;opacity:0.1;left:0px;top:0px;width:100%;height:100%;
|
|||
?>
|
||||
</div>
|
||||
</div>
|
||||
<a href='https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration' target='_blank'>
|
||||
<div class='modalwikibutto cerrar'>
|
||||
<span class='modalwikibuttontex'> <?php echo __('Documentation'); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
$custom_conf_enabled = false;
|
||||
foreach ($config as $key => $value) {
|
||||
if (preg_match('/._alt/i', $key)) {
|
||||
$custom_conf_enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$custom_conf_enabled) {
|
||||
echo '
|
||||
<a href="https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Configuration" target="_blank">
|
||||
<div class="modalwikibutto cerrar">
|
||||
<span class="modalwikibuttontex">'.__('Documentation').'
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ if ($new_agent) {
|
|||
|
||||
$table_alias = '<div class="label_select"><p class="input_label">'.__('Alias').': '.ui_print_help_tip(__('Characters /,\,|,%,#,&,$ will be ignored'), true).'</p>';
|
||||
$table_alias .= '<div class='.$label_select_parent.'>';
|
||||
$table_alias .= '<div class='.$label_select_child_left.'>'.html_print_input_text('alias', $alias, '', 50, 100, true).'</div>';
|
||||
$table_alias .= '<div class='.$label_select_child_left.'>'.html_print_input_text('alias', $alias, '', 50, 100, true, false, true).'</div>';
|
||||
if ($new_agent) {
|
||||
$table_alias .= '<div class="label_select_child_right">'.html_print_checkbox_switch('alias_as_name', 1, $config['alias_as_name'], true).__('Use alias as name').'</div>';
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ if ($fields) {
|
|||
$table->size[3] = '8%';
|
||||
$table->data = [];
|
||||
} else {
|
||||
include_once $config['homedir'].'/general/firts_task/fields_manager.php';
|
||||
include_once $config['homedir'].'/general/first_task/fields_manager.php';
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ if (!empty($groups)) {
|
|||
|
||||
// No downtimes cause the user has not anyone.
|
||||
if (!$downtimes && !$filter_performed) {
|
||||
include_once $config['homedir'].'/general/firts_task/planned_downtime.php';
|
||||
include_once $config['homedir'].'/general/first_task/planned_downtime.php';
|
||||
}
|
||||
// No downtimes cause the user performed a search.
|
||||
else if (!$downtimes) {
|
||||
|
|
|
@ -184,9 +184,11 @@ if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
|
|||
}
|
||||
|
||||
ui_require_css_file('cluetip', 'include/styles/js/');
|
||||
ui_require_jquery_file('validate');
|
||||
ui_require_jquery_file('cluetip');
|
||||
ui_require_jquery_file('pandora.controls');
|
||||
ui_require_jquery_file('bgiframe');
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
|
@ -201,7 +203,25 @@ $(document).ready (function () {
|
|||
}
|
||||
});
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
// Rule.
|
||||
$.validator.addMethod(
|
||||
"valueNotEquals",
|
||||
function(value, element, arg) {
|
||||
return arg != value;
|
||||
},
|
||||
"Value must not equal arg."
|
||||
);
|
||||
|
||||
// configure your validation
|
||||
$("form.add_alert_form").validate({
|
||||
rules: {
|
||||
id_agent_module: { valueNotEquals: "0" }
|
||||
},
|
||||
messages: {
|
||||
id_agent_module: { valueNotEquals: "Please select an item!" }
|
||||
}
|
||||
});
|
||||
$("select#template").change (function () {
|
||||
id = this.value;
|
||||
$a = $(this).siblings ("a.template_details");
|
||||
|
|
|
@ -346,6 +346,8 @@ if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, '
|
|||
$sub['godmode/setup/links']['id'] = 'Links';
|
||||
$sub['tools/diagnostics']['text'] = __('Diagnostic info');
|
||||
$sub['tools/diagnostics']['id'] = 'Diagnostic info';
|
||||
enterprise_hook('omnishell');
|
||||
|
||||
$sub['godmode/setup/news']['text'] = __('Site news');
|
||||
$sub['godmode/setup/news']['id'] = 'Site news';
|
||||
$sub['godmode/setup/file_manager']['text'] = __('File manager');
|
||||
|
|
|
@ -290,7 +290,7 @@ $table_aux = new stdClass();
|
|||
foreach ($result_graphs as $graph) {
|
||||
$data = [];
|
||||
|
||||
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$graph['id_graph'].'">'.ui_print_truncate_text($graph['name'], 70).'</a>';
|
||||
$data[0] = '<a href="index.php?sec=reporting&sec2=operation/reporting/graph_viewer&view_graph=1&id='.$graph['id_graph'].'">'.ui_print_truncate_text(io_safe_output($graph['name']), 70).'</a>';
|
||||
|
||||
$data[1] = ui_print_truncate_text($graph['description'], 70);
|
||||
|
||||
|
@ -337,7 +337,7 @@ $table_aux = new stdClass();
|
|||
|
||||
echo '</div>';
|
||||
} else {
|
||||
include_once $config['homedir'].'/general/firts_task/custom_graphs.php';
|
||||
include_once $config['homedir'].'/general/first_task/custom_graphs.php';
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -395,7 +395,7 @@ if ($own_info['is_admin'] || $vconsoles_read) {
|
|||
if (!$maps && !is_metaconsole()) {
|
||||
$total = count(visual_map_get_user_layouts($config['id_user'], false, false, false));
|
||||
if (!$total) {
|
||||
include_once $config['homedir'].'/general/firts_task/map_builder.php';
|
||||
include_once $config['homedir'].'/general/first_task/map_builder.php';
|
||||
} else {
|
||||
ui_print_info_message(
|
||||
[
|
||||
|
|
|
@ -154,7 +154,7 @@ foreach ($servers as $server) {
|
|||
if ($server['type'] == 'recon') {
|
||||
$data[8] .= '<a href="'.ui_get_full_url('index.php?sec=gservers&sec2=godmode/servers/discovery&wiz=tasklist').'">';
|
||||
$data[8] .= html_print_image(
|
||||
'images/firts_task/icono_grande_reconserver.png',
|
||||
'images/first_task/icono_grande_reconserver.png',
|
||||
true,
|
||||
[
|
||||
'title' => __('Manage Discovery tasks'),
|
||||
|
|
|
@ -557,7 +557,7 @@ $row++;
|
|||
|
||||
|
||||
// For 5.1 Autohidden menu feature
|
||||
$table_styles->data['autohidden'][0] = __('Autohidden menu');
|
||||
$table_styles->data['autohidden'][0] = __('Automatically hide submenu');
|
||||
$table_styles->data['autohidden'][1] = html_print_checkbox_switch(
|
||||
'autohidden_menu',
|
||||
1,
|
||||
|
@ -1032,6 +1032,12 @@ $row++;
|
|||
);
|
||||
|
||||
$row++;
|
||||
|
||||
$table_other->data[$row][0] = __('Font size for items reports');
|
||||
$table_other->data[$row][1] = "<input type ='number' value=".$config['font_size_item_report']." size='1' name='font_size_item_report' min='1' max='9' step='0.1'>";
|
||||
|
||||
$row++;
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
$dirItems = scandir($config['homedir'].'/images/custom_logo');
|
||||
foreach ($dirItems as $entryDir) {
|
||||
|
|
|
@ -304,7 +304,7 @@ if (!empty($result)) {
|
|||
} else if ($filter_performed) {
|
||||
echo $filter_form;
|
||||
} else {
|
||||
include $config['homedir'].'/general/firts_task/tags.php';
|
||||
include $config['homedir'].'/general/first_task/tags.php';
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ class DiscoveryTaskList extends Wizard
|
|||
$ret2 = $this->showList();
|
||||
|
||||
if ($ret === false && $ret2 === false) {
|
||||
include_once $config['homedir'].'/general/firts_task/recon_view.php';
|
||||
include_once $config['homedir'].'/general/first_task/recon_view.php';
|
||||
} else {
|
||||
$form = [
|
||||
'form' => [
|
||||
|
|
|
@ -436,11 +436,15 @@ class Wizard
|
|||
*
|
||||
* @param array $input Definition of target block to be printed.
|
||||
* @param boolean $return Return as string or direct output.
|
||||
* @param boolean $direct Avoid encapsulation if input print is direct.
|
||||
*
|
||||
* @return string HTML content.
|
||||
*/
|
||||
public function printBlock(array $input, bool $return=false, bool $not_direct=false)
|
||||
{
|
||||
public function printBlock(
|
||||
array $input,
|
||||
bool $return=false,
|
||||
bool $direct=false
|
||||
) {
|
||||
$output = '';
|
||||
if ($input['hidden'] == 1) {
|
||||
$class = ' hidden';
|
||||
|
@ -453,7 +457,7 @@ class Wizard
|
|||
}
|
||||
|
||||
if (is_array($input['block_content']) === true) {
|
||||
$not_direct = (bool) $input['direct'];
|
||||
$direct = (bool) $input['direct'];
|
||||
|
||||
// Print independent block of inputs.
|
||||
$output .= '<li id="li-'.$input['block_id'].'" class="'.$class.'">';
|
||||
|
@ -462,17 +466,21 @@ class Wizard
|
|||
$output .= '<'.$input['wrapper'].' id="'.$input['block_id'].'" class="'.$class.'">';
|
||||
}
|
||||
|
||||
if (!$not_direct) {
|
||||
if (!$direct) {
|
||||
// Avoid encapsulation if input is direct => 1.
|
||||
$output .= '<ul class="wizard '.$input['block_class'].'">';
|
||||
}
|
||||
|
||||
foreach ($input['block_content'] as $input) {
|
||||
$output .= $this->printBlock($input, $return, (bool) $not_direct);
|
||||
$output .= $this->printBlock(
|
||||
$input,
|
||||
$return,
|
||||
(bool) $direct
|
||||
);
|
||||
}
|
||||
|
||||
// Close block.
|
||||
if (!$not_direct) {
|
||||
if (!$direct) {
|
||||
$output .= '</ul>';
|
||||
}
|
||||
|
||||
|
@ -483,7 +491,7 @@ class Wizard
|
|||
$output .= '</li>';
|
||||
} else {
|
||||
if ($input['arguments']['type'] != 'hidden') {
|
||||
if (!$not_direct) {
|
||||
if (!$direct) {
|
||||
$output .= '<li id="'.$input['id'].'" class="'.$class.'">';
|
||||
}
|
||||
|
||||
|
@ -491,7 +499,7 @@ class Wizard
|
|||
$output .= $this->printInput($input['arguments']);
|
||||
// Allow dynamic content.
|
||||
$output .= $input['extra'];
|
||||
if (!$not_direct) {
|
||||
if (!$direct) {
|
||||
$output .= '</li>';
|
||||
}
|
||||
} else {
|
||||
|
@ -806,8 +814,11 @@ class Wizard
|
|||
$padding_left = isset($column['padding-left']) ? 'padding-left: '.$column['padding-left'].';' : 'padding-left: 0;';
|
||||
$padding_right = isset($column['padding-right']) ? 'padding-right: '.$column['padding-right'].';' : 'padding-right: 0;';
|
||||
$extra_styles = isset($column['style']) ? $column['style'] : '';
|
||||
$class = isset($column['class']) ? $column['class'] : '';
|
||||
|
||||
$output .= '<div style="'.$width.$padding_left.$padding_right.$extra_styles.'">';
|
||||
$output .= '<div class="'.$class.'" ';
|
||||
$output .= ' style="'.$width.$padding_left.$padding_right;
|
||||
$output .= $extra_styles.'">';
|
||||
|
||||
foreach ($column['inputs'] as $input) {
|
||||
if (is_array($input)) {
|
||||
|
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 190 KiB |
|
@ -706,18 +706,34 @@ class Diagnostics extends Wizard
|
|||
$bytes = 1048576;
|
||||
$mega = 1024;
|
||||
switch ($item['Variable_name']) {
|
||||
case 'sql_mode':
|
||||
$name = __('Sql mode');
|
||||
$value = ($item['Value']);
|
||||
$status = (empty($item['Value']) === true) ? 1 : 0;
|
||||
$message = __('Must be empty');
|
||||
case 'innodb_buffer_pool_size':
|
||||
$name = __('InnoDB buffer pool size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 250) ? 1 : 0;
|
||||
$message = __(
|
||||
'It has to be 40% of the server memory not recommended to be greater or less'
|
||||
);
|
||||
break;
|
||||
|
||||
case 'innodb_log_file_size':
|
||||
$name = __('InnoDB log file size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 64) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 64M';
|
||||
case 'innodb_file_per_table':
|
||||
$name = __('InnoDB file per table');
|
||||
$value = $item['Value'];
|
||||
$status = ($item['Value'] === 'ON') ? 1 : 0;
|
||||
$message = __('Recommended ON');
|
||||
break;
|
||||
|
||||
case 'innodb_flush_log_at_trx_commit':
|
||||
$name = __('InnoDB flush log at trx-commit');
|
||||
$value = $item['Value'];
|
||||
$status = ($item['Value'] == 2) ? 1 : 0;
|
||||
$message = __('Recommended Value').' 2';
|
||||
break;
|
||||
|
||||
case 'innodb_lock_wait_timeout':
|
||||
$name = __('InnoDB lock wait timeout');
|
||||
$value = $item['Value'];
|
||||
$status = ($item['Value'] >= 90) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 90s';
|
||||
break;
|
||||
|
||||
case 'innodb_log_buffer_size':
|
||||
|
@ -727,13 +743,29 @@ class Diagnostics extends Wizard
|
|||
$message = __('Min. Recommended Value').' 16M';
|
||||
break;
|
||||
|
||||
case 'innodb_flush_log_at_trx_commit':
|
||||
$name = __('InnoDB flush log at trx-commit');
|
||||
$value = $item['Value'];
|
||||
$status = (($item['Value'] / $bytes) >= 0) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 0';
|
||||
case 'innodb_log_file_size':
|
||||
$name = __('InnoDB log file size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 64) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 64M';
|
||||
break;
|
||||
|
||||
/*
|
||||
case 'join_buffer_size':
|
||||
$name = __('Join buffer size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 265) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value 265');
|
||||
break;
|
||||
|
||||
case 'key_buffer_size':
|
||||
$name = __('Key buffer size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 256';
|
||||
break;
|
||||
*/
|
||||
|
||||
case 'max_allowed_packet':
|
||||
$name = __('Maximun allowed packet');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
|
@ -741,27 +773,34 @@ class Diagnostics extends Wizard
|
|||
$message = __('Min. Recommended Value').' 32M';
|
||||
break;
|
||||
|
||||
case 'innodb_buffer_pool_size':
|
||||
$name = __('InnoDB buffer pool size');
|
||||
$value = ($item['Value'] / $mega);
|
||||
$status = (($item['Value'] / $mega) >= 250) ? 1 : 0;
|
||||
$message = __(
|
||||
'It has to be 40% of the server memory not recommended to be greater or less'
|
||||
);
|
||||
case 'max_connections':
|
||||
$name = __('Maximun connections');
|
||||
$value = $item['Value'];
|
||||
$status = (($item['Value']) >= 90) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value');
|
||||
$message .= ' 90 ';
|
||||
$message .= __('conections');
|
||||
break;
|
||||
|
||||
case 'sort_buffer_size':
|
||||
$name = __('Sort buffer size');
|
||||
$value = number_format(($item['Value'] / $mega), 2);
|
||||
case 'query_cache_limit':
|
||||
$name = __('Query cache limit');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 8) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 8M';
|
||||
break;
|
||||
|
||||
case 'query_cache_min_res_unit':
|
||||
$name = __('Query cache min-res-unit');
|
||||
$value = ($item['Value'] / $mega);
|
||||
$status = (($item['Value'] / $mega) >= 2) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 2M';
|
||||
break;
|
||||
|
||||
case 'query_cache_size':
|
||||
$name = __('Query cache size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 32';
|
||||
break;
|
||||
|
||||
case 'join_buffer_size':
|
||||
$name = __('Join buffer size');
|
||||
$value = ($item['Value'] / $mega);
|
||||
$status = (($item['Value'] / $bytes) >= 265) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value 265');
|
||||
$message = __('Min. Recommended Value').' 32M';
|
||||
break;
|
||||
|
||||
case 'query_cache_type':
|
||||
|
@ -771,83 +810,48 @@ class Diagnostics extends Wizard
|
|||
$message = __('Recommended ON');
|
||||
break;
|
||||
|
||||
case 'query_cache_size':
|
||||
$name = __('Query cache size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 32MB';
|
||||
case 'read_buffer_size':
|
||||
$name = __('Read buffer size');
|
||||
$value = ($item['Value'] / $mega);
|
||||
$status = (($item['Value'] / $mega) >= 32) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 32K';
|
||||
break;
|
||||
|
||||
case 'query_cache_limit':
|
||||
$name = __('Query cache limit');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 256K';
|
||||
case 'read_rnd_buffer_size':
|
||||
$name = __('Read rnd-buffer size');
|
||||
$value = ($item['Value'] / $mega);
|
||||
$status = (($item['Value'] / $mega) >= 32) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 32K';
|
||||
break;
|
||||
|
||||
case 'innodb_lock_wait_timeout':
|
||||
$name = __('InnoDB lock wait timeout');
|
||||
$value = $item['Value'];
|
||||
$status = (($item['Value'] / $bytes) >= 90) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 90s';
|
||||
case 'sort_buffer_size':
|
||||
$name = __('Sort buffer size');
|
||||
$value = ($item['Value'] / $mega);
|
||||
$status = (($item['Value'] / $mega) >= 32) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 32K';
|
||||
break;
|
||||
|
||||
case 'sql_mode':
|
||||
$name = __('Sql mode');
|
||||
$value = ($item['Value']);
|
||||
$status = (empty($item['Value']) === true) ? 1 : 0;
|
||||
$message = __('Must be empty');
|
||||
break;
|
||||
|
||||
case 'thread_cache_size':
|
||||
$name = __('Thread cache size');
|
||||
$value = $item['Value'];
|
||||
$status = (($item['Value'] / $bytes) >= 8) ? 1 : 0;
|
||||
$status = ($item['Value'] >= 8) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 8';
|
||||
break;
|
||||
|
||||
case 'thread_stack':
|
||||
$name = __('Thread stack');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 256K';
|
||||
break;
|
||||
|
||||
case 'max_connections':
|
||||
$name = __('Maximun connections');
|
||||
$value = $item['Value'];
|
||||
$status = (($item['Value'] / $bytes) >= 90) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 90';
|
||||
break;
|
||||
|
||||
case 'key_buffer_size':
|
||||
$name = __('Key buffer size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 256) ? 1 : 0;
|
||||
$value = ($item['Value'] / $mega);
|
||||
$status = (($item['Value'] / $mega) >= 256) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 256';
|
||||
break;
|
||||
|
||||
case 'read_buffer_size':
|
||||
$name = __('Read buffer size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 32';
|
||||
break;
|
||||
|
||||
case 'read_rnd_buffer_size':
|
||||
$name = __('Read rnd-buffer size');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 32) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 32';
|
||||
break;
|
||||
|
||||
case 'query_cache_min_res_unit':
|
||||
$name = __('Query cache min-res-unit');
|
||||
$value = ($item['Value'] / $bytes);
|
||||
$status = (($item['Value'] / $bytes) >= 2) ? 1 : 0;
|
||||
$message = __('Min. Recommended Value').' 2k';
|
||||
break;
|
||||
|
||||
case 'innodb_file_per_table':
|
||||
$name = __('InnoDB file per table');
|
||||
$value = $item['Value'];
|
||||
$status = ($item['Value'] === 'ON') ? 1 : 0;
|
||||
$message = __('Recommended ON');
|
||||
break;
|
||||
|
||||
default:
|
||||
$name = '';
|
||||
$value = 0;
|
||||
|
|
|
@ -211,7 +211,13 @@ class WelcomeWindow extends Wizard
|
|||
$this->step = $config['welcome_state'];
|
||||
|
||||
// Get step available.
|
||||
if (empty($config['welcome_id_agent']) === true) {
|
||||
if (empty($config['welcome_mail_configured']) === true
|
||||
&& get_parameter('sec2') == 'godmode/setup/setup'
|
||||
&& get_parameter('section', '') == 'general'
|
||||
&& get_parameter('update_config', false) !== false
|
||||
) {
|
||||
$this->step = W_CONFIGURE_MAIL;
|
||||
} else if (empty($config['welcome_id_agent']) === true) {
|
||||
$this->step = W_CREATE_AGENT;
|
||||
} else if (empty($config['welcome_module']) === true) {
|
||||
$this->step = W_CREATE_MODULE;
|
||||
|
@ -219,8 +225,6 @@ class WelcomeWindow extends Wizard
|
|||
$this->step = W_CREATE_ALERT;
|
||||
} else if (empty($config['welcome_task']) === true) {
|
||||
$this->step = W_CREATE_TASK;
|
||||
} else if (empty($config['welcome_mail_configured']) === true) {
|
||||
$this->step = W_CONFIGURE_MAIL;
|
||||
}
|
||||
|
||||
return $this->step;
|
||||
|
@ -338,11 +342,11 @@ class WelcomeWindow extends Wizard
|
|||
$btn_create_alert_class = '';
|
||||
$btn_create_discovery_class = 'pending';
|
||||
|
||||
$li_configure_mail_class = 'green';
|
||||
$li_create_agent_class = 'green';
|
||||
$li_create_module_class = 'grey';
|
||||
$li_create_alert_class = 'grey';
|
||||
$li_create_discovery_class = 'green';
|
||||
$li_configure_mail_class = 'row_green';
|
||||
$li_create_agent_class = 'row_green';
|
||||
$li_create_module_class = 'row_grey';
|
||||
$li_create_alert_class = 'row_grey';
|
||||
$li_create_discovery_class = 'row_green';
|
||||
|
||||
if (empty($config['welcome_mail_configured']) === false) {
|
||||
$btn_configure_mail_class = ' completed';
|
||||
|
@ -351,18 +355,18 @@ class WelcomeWindow extends Wizard
|
|||
if (empty($config['welcome_id_agent']) === false) {
|
||||
$btn_create_agent_class = ' completed';
|
||||
$btn_create_module_class = ' pending';
|
||||
$li_create_module_class = 'green';
|
||||
$li_create_module_class = 'row_green';
|
||||
}
|
||||
|
||||
if (empty($config['welcome_module']) === false) {
|
||||
$btn_create_module_class = ' completed';
|
||||
$btn_create_alert_class = ' pending';
|
||||
$li_create_module_class = 'green';
|
||||
$li_create_module_class = 'row_green';
|
||||
}
|
||||
|
||||
if (empty($config['welcome_alert']) === false) {
|
||||
$btn_create_alert_class = ' completed';
|
||||
$li_create_alert_class = 'green';
|
||||
$li_create_alert_class = 'row_green';
|
||||
}
|
||||
|
||||
if (empty($config['welcome_task']) === false) {
|
||||
|
@ -376,8 +380,8 @@ class WelcomeWindow extends Wizard
|
|||
$btn_create_module_class = ' completed';
|
||||
$btn_create_alert_class = ' completed';
|
||||
$btn_create_discovery_class = ' completed';
|
||||
$li_create_module_class = 'green';
|
||||
$li_create_alert_class = 'green';
|
||||
$li_create_module_class = 'row_green';
|
||||
$li_create_alert_class = 'row_green';
|
||||
}
|
||||
|
||||
$form = [
|
||||
|
@ -543,7 +547,10 @@ class WelcomeWindow extends Wizard
|
|||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
];
|
||||
|
||||
if (enterprise_installed()) {
|
||||
$inputs[] = [
|
||||
'wrapper' => 'div',
|
||||
'block_id' => 'div_not_working',
|
||||
'class' => 'hole flex-row w100p',
|
||||
|
@ -569,8 +576,8 @@ class WelcomeWindow extends Wizard
|
|||
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
];
|
||||
}
|
||||
|
||||
$output = $this->printForm(
|
||||
[
|
||||
|
@ -785,6 +792,9 @@ class WelcomeWindow extends Wizard
|
|||
// Finished! do not show.
|
||||
$this->setStep(WELCOME_FINISHED);
|
||||
return false;
|
||||
} else if (empty($sec2) === true) {
|
||||
// Pending tasks.
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->step === WELCOME_FINISHED) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC191108';
|
||||
$build_version = 'PC191113';
|
||||
$pandora_version = 'v7.0NG.740';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -148,8 +148,6 @@ if (!isset($config['homeurl_static'])) {
|
|||
}
|
||||
}
|
||||
|
||||
db_select_engine();
|
||||
$config['dbconnection'] = db_connect();
|
||||
|
||||
|
||||
if (! defined('EXTENSIONS_DIR')) {
|
||||
|
@ -160,6 +158,9 @@ if (! defined('ENTERPRISE_DIR')) {
|
|||
define('ENTERPRISE_DIR', 'enterprise');
|
||||
}
|
||||
|
||||
db_select_engine();
|
||||
$config['dbconnection'] = db_connect();
|
||||
|
||||
require_once $ownDir.'functions_config.php';
|
||||
|
||||
date_default_timezone_set('Europe/Madrid');
|
||||
|
|
|
@ -1281,6 +1281,10 @@ function config_update_config()
|
|||
}
|
||||
|
||||
// Juanma (06/05/2014) New feature: Custom front page for reports.
|
||||
if (!config_update_value('font_size_item_report', get_parameter('font_size_item_report', 2))) {
|
||||
$error_update[] = __('Font size for items reports');
|
||||
}
|
||||
|
||||
if (!config_update_value('custom_report_front', get_parameter('custom_report_front'))) {
|
||||
$error_update[] = __('Custom report front');
|
||||
}
|
||||
|
@ -2809,6 +2813,10 @@ function config_process_config()
|
|||
config_update_value('custom_report_front', 0);
|
||||
}
|
||||
|
||||
if (!isset($config['font_size_item_report'])) {
|
||||
config_update_value('font_size_item_report', 2);
|
||||
}
|
||||
|
||||
if (!isset($config['custom_report_front_font'])) {
|
||||
config_update_value('custom_report_front_font', 'FreeSans.ttf');
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ function reporting_html_SLA($table, $item, $mini, $pdf=0)
|
|||
if ($mini) {
|
||||
$font_size = '1.5';
|
||||
} else {
|
||||
$font_size = '3';
|
||||
$font_size = $config['font_size_item_report'];
|
||||
}
|
||||
|
||||
$metaconsole_on = is_metaconsole();
|
||||
|
@ -2493,7 +2493,7 @@ function reporting_html_monitor_report($table, $item, $mini, $pdf=0)
|
|||
if ($mini) {
|
||||
$font_size = '1.5';
|
||||
} else {
|
||||
$font_size = '3';
|
||||
$font_size = $config['font_size_item_report'];
|
||||
}
|
||||
|
||||
$table->colspan['module']['cell'] = 3;
|
||||
|
@ -2735,10 +2735,12 @@ function reporting_html_min_value(&$table, $item, $mini)
|
|||
|
||||
function reporting_html_value(&$table, $item, $mini, $only_value=false, $check_empty=false)
|
||||
{
|
||||
global $config;
|
||||
|
||||
if ($mini) {
|
||||
$font_size = '1.5';
|
||||
} else {
|
||||
$font_size = '3';
|
||||
$font_size = $config['font_size_item_report'];
|
||||
}
|
||||
|
||||
if (isset($item['visual_format']) && $item['visual_format'] != 0
|
||||
|
|
|
@ -2911,6 +2911,130 @@ function ui_progress(
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates a progress bar CSS based.
|
||||
* Requires css progress.css
|
||||
*
|
||||
* @param array $progress Progress.
|
||||
* @param string $width Width.
|
||||
* @param integer $height Height in 'em'.
|
||||
* @param array $color status color.
|
||||
* @param boolean $return Return or paint (if false).
|
||||
* @param boolean $text Text to be displayed,by default progress %.
|
||||
* @param array $ajax Ajax: [ 'page' => 'page', 'data' => 'data' ] Sample:
|
||||
* [
|
||||
* 'page' => 'operation/agentes/ver_agente', Target page.
|
||||
* 'interval' => 100 / $agent["intervalo"], Ask every interval seconds.
|
||||
* 'data' => [ Data to be sent to target page.
|
||||
* 'id_agente' => $id_agente,
|
||||
* 'refresh_contact' => 1,
|
||||
* ],
|
||||
* ].
|
||||
*
|
||||
* @return string HTML code.
|
||||
*/
|
||||
function ui_progress_extend(
|
||||
$progress,
|
||||
$width='100%',
|
||||
$height='2.5',
|
||||
$color='#82b92e',
|
||||
$return=true,
|
||||
$text='',
|
||||
$ajax=false
|
||||
) {
|
||||
if (!$progress['total']) {
|
||||
$progress = 0;
|
||||
}
|
||||
|
||||
$totalW = ($progress['total'] * 100);
|
||||
if ($totalW > 100) {
|
||||
$totalW = 100;
|
||||
}
|
||||
|
||||
if ($totalW < 0) {
|
||||
$totalW = 0;
|
||||
}
|
||||
|
||||
if (empty($text)) {
|
||||
$text = $totalW.'%';
|
||||
}
|
||||
|
||||
$badW = (($progress['bad'] * 100 ) / $progress['total']);
|
||||
$goodW = (($progress['good'] * 100 ) / $progress['total']);
|
||||
$unknownW = (($progress['unknown'] * 100 ) / $progress['total']);
|
||||
ui_require_css_file('progress');
|
||||
$output .= '<div class="progress_main" data-label="total"';
|
||||
$output .= '" style="width: '.$totalW.'%;display:flex; height: '.$height.'em;">';
|
||||
$output .= '<div id="unknow_div" onmouseover="Mouseover()" class="progress_main text_over" data-label="Pending"';
|
||||
$output .= '" style="width: '.$unknownW.'%; height: '.$height.'em; background-color: '.COL_UNKNOWN.'; "></div>';
|
||||
$output .= '<div class="progress_main" data-label="Success"';
|
||||
$output .= '" style="width: '.$goodW.'%; height: '.$height.'em; background-color: '.COL_NORMAL.';"></div>';
|
||||
$output .= '<div class="progress_main" data-label="Error"';
|
||||
$output .= '" style="width: '.$badW.'%; height: '.$height.'em; background-color: '.COL_CRITICAL.';"></div>';
|
||||
$output .= '</div>';
|
||||
|
||||
if ($ajax !== false && is_array($ajax)) {
|
||||
$output .= '<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
function
|
||||
document.getElementById("#unknow_div").onmouseover = function() {
|
||||
document.getElementById("#unknow_div").append( $( "<span> ***</span>" ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
setInterval(() => {
|
||||
last = $(".progress_main").attr("data-label").split(" ")[0]*1;
|
||||
width = $(".progress").width() / $(".progress").parent().width() * 100;
|
||||
width_interval = '.$ajax['interval'].';
|
||||
if (last % 10 == 0) {
|
||||
$.post({
|
||||
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
|
||||
data: {';
|
||||
if (is_array($ajax['data'])) {
|
||||
foreach ($ajax['data'] as $token => $value) {
|
||||
$output .= '
|
||||
'.$token.':"'.$value.'",';
|
||||
}
|
||||
}
|
||||
|
||||
$output .= '
|
||||
page: "'.$ajax['page'].'"
|
||||
},
|
||||
success: function(data) {
|
||||
try {
|
||||
val = JSON.parse(data);
|
||||
$(".progress_main").attr("data-label", val["last_contact"]+" s");
|
||||
$(".progress").width(val["progress"]+"%");
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
$(".progress_text").attr("data-label", (last -1) + " s");
|
||||
if (width < 100) {
|
||||
$(".progress").width((width+width_interval) + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".progress_main").attr("data-label", (last -1) + " s");
|
||||
if (width < 100) {
|
||||
$(".progress").width((width+width_interval) + "%");
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
|
||||
if (!$return) {
|
||||
echo $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate needed code to print a datatables jquery plugin.
|
||||
*
|
||||
|
@ -3169,6 +3293,9 @@ function ui_print_datatable(array $parameters)
|
|||
);
|
||||
}
|
||||
|
||||
// Languages.
|
||||
$processing = __('Processing');
|
||||
|
||||
// Extra html.
|
||||
$extra = '';
|
||||
if (isset($parameters['extra_html']) && !empty($parameters['extra_html'])) {
|
||||
|
@ -3233,6 +3360,9 @@ function ui_print_datatable(array $parameters)
|
|||
searching: false,
|
||||
responsive: true,
|
||||
dom: "plfrtiBp",
|
||||
language: {
|
||||
processing:"'.$processing.'"
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
extend: "csv",
|
||||
|
|
|
@ -1885,12 +1885,35 @@ function load_modal(settings) {
|
|||
}
|
||||
data.append("page", settings.onshow.page);
|
||||
data.append("method", settings.onshow.method);
|
||||
if (settings.onshow.extradata != undefined) {
|
||||
data.append("extradata", JSON.stringify(settings.onshow.extradata));
|
||||
}
|
||||
|
||||
if (settings.target == undefined) {
|
||||
var uniq = uniqId();
|
||||
var div = document.createElement("div");
|
||||
div.id = "div-modal-" + uniq;
|
||||
div.style.display = "none";
|
||||
|
||||
document.getElementById("main").append(div);
|
||||
|
||||
var id_modal_target = "#div-modal-" + uniq;
|
||||
|
||||
settings.target = $(id_modal_target);
|
||||
}
|
||||
|
||||
var width = 630;
|
||||
if (settings.onshow.width) {
|
||||
width = settings.onshow.width;
|
||||
}
|
||||
|
||||
if (settings.modal.overlay == undefined) {
|
||||
settings.modal.overlay = {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
};
|
||||
}
|
||||
|
||||
settings.target.html("Loading modal...");
|
||||
settings.target
|
||||
.dialog({
|
||||
|
@ -2081,14 +2104,16 @@ function load_modal(settings) {
|
|||
modal: true,
|
||||
title: settings.modal.title,
|
||||
width: width,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"
|
||||
},
|
||||
overlay: settings.modal.overlay,
|
||||
buttons: required_buttons,
|
||||
closeOnEscape: false,
|
||||
open: function() {
|
||||
$(".ui-dialog-titlebar-close").hide();
|
||||
},
|
||||
close: function() {
|
||||
if (id_modal_target != undefined) {
|
||||
$(id_modal_target).remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -2100,13 +2125,7 @@ function load_modal(settings) {
|
|||
|
||||
//Function that shows a dialog box to confirm closures of generic manners. The modal id is random
|
||||
function confirmDialog(settings) {
|
||||
var randomStr =
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15) +
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15);
|
||||
var randomStr = uniqId();
|
||||
|
||||
$("body").append(
|
||||
'<div id="confirm_' + randomStr + '">' + settings.message + "</div>"
|
||||
|
@ -2142,6 +2161,18 @@ function confirmDialog(settings) {
|
|||
.show();
|
||||
}
|
||||
|
||||
function uniqId() {
|
||||
var randomStr =
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15) +
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substring(2, 15);
|
||||
|
||||
return randomStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to show modal with message Validation.
|
||||
*
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
text-align: justify;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
min-height: 150px;
|
||||
}
|
||||
|
||||
.datatables-td-title {
|
||||
width: 25% !important;
|
||||
font-weight: bolder;
|
||||
|
|
|
@ -31,7 +31,7 @@ li.discovery > a label {
|
|||
}
|
||||
|
||||
div.data_container > label {
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif;
|
||||
font-family: "lato", "Open Sans", sans-serif;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
.new_task p,
|
||||
.new_task div {
|
||||
font-family: "lato-lighter", "Open Sans", sans-serif;
|
||||
font-weight: lighter;
|
||||
}
|
||||
.new_task {
|
||||
margin-top: 30px;
|
||||
min-width: 600px;
|
||||
left: 20px;
|
||||
width: 60%;
|
||||
height: 300px;
|
||||
|
@ -30,6 +36,7 @@ div.new_task_cluster > div {
|
|||
|
||||
.image_task {
|
||||
width: 20%;
|
||||
min-width: 175px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
}
|
||||
|
@ -47,7 +54,7 @@ div.new_task_cluster > div {
|
|||
|
||||
.text_task {
|
||||
width: 70%;
|
||||
float: right;
|
||||
float: left;
|
||||
height: 100%;
|
||||
padding-right: 25px;
|
||||
}
|
|
@ -6,15 +6,8 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
#welcome_modal_window {
|
||||
/*
|
||||
max-height: 100%;
|
||||
height: 100%;
|
||||
border-left: 1em solid #82b92f;
|
||||
margin-bottom: -59px;
|
||||
padding-bottom: 100px;
|
||||
margin-left: -1px;
|
||||
*/
|
||||
#welcome_modal_window * {
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
#welcome_form ul.wizard > li {
|
||||
|
@ -60,7 +53,7 @@
|
|||
}
|
||||
|
||||
.completed {
|
||||
background-image: url(../../images/input_tick.png);
|
||||
background-image: url(../../images/input_tick_badge.png);
|
||||
}
|
||||
|
||||
.centered_full {
|
||||
|
@ -86,7 +79,7 @@
|
|||
border-left: 4px solid #79a930;
|
||||
}
|
||||
|
||||
#welcome_form li:not(.centered_full):not(.white_box).grey {
|
||||
#welcome_form li:not(.centered_full):not(.white_box).row_grey {
|
||||
border-left: 4px solid #d6d6d6;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,477 @@
|
|||
.edit_yaml {
|
||||
margin-left: 39px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.margin_button {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.container-target {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
|
||||
.element-target {
|
||||
width: 20px;
|
||||
margin: 2px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.status-normal {
|
||||
background-color: #add570;
|
||||
}
|
||||
|
||||
.status-critical {
|
||||
background-color: #e3485e;
|
||||
}
|
||||
|
||||
.status-notinit {
|
||||
background-color: #8bbbdd;
|
||||
}
|
||||
|
||||
.container-msg-target-modal {
|
||||
max-height: 400px;
|
||||
overflow: initial;
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.container-msg-target-modal p {
|
||||
font-family: "lato-lighter", "Open Sans", sans-serif;
|
||||
margin-bottom: 20px;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
span.failed {
|
||||
color: #fb4444;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
span.success {
|
||||
color: #82b92f;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.container-msg-target-modal pre {
|
||||
font-family: monospace;
|
||||
padding: 1em;
|
||||
white-space: pre-wrap;
|
||||
background-color: #efefef;
|
||||
color: #565656;
|
||||
font-size: 1.2em;
|
||||
border: 2px solid #ddd;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.container-msg-target-modal p img {
|
||||
margin-right: 0.3em;
|
||||
height: 1.3em;
|
||||
}
|
||||
|
||||
ul.wizard li > textarea {
|
||||
height: 5em;
|
||||
}
|
||||
|
||||
.label_select {
|
||||
font-family: "lato-lighter", "Open Sans", sans-serif;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.divided select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.inline label:first-child {
|
||||
width: 250px;
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.inline label:nth-child(3) {
|
||||
margin-right: 1em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.inline select {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.middle {
|
||||
align-self: center;
|
||||
}
|
||||
.edit_discovery_info {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
ul.wizard {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.filter_column {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.filter_column .edit_discovery_input {
|
||||
flex-grow: 1;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
align-content: baseline;
|
||||
margin-left: 2em;
|
||||
}
|
||||
.filter_column .edit_discovery_input .label_select {
|
||||
display: inline;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.filter_column .edit_discovery_input select {
|
||||
flex-grow: 1;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.wizard li {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/*
|
||||
* Discovery css global
|
||||
*/
|
||||
|
||||
ul.bigbuttonlist {
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
li.discovery {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
width: 250px;
|
||||
margin: 15px;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
li.discovery > a {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
}
|
||||
li.discovery > a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
li.discovery img {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
li.discovery > a label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.data_container > label {
|
||||
font-family: "lato", "Open Sans", sans-serif;
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
div.data_container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
div.data_container:hover {
|
||||
box-shadow: 2px 2px 10px #ddd;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: This may be at hostdevices.css
|
||||
*/
|
||||
.texto {
|
||||
height: auto;
|
||||
text-align: center;
|
||||
}
|
||||
h1.wizard {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
h1.wizard a {
|
||||
margin-left: -20px;
|
||||
}
|
||||
h1.wizard a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
#text_wizard {
|
||||
font-weight: bolder;
|
||||
text-decoration: none;
|
||||
font-size: 24px;
|
||||
}
|
||||
div.arrow_box {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
color: #888;
|
||||
padding: 1.3em;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 10px;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
.arrow_box.selected {
|
||||
background: #424242;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.arrow_box:after {
|
||||
left: 0%;
|
||||
border-left-color: white;
|
||||
border-width: 20px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
div.arrow_box:before {
|
||||
left: 100%;
|
||||
border-left-color: #ccc;
|
||||
border-width: 20px;
|
||||
margin-top: -20px;
|
||||
}
|
||||
.arrow_box.selected:before {
|
||||
border-left-color: #424242;
|
||||
}
|
||||
|
||||
.arrow_box.selected:hover {
|
||||
color: #fff;
|
||||
}
|
||||
.arrow_box:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/*
|
||||
* Breadcrum
|
||||
*/
|
||||
|
||||
#menu_tab_frame_view_bc {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2px solid #82b92e;
|
||||
max-height: 70px;
|
||||
min-height: 55px;
|
||||
width: 100%;
|
||||
padding-right: 0px;
|
||||
margin-left: 0px;
|
||||
margin-bottom: 20px;
|
||||
height: 55px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fafafa;
|
||||
border-top-right-radius: 7px;
|
||||
border-top-left-radius: 7px;
|
||||
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
#menu_tab_frame_view_bc .breadcrumbs_container {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.breadcrumbs_container {
|
||||
padding-top: 4px;
|
||||
text-indent: 0.25em;
|
||||
padding-left: 2.5em;
|
||||
}
|
||||
|
||||
.breadcrumb_link {
|
||||
color: #848484;
|
||||
font-size: 10pt;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
span.breadcrumb_link {
|
||||
color: #d0d0d0;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.breadcrumb_link.selected {
|
||||
color: #95b750;
|
||||
}
|
||||
|
||||
.breadcrumb_link.selected:hover {
|
||||
color: #95b750;
|
||||
}
|
||||
.breadcrumb_link:hover {
|
||||
color: #95b750;
|
||||
}
|
||||
|
||||
/*
|
||||
* Discovery forms structure
|
||||
*/
|
||||
|
||||
form.discovery * {
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
form.discovery .label_select b {
|
||||
font-family: "lato", "Open Sans", sans-serif;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.edit_discovery_info {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.edit_discovery_input {
|
||||
align-items: center;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Discovery text inputs
|
||||
*/
|
||||
|
||||
.discovery_label_hint {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
label {
|
||||
color: #343434;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.discovery_full_width_input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
li > input[type="text"],
|
||||
li > input[type="email"],
|
||||
li > input[type="password"],
|
||||
li > input[type="email"],
|
||||
.discovery_text_input > input[type="password"],
|
||||
.discovery_text_input > input[type="text"],
|
||||
#interval_manual > input[type="text"] {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif;
|
||||
font-weight: lighter;
|
||||
padding: 0px 0px 2px 0px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#interval_manual > input[type="text"] {
|
||||
width: 50px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.discovery_list_input {
|
||||
width: 100%;
|
||||
border: 1px solid #cbcbcb;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.discovery_list_input option {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.discovery_list_input option:checked {
|
||||
background: #1aab8e -webkit-linear-gradient(bottom, #7db742 0%, #7db742 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.discovery_textarea_input {
|
||||
background-color: #fbfbfb;
|
||||
padding-left: 10px;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
max-height: 100px;
|
||||
max-width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
a.tip {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.inline_switch > label {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.discovery_interval_select_width {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
a.ext_link {
|
||||
margin-left: 1em;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
div.ui-tooltip.ui-corner-all.ui-widget-shadow.ui-widget.ui-widget-content.uitooltip {
|
||||
background: grey;
|
||||
opacity: 0.9;
|
||||
border-radius: 4px;
|
||||
box-shadow: 6px 5px 9px -9px black;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.ui-tooltip-content {
|
||||
background: transparent;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-family: "lato-lighter", "Open Sans", sans-serif;
|
||||
letter-spacing: 0.03pt;
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
width: 70px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -35px;
|
||||
bottom: -16px;
|
||||
}
|
||||
.arrow.top {
|
||||
top: -16px;
|
||||
bottom: auto;
|
||||
}
|
||||
.arrow.left {
|
||||
left: 50%;
|
||||
}
|
||||
.arrow:after {
|
||||
background: grey;
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: -20px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
box-shadow: 6px 5px 9px -9px black;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.arrow.top:after {
|
||||
bottom: -20px;
|
||||
top: auto;
|
||||
}
|
|
@ -5710,7 +5710,7 @@ div#status_pie {
|
|||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding: 1em;
|
||||
min-width: fit-content;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.white_table_graph_content {
|
||||
|
@ -5929,6 +5929,47 @@ table.table_modal_alternate tr td:first-child {
|
|||
width: 101%;
|
||||
}
|
||||
|
||||
/*Font header feedback*/
|
||||
form#modal_form_feedback {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
form#modal_form_feedback label {
|
||||
margin-bottom: 10px;
|
||||
color: #343434;
|
||||
font-weight: bold;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
form#modal_form_feedback input[type="email"] {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
font-family: "lato-bolder", "Open Sans", sans-serif;
|
||||
font-weight: lighter;
|
||||
padding: 0px 0px 2px 0px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
form#modal_form_feedback ul.wizard li {
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
form#modal_form_feedback ul.wizard li > label:not(.p-switch) {
|
||||
width: 250px;
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form#modal_form_feedback ul.wizard li > textarea {
|
||||
width: 600px;
|
||||
height: 15em;
|
||||
display: inline-block;
|
||||
font-family: monospace;
|
||||
}
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - FONT SIZES IN AGENT VIEW. This changes the font size of the agent
|
||||
|
@ -5940,3 +5981,12 @@ table.table_modal_alternate tr td:first-child {
|
|||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Generic classes to reuse and facilitate the creation of custom themes */
|
||||
.pandora_green_text {
|
||||
color: #82b92e;
|
||||
}
|
||||
|
||||
.pandora_green_bg {
|
||||
background-color: #82b92e;
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.740';
|
||||
$build = '191108';
|
||||
$build = '191113';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
@ -872,7 +872,16 @@ function install_step4()
|
|||
$config["dbuser"]="pandora"; // DB User
|
||||
$config["dbpass"]="'.$random_password.'"; // DB Password
|
||||
$config["dbhost"]="'.$dbhost.'"; // DB Host
|
||||
$config["homedir"]="'.$path.'"; // Config homedir
|
||||
$config["homedir"]="'.$path.'"; // Config homedir
|
||||
// ----------Rebranding--------------------
|
||||
// Uncomment this lines and add your customs text and paths.
|
||||
// $config["custom_logo_login_alt"] ="login_logo.png";
|
||||
// $config["custom_splash_login_alt"] = "splash_image_default.png";
|
||||
// $config["custom_title1_login_alt"] = "WELCOME TO Pandora FMS";
|
||||
// $config["custom_title2_login_alt"] = "NEXT GENERATION";
|
||||
// $config["rb_product_name_alt"] = "Pandora FMS";
|
||||
|
||||
|
||||
/*
|
||||
----------Attention--------------------
|
||||
Please note that in certain installations:
|
||||
|
@ -974,7 +983,15 @@ function install_step4()
|
|||
$config["dbuser"]="pandora"; // DB User
|
||||
$config["dbpass"]="'.$random_password.'"; // DB Password
|
||||
$config["dbhost"]="'.$dbhost.'"; // DB Host
|
||||
$config["homedir"]="'.$path.'"; // Config homedir
|
||||
$config["homedir"]="'.$path.'"; // Config homedir
|
||||
// ----------Rebranding--------------------
|
||||
// Uncomment this lines and add your customs text and paths.
|
||||
// $config["custom_logo_login_alt"] ="login_logo.png";
|
||||
// $config["custom_splash_login_alt"] = "splash_image_default.png";
|
||||
// $config["custom_title1_login_alt"] = "WELCOME TO Pandora FMS";
|
||||
// $config["custom_title2_login_alt"] = "NEXT GENERATION";
|
||||
// $config["rb_product_name_alt"] = "Pandora FMS";
|
||||
|
||||
/*
|
||||
----------Attention--------------------
|
||||
Please note that in certain installations:
|
||||
|
|
|
@ -432,7 +432,7 @@ if (!empty($addresses)) {
|
|||
// $data_opcional = [];
|
||||
$data_opcional[] = '<b>'.__('Other IP addresses').'</b>';
|
||||
if (!empty($addresses)) {
|
||||
$data_opcional[] = '<div style="overflow-y: scroll;">'.implode('<br>', $addresses).'</div>';
|
||||
$data_opcional[] = '<div style="overflow-y: scroll; max-height:50px;">'.implode('<br>', $addresses).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ if ($count_total >= 1) {
|
|||
}
|
||||
|
||||
if ($count_total < 1) {
|
||||
include_once $config['homedir'].'/general/firts_task/incidents.php';
|
||||
include_once $config['homedir'].'/general/first_task/incidents.php';
|
||||
} else {
|
||||
// TOTAL incidents
|
||||
$url = 'index.php?sec=workspace&sec2=operation/incidents/incident';
|
||||
|
|
|
@ -36,7 +36,7 @@ if ($servers === false) {
|
|||
$recon_task = db_get_all_rows_sql('SELECT * FROM trecon_task');
|
||||
if ($recon_task === false) {
|
||||
ui_print_page_header(__('Recon View'), 'images/op_recon.png', false, '', false);
|
||||
include_once $config['homedir'].'/general/firts_task/recon_view.php';
|
||||
include_once $config['homedir'].'/general/first_task/recon_view.php';
|
||||
return;
|
||||
} else {
|
||||
include_once $config['homedir'].'/include/functions_graph.php';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.740
|
||||
%define release 191108
|
||||
%define release 191113
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.740
|
||||
%define release 191108
|
||||
%define release 191113
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.740
|
||||
%define release 191108
|
||||
%define release 191113
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -3661,3 +3661,35 @@ CREATE TABLE `tdeployment_hosts` (
|
|||
FOREIGN KEY (`target_agent_version_id`) REFERENCES `tagent_repository`(`id`)
|
||||
ON UPDATE CASCADE ON DELETE SET NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tremote_command`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE `tremote_command` (
|
||||
`id` SERIAL,
|
||||
`name` varchar(150) NOT NULL,
|
||||
`timeout` int(10) unsigned NOT NULL default 30,
|
||||
`retries` int(10) unsigned NOT NULL default 3,
|
||||
`preconditions` text,
|
||||
`script` text,
|
||||
`postconditions` text,
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`id_group` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tremote_command_target`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE `tremote_command_target` (
|
||||
`id` SERIAL,
|
||||
`rcmd_id` bigint unsigned NOT NULL,
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||
`stdout` text,
|
||||
`stderr` text,
|
||||
`errorlevel` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`),
|
||||
FOREIGN KEY (`rcmd_id`) REFERENCES `tremote_command`(`id`)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
@ -109,10 +109,10 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('custom_report_front_logo', 'images/pandora_logo_white.jpg'),
|
||||
('custom_report_front_header', ''),
|
||||
('custom_report_front_footer', ''),
|
||||
('MR', 32),
|
||||
('MR', 33),
|
||||
('identification_reminder', 1),
|
||||
('identification_reminder_timestamp', 0),
|
||||
('current_package_enterprise', '740'),
|
||||
('current_package_enterprise', '741'),
|
||||
('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.0009765625":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'),
|
||||
('custom_docs_logo', 'default_docs.png'),
|
||||
('custom_support_logo', 'default_support.png'),
|
||||
|
@ -982,6 +982,13 @@ INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `t
|
|||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (783,'Check Informix Port','',19,9,0,0,300,1526,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (784,'Check port DB2','',49,9,0,0,300,50000,'','','public','',2,2,0,'','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `macros`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `critical_inverse`, `warning_inverse`, `id_category`, `tags`, `disabled_types_event`, `module_macros`, `min_ff_event_normal`, `min_ff_event_warning`, `min_ff_event_critical`, `each_ff`) VALUES (785,'Packet Loss','Measure packet loss in the network, using a flood ping (50 ping in 8 secons) and counting back missing packets. It should be zero on most cases. ',10,1,0,0,300,0,'','','','',2,4,9,'','','',0,0,1,10.00,0.00,'',30.00,0.00,'',0,'','','',0,0,0.00000,'%','nowizard','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Test time\",\"help\":\"\",\"value\":\"8\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Target IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','You should check manually the packet loss of the network with a flood ping on targeted host (ping -c 100 -f xxxx). Aditionally, and due the major packet loss, probably you can see a simple ping failing here. Check your network equipment.','You should check manually the packet loss of the network with a flood ping on targeted host (ping -c 100 -f xxxx)','',0,0,0,'','{\"going_unknown\":0}','',0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (786,'N. total processes','Number of running processes in a Windows system.',11,34,0,0,300,0,'tasklist /NH | findstr /c /v ""','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (787,'Free space in C:','Free space available in C:',11,34,0,0,300,0,'powershell $obj=(Get-WmiObject -class "Win32_LogicalDisk" -namespace "root\CIMV2") ; $obj.FreeSpace * 100 /$obj.Size','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','windows','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (788,'Linux uptime','System uptime',43,36,0,0,300,0,'uptime |sed s/us\.*$//g | sed s/,\.*$//g','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (789,'Linux processes','Running processes',43,34,0,0,300,0,'ps elf | wc -l','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (790,'Linux system load','Current load (5 min)',43,34,0,0,300,0,'uptime | awk '{print $(NF-1)}' | tr -d ','','','','',6,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (791,'Linux available memory percent','Available memory %',43,34,0,0,300,0,'free | grep Mem | awk '{print $NF/$2 * 100}'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'',0.00,0.00,'',0,'','linux','',0,0,0.000000000000000,'%','nowizard','','','','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `max_retries`, `history_data`, `min_warning`, `max_warning`, `max_critical`, `str_warning`, `min_ff_event`, `min_critical`, `custom_string_2`, `str_critical`, `custom_integer_1`, `custom_string_1`, `post_process`, `custom_string_3`, `wizard_level`, `custom_integer_2`, `critical_instructions`, `unit`, `unknown_instructions`, `macros`, `warning_inverse`, `warning_instructions`, `tags`, `critical_inverse`, `module_macros`, `id_category`, `min_ff_event_warning`, `disabled_types_event`, `ff_type`, `min_ff_event_normal`, `dynamic_interval`, `min_ff_event_critical`, `dynamic_min`, `each_ff`, `dynamic_two_tailed`, `dynamic_max`, `dynamic_next`) VALUES (792,'Linux available disk /','Available free space in mountpoint /',43,34,0,0,300,0,'df / | tail -n +2 | awk '{print $(NF-1)}' | tr -d '%'','','','',4,2,0,'','','',0,0,1,0.00,0.00,'0.00',0.00,0.00,'',0,'','inherited','',0,0,0.000000000000000,'','nowizard','','nowizard','0','',0,0,0,'','{\"going_unknown\":1}','',0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
|
||||
--
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 7.0NG.740-191108
|
||||
Version: 7.0NG.740-191113
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="7.0NG.740-191108"
|
||||
pandora_version="7.0NG.740-191113"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
@ -80,7 +80,9 @@ then
|
|||
mkdir -p temp_package/var/spool/pandora/data_in/netflow
|
||||
chmod 770 temp_package/var/spool/pandora/data_in/netflow
|
||||
mkdir -p temp_package/var/spool/pandora/data_in/trans
|
||||
chmod 770 temp_package/var/spool/pandora/data_in/trans
|
||||
chmod 770 temp_package/var/spool/pandora/data_in/trans
|
||||
mkdir -p temp_package/var/spool/pandora/data_in/commands
|
||||
chmod 770 temp_package/var/spool/pandora/data_in/commands
|
||||
mkdir -p temp_package/var/log/pandora/
|
||||
chmod 754 temp_package/var/log/pandora/
|
||||
mkdir -p temp_package/usr/share/pandora_server/conf/
|
||||
|
|
|
@ -156,6 +156,10 @@ wmiserver 1
|
|||
|
||||
network_timeout 4
|
||||
|
||||
# Network timeout (in seconds) for timeout in remote execution commands (PANDORA FMS ENTERPRISE ONLY).
|
||||
|
||||
rcmd_timeout 30
|
||||
|
||||
# Server keepalive (in seconds)
|
||||
|
||||
server_keepalive 45
|
||||
|
|
|
@ -21,7 +21,7 @@ daemon 1
|
|||
# insecure 0
|
||||
|
||||
# Filters (regexp:dir;regexp:dir...)
|
||||
filters .*\.conf:conf;.*\.md5:md5;.*\.zip:collections;.*\.lock:trans
|
||||
filters .*\.conf:conf;.*\.md5:md5;.*\.zip:collections;.*\.lock:trans;.*\.rcmd:commands
|
||||
|
||||
# [-m] Maximum file size allowed by the server in bytes
|
||||
#max_size 2000000
|
||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.740";
|
||||
my $pandora_build = "191108";
|
||||
my $pandora_build = "191113";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -602,8 +602,12 @@ sub process_xml_data ($$$$$) {
|
|||
# Process events
|
||||
process_events_dataserver($pa_config, $data, $agent_id, $group_id, $dbh);
|
||||
|
||||
# Process disovery modules
|
||||
# Process discovery modules
|
||||
enterprise_hook('process_discovery_data', [$pa_config, $data, $server_id, $dbh]);
|
||||
|
||||
# Process command responses
|
||||
enterprise_hook('process_rcmd_report', [$pa_config, $data, $server_id, $dbh, $agent_id, $timestamp]);
|
||||
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
|
|
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.740";
|
||||
my $pandora_build = "191108";
|
||||
my $pandora_build = "191113";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
|