Merge remote-tracking branch 'origin/develop' into ent-4073-eventos-en-proceso-no-validan-ni-id-evento-ni-id-extra
@ -1,5 +1,5 @@
|
||||
package: pandorafms-agent-unix
|
||||
Version: 7.0NG.735-190604
|
||||
Version: 7.0NG.735-190606
|
||||
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.735-190604"
|
||||
pandora_version="7.0NG.735-190606"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
||||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '7.0NG.735';
|
||||
use constant AGENT_BUILD => '190604';
|
||||
use constant AGENT_BUILD => '190606';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
@ -3038,10 +3038,10 @@ while (1) {
|
||||
my @address_list;
|
||||
|
||||
if( -x "/bin/ip" || -x "/sbin/ip" || -x "/usr/sbin/ip" ) {
|
||||
@address_list = `ip addr show 2>$DevNull | sed -e '/127.0.0/d' -e '/[0-9]*\\.[0-9]*\\.[0-9]*/!d' -e 's/^[ \\t]*\\([^ \\t]*\\)[ \\t]*\\([^ \\t]*\\)[ \\t].*/\\2/' -e 's/\\/.*//'`;
|
||||
@address_list = `ip addr show 2>$DevNull | sed -e '/127.0.0/d' -e '/\\([0-9][0-9]*\\.\\)\\{3\\}[0-9][0-9]*/!d' -e 's/^[ \\t]*\\([^ \\t]*\\)[ \\t]*\\([^ \\t]*\\)[ \\t].*/\\2/' -e 's/\\/.*//'`;
|
||||
}
|
||||
else {
|
||||
@address_list = `ifconfig -a 2>$DevNull | sed -e '/127.0.0/d' -e '/[0-9]*\\.[0-9]*\\.[0-9]*/!d' -e 's/^[ \\t]*\\([^ \\t]*\\)[ \\t]*\\([^ \\t]*\\)[ \\t].*/\\2/' -e 's/.*://'`;
|
||||
@address_list = `ifconfig -a 2>$DevNull | sed -e '/127.0.0/d' -e '/\\([0-9][0-9]*\\.\\)\\{3\\}[0-9][0-9]*/!d' -e 's/^[ \\t]*\\([^ \\t]*\\)[ \\t]*\\([^ \\t]*\\)[ \\t].*/\\2/' -e 's/.*://'`;
|
||||
}
|
||||
|
||||
for (my $i = 0; $i <= $#address_list; $i++) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.735
|
||||
%define release 190604
|
||||
%define release 190606
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 7.0NG.735
|
||||
%define release 190604
|
||||
%define release 190606
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
@ -10,7 +10,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.735"
|
||||
PI_BUILD="190604"
|
||||
PI_BUILD="190606"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||
{}
|
||||
|
||||
Version
|
||||
{190604}
|
||||
{190606}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("7.0NG.735(Build 190604)")
|
||||
#define PANDORA_VERSION ("7.0NG.735(Build 190606)")
|
||||
|
||||
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.735(Build 190604))"
|
||||
VALUE "ProductVersion", "(7.0NG.735(Build 190606))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-console
|
||||
Version: 7.0NG.735-190604
|
||||
Version: 7.0NG.735-190606
|
||||
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.735-190604"
|
||||
pandora_version="7.0NG.735-190606"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
@ -1989,6 +1989,33 @@ CREATE TABLE IF NOT EXISTS `tnetwork_matrix` (
|
||||
UNIQUE (`source`, `destination`, `utimestamp`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `user_task`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tuser_task` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`function_name` varchar(80) NOT NULL default '',
|
||||
`parameters` text NOT NULL default '',
|
||||
`name` varchar(60) NOT NULL default '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `user_task_scheduled`
|
||||
-- ---------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tuser_task_scheduled` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`id_usuario` varchar(60) NOT NULL default '0',
|
||||
`id_user_task` int(20) unsigned NOT NULL default '0',
|
||||
`args` TEXT NOT NULL,
|
||||
`scheduled` enum('no','hourly','daily','weekly','monthly','yearly','custom') default 'no',
|
||||
`last_run` int(20) unsigned default '0',
|
||||
`custom_data` int(10) NULL default '0',
|
||||
`flag_delete` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||
`id_grupo` int(10) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tnotification_source`
|
||||
-- -----------------------------------------------------
|
||||
|
BIN
pandora_console/images/groups_small_white/application_osx.png
Normal file
After Width: | Height: | Size: 241 B |
After Width: | Height: | Size: 274 B |
BIN
pandora_console/images/groups_small_white/applications.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
pandora_console/images/groups_small_white/bricks.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
pandora_console/images/groups_small_white/chart_organisation.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
pandora_console/images/groups_small_white/clock.png
Normal file
After Width: | Height: | Size: 529 B |
BIN
pandora_console/images/groups_small_white/computer.png
Normal file
After Width: | Height: | Size: 309 B |
BIN
pandora_console/images/groups_small_white/database.png
Normal file
After Width: | Height: | Size: 363 B |
BIN
pandora_console/images/groups_small_white/database_gear.png
Normal file
After Width: | Height: | Size: 362 B |
BIN
pandora_console/images/groups_small_white/drive_network.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
pandora_console/images/groups_small_white/email.png
Normal file
After Width: | Height: | Size: 331 B |
BIN
pandora_console/images/groups_small_white/eye.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
pandora_console/images/groups_small_white/firewall.png
Normal file
After Width: | Height: | Size: 391 B |
BIN
pandora_console/images/groups_small_white/heart.png
Normal file
After Width: | Height: | Size: 340 B |
BIN
pandora_console/images/groups_small_white/house.png
Normal file
After Width: | Height: | Size: 349 B |
BIN
pandora_console/images/groups_small_white/images.png
Normal file
After Width: | Height: | Size: 444 B |
BIN
pandora_console/images/groups_small_white/lightning.png
Normal file
After Width: | Height: | Size: 281 B |
BIN
pandora_console/images/groups_small_white/lock.png
Normal file
After Width: | Height: | Size: 424 B |
BIN
pandora_console/images/groups_small_white/network.png
Normal file
After Width: | Height: | Size: 382 B |
BIN
pandora_console/images/groups_small_white/plugin.png
Normal file
After Width: | Height: | Size: 382 B |
BIN
pandora_console/images/groups_small_white/printer.png
Normal file
After Width: | Height: | Size: 347 B |
BIN
pandora_console/images/groups_small_white/server_database.png
Normal file
After Width: | Height: | Size: 429 B |
BIN
pandora_console/images/groups_small_white/transmit.png
Normal file
After Width: | Height: | Size: 447 B |
BIN
pandora_console/images/groups_small_white/without_group.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
pandora_console/images/groups_small_white/world.png
Normal file
After Width: | Height: | Size: 450 B |
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC190604';
|
||||
$build_version = 'PC190606';
|
||||
$pandora_version = 'v7.0NG.735';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
@ -289,7 +289,7 @@ function grafico_modulo_sparse_data(
|
||||
}
|
||||
}
|
||||
|
||||
if ($array_data === false || (!$params['graph_combined']
|
||||
if ($array_data === false && (!$params['graph_combined']
|
||||
&& !isset($array_data['sum1']['data'][0][1]) && !$params['baseline'])
|
||||
) {
|
||||
return false;
|
||||
|
@ -261,138 +261,47 @@ function snmp_browser_get_tree(
|
||||
) {
|
||||
global $config;
|
||||
|
||||
if ($target_ip == '') {
|
||||
return __('Target IP cannot be blank.');
|
||||
}
|
||||
|
||||
// Call snmpwalk
|
||||
if (empty($config['snmpwalk'])) {
|
||||
switch (PHP_OS) {
|
||||
case 'FreeBSD':
|
||||
$snmpwalk_bin = '/usr/local/bin/snmpwalk';
|
||||
break;
|
||||
|
||||
case 'NetBSD':
|
||||
$snmpwalk_bin = '/usr/pkg/bin/snmpwalk';
|
||||
break;
|
||||
|
||||
default:
|
||||
$snmpwalk_bin = 'snmpwalk';
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$snmpwalk_bin = $config['snmpwalk'];
|
||||
}
|
||||
|
||||
switch (PHP_OS) {
|
||||
case 'WIN32':
|
||||
case 'WINNT':
|
||||
case 'Windows':
|
||||
$error_redir_dir = 'NUL';
|
||||
break;
|
||||
|
||||
default:
|
||||
$error_redir_dir = '/dev/null';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($server_to_exec != 0) {
|
||||
$sql = sprintf('SELECT ip_address FROM tserver WHERE id_server = %d', $server_to_exec);
|
||||
$server_data = db_get_row_sql($sql);
|
||||
|
||||
if (enterprise_installed()) {
|
||||
enterprise_include_once('include/functions_satellite.php');
|
||||
$output = get_snmpwalk(
|
||||
$target_ip,
|
||||
$version,
|
||||
$community,
|
||||
$snmp3_auth_user,
|
||||
$snmp3_security_level,
|
||||
$snmp3_auth_method,
|
||||
$snmp3_auth_pass,
|
||||
$snmp3_privacy_method,
|
||||
$snmp3_privacy_pass,
|
||||
0,
|
||||
$starting_oid,
|
||||
'',
|
||||
$server_to_exec,
|
||||
'',
|
||||
''
|
||||
);
|
||||
|
||||
// Build the tree.
|
||||
$oid_tree = ['__LEAVES__' => []];
|
||||
if ($version == '3') {
|
||||
switch ($snmp3_security_level) {
|
||||
case 'authPriv':
|
||||
$command = $snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir;
|
||||
break;
|
||||
|
||||
case 'authNoPriv':
|
||||
$command = $snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir;
|
||||
break;
|
||||
|
||||
case 'noAuthNoPriv':
|
||||
$command = $snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$command = $snmpwalk_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Cc -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir;
|
||||
}
|
||||
|
||||
exec('ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command.'"', $output, $rc);
|
||||
} else {
|
||||
$oid_tree = ['__LEAVES__' => []];
|
||||
if ($version == '3') {
|
||||
switch ($snmp3_security_level) {
|
||||
case 'authPriv':
|
||||
exec($snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
break;
|
||||
|
||||
case 'authNoPriv':
|
||||
exec($snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
break;
|
||||
|
||||
case 'noAuthNoPriv':
|
||||
exec($snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
exec($snmpwalk_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Cc -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$oid_tree = ['__LEAVES__' => []];
|
||||
if ($version == '3') {
|
||||
switch ($snmp3_security_level) {
|
||||
case 'authPriv':
|
||||
exec($snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
break;
|
||||
|
||||
case 'authNoPriv':
|
||||
exec($snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
break;
|
||||
|
||||
case 'noAuthNoPriv':
|
||||
exec($snmpwalk_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -l '.escapeshellarg($snmp3_security_level).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
exec($snmpwalk_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -Cc -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($starting_oid).' 2> '.$error_redir_dir, $output, $rc);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($output as $line) {
|
||||
// Separate the OID from the value
|
||||
$full_oid = explode('=', $line);
|
||||
if (! isset($full_oid[1])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$oid = trim($full_oid[0]);
|
||||
$value = trim($full_oid[1]);
|
||||
|
||||
// Parse the OID
|
||||
foreach ($output as $oid => $value) {
|
||||
// Parse the OID.
|
||||
$oid_len = strlen($oid);
|
||||
$group = 0;
|
||||
$sub_oid = '';
|
||||
$ptr = &$oid_tree['__LEAVES__'];
|
||||
|
||||
for ($i = 0; $i < strlen($oid); $i++) {
|
||||
for ($i = 0; $i < $oid_len; $i++) {
|
||||
// "X.Y.Z"
|
||||
if ($oid[$i] == '"') {
|
||||
$group = ($group ^ 1);
|
||||
}
|
||||
|
||||
// Move to the next element of the OID
|
||||
// Move to the next element of the OID.
|
||||
if ($group == 0 && ($oid[$i] == '.' || ($oid[$i] == ':' && $oid[($i + 1)] == ':'))) {
|
||||
// Skip the next :
|
||||
// Skip the next ":".
|
||||
if ($oid[$i] == ':') {
|
||||
$i++;
|
||||
}
|
||||
|
||||
// Starting dot
|
||||
// Starting dot.
|
||||
if ($sub_oid == '') {
|
||||
continue;
|
||||
}
|
||||
@ -410,7 +319,7 @@ function snmp_browser_get_tree(
|
||||
}
|
||||
}
|
||||
|
||||
// The last element will contain the full OID
|
||||
// The last element will contain the full OID.
|
||||
$ptr[$sub_oid] = [
|
||||
'__OID__' => $oid,
|
||||
'__VALUE__' => $value,
|
||||
@ -459,83 +368,27 @@ function snmp_browser_get_oid(
|
||||
return;
|
||||
}
|
||||
|
||||
$output = get_snmpwalk(
|
||||
$target_ip,
|
||||
$version,
|
||||
$community,
|
||||
$snmp3_auth_user,
|
||||
$snmp3_security_level,
|
||||
$snmp3_auth_method,
|
||||
$snmp3_auth_pass,
|
||||
$snmp3_privacy_method,
|
||||
$snmp3_privacy_pass,
|
||||
0,
|
||||
$target_oid,
|
||||
'',
|
||||
$server_to_exec,
|
||||
'',
|
||||
'-On'
|
||||
);
|
||||
|
||||
$oid_data['oid'] = $target_oid;
|
||||
if (empty($config['snmpget'])) {
|
||||
switch (PHP_OS) {
|
||||
case 'FreeBSD':
|
||||
$snmpget_bin = '/usr/local/bin/snmpget';
|
||||
break;
|
||||
|
||||
case 'NetBSD':
|
||||
$snmpget_bin = '/usr/pkg/bin/snmpget';
|
||||
break;
|
||||
|
||||
default:
|
||||
$snmpget_bin = 'snmpget';
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$snmpget_bin = $config['snmpget'];
|
||||
}
|
||||
|
||||
switch (PHP_OS) {
|
||||
case 'WIN32':
|
||||
case 'WINNT':
|
||||
case 'Windows':
|
||||
$error_redir_dir = 'NUL';
|
||||
break;
|
||||
|
||||
default:
|
||||
$error_redir_dir = '/dev/null';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($server_to_exec != 0) {
|
||||
$sql = sprintf(
|
||||
'SELECT ip_address FROM tserver WHERE id_server = %d',
|
||||
$server_to_exec
|
||||
);
|
||||
$server_data = db_get_row_sql($sql);
|
||||
|
||||
if ($version == '3') {
|
||||
$command = $snmpget_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir;
|
||||
} else {
|
||||
$command = $snmpget_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -On -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir;
|
||||
}
|
||||
|
||||
exec(
|
||||
'ssh pandora_exec_proxy@'.$server_data['ip_address'].' "'.$command.'"',
|
||||
$output,
|
||||
$rc
|
||||
);
|
||||
} else {
|
||||
if ($version == '3') {
|
||||
exec(
|
||||
$snmpget_bin.' -m ALL -v 3 -u '.escapeshellarg($snmp3_auth_user).' -A '.escapeshellarg($snmp3_auth_pass).' -l '.escapeshellarg($snmp3_security_level).' -a '.escapeshellarg($snmp3_auth_method).' -x '.escapeshellarg($snmp3_privacy_method).' -X '.escapeshellarg($snmp3_privacy_pass).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir,
|
||||
$output,
|
||||
$rc
|
||||
);
|
||||
} else {
|
||||
exec(
|
||||
$snmpget_bin.' -m ALL -M +'.escapeshellarg($config['homedir'].'/attachment/mibs').' -On -c '.escapeshellarg(io_safe_output($community)).' -v '.escapeshellarg($version).' '.escapeshellarg($target_ip).' '.escapeshellarg($target_oid).' 2> '.$error_redir_dir,
|
||||
$output,
|
||||
$rc
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ($rc != 0) {
|
||||
return $oid_data;
|
||||
}
|
||||
|
||||
foreach ($output as $line) {
|
||||
// Separate the OID from the value.
|
||||
$full_oid = explode('=', $line);
|
||||
if (! isset($full_oid[1])) {
|
||||
break;
|
||||
}
|
||||
|
||||
$oid = trim($full_oid[0]);
|
||||
foreach ($output as $oid => $value) {
|
||||
$oid = trim($oid);
|
||||
$oid_data['numeric_oid'] = $oid;
|
||||
|
||||
// Translate the OID.
|
||||
@ -594,16 +447,19 @@ function snmp_browser_get_oid(
|
||||
$oid_data['description'] = $custom_data['description'];
|
||||
}
|
||||
|
||||
$full_value = explode(':', trim($full_oid[1]));
|
||||
$full_value = explode(':', trim($value));
|
||||
if (! isset($full_value[1])) {
|
||||
$oid_data['value'] = trim($full_oid[1]);
|
||||
$oid_data['value'] = trim($value);
|
||||
} else {
|
||||
$oid_data['type'] = trim($full_value[0]);
|
||||
$oid_data['value'] = trim($full_value[1]);
|
||||
}
|
||||
|
||||
return $oid_data;
|
||||
// There should only be one OID.
|
||||
break;
|
||||
}
|
||||
|
||||
return $oid_data;
|
||||
}
|
||||
|
||||
|
||||
|
@ -4364,7 +4364,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||
function '.$javascript_on_blur_function_name.'() {
|
||||
input_value = $("#'.$input_id.'").val();
|
||||
|
||||
if (input_value.length == 0) {
|
||||
if (input_value.length < 2) {
|
||||
if (('.((int) $print_hidden_input_idagent).')
|
||||
|| ('.((int) $use_hidden_input_idagent).')) {
|
||||
$("#'.$hidden_input_idagent_id.'").val(0);
|
||||
@ -4415,7 +4415,7 @@ function ui_print_agent_autocomplete_input($parameters)
|
||||
url: action="'.$javascript_ajax_page.'",
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.length == 0) {
|
||||
if (data.length < 2) {
|
||||
//Set icon
|
||||
$("#'.$input_id.'")
|
||||
.css("background",
|
||||
|
@ -6096,3 +6096,30 @@ div#status_pie {
|
||||
.white_table_no_border {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* ---------------------------------------------------------------------
|
||||
* - SERVICES TABLE VIEW
|
||||
* ---------------------------------------------------------------------
|
||||
*/
|
||||
#table_services {
|
||||
display: grid;
|
||||
grid-gap: 20px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
||||
grid-template-rows: 1fr;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.table_services_item_link {
|
||||
font-size: 16px;
|
||||
display: grid;
|
||||
min-height: 80px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 10px 10px 0;
|
||||
}
|
||||
|
||||
.table_services_item {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
grid-template-columns: 50px auto;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.735';
|
||||
$build = '190604';
|
||||
$build = '190606';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
@ -616,7 +616,11 @@ foreach ($timezones as $timezone_name => $tz) {
|
||||
}
|
||||
}
|
||||
|
||||
echo '<form name="user_mod" method="post" action="'.ui_get_full_url('index.php?sec=workspace&sec2=operation/users/user_edit').'&modified=1&id='.$id.'&pure='.$config['pure'].'">';
|
||||
if (is_metaconsole()) {
|
||||
echo '<form name="user_mod" method="post" action="'.ui_get_full_url('index.php?sec=advanced&sec2=advanced/users_setup').'&tab=user_edit&modified=1&id='.$id.'&pure='.$config['pure'].'">';
|
||||
} else {
|
||||
echo '<form name="user_mod" method="post" action="'.ui_get_full_url('index.php?sec=workspace&sec2=operation/users/user_edit').'&modified=1&id='.$id.'&pure='.$config['pure'].'">';
|
||||
}
|
||||
|
||||
echo '<div id="user_form">
|
||||
<div class="user_edit_first_row">
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.735
|
||||
%define release 190604
|
||||
%define release 190606
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.735
|
||||
%define release 190604
|
||||
%define release 190606
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_console
|
||||
%define version 7.0NG.735
|
||||
%define release 190604
|
||||
%define release 190606
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
@ -1,5 +1,5 @@
|
||||
package: pandorafms-server
|
||||
Version: 7.0NG.735-190604
|
||||
Version: 7.0NG.735-190606
|
||||
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.735-190604"
|
||||
pandora_version="7.0NG.735-190606"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.735";
|
||||
my $pandora_build = "190604";
|
||||
my $pandora_build = "190606";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -4859,6 +4859,8 @@ sub pandora_process_policy_queue ($) {
|
||||
logger($pa_config, "Starting policy queue patrol process.", 1);
|
||||
|
||||
while($THRRUN == 1) {
|
||||
eval {{
|
||||
local $SIG{__DIE__};
|
||||
|
||||
# If we are not the master server sleep and check again.
|
||||
if (pandora_is_master($pa_config) == 0) {
|
||||
@ -4866,9 +4868,6 @@ sub pandora_process_policy_queue ($) {
|
||||
next;
|
||||
}
|
||||
|
||||
# Check the queue each 5 seconds
|
||||
sleep (5);
|
||||
|
||||
my $operation = enterprise_hook('get_first_policy_queue', [$dbh]);
|
||||
next unless (defined ($operation) && $operation ne '');
|
||||
|
||||
@ -4885,6 +4884,11 @@ sub pandora_process_policy_queue ($) {
|
||||
}
|
||||
|
||||
enterprise_hook('pandora_finish_queue_operation', [$dbh, $operation->{'id'}]);
|
||||
}};
|
||||
|
||||
# Check the queue each 5 seconds
|
||||
sleep(5);
|
||||
|
||||
}
|
||||
|
||||
db_disconnect($dbh);
|
||||
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
||||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "7.0NG.735";
|
||||
my $pandora_build = "190604";
|
||||
my $pandora_build = "190606";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||
|
@ -29,6 +29,7 @@ use Sys::Syslog;
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
use LWP::UserAgent;
|
||||
use threads;
|
||||
use threads::shared;
|
||||
|
||||
# New in 3.2. Used to sendmail internally, without external scripts
|
||||
# use Module::Loaded;
|
||||
@ -1864,7 +1865,7 @@ sub stop_server_threads {
|
||||
$THRRUN = 0;
|
||||
|
||||
foreach my $thr (@ServerThreads) {
|
||||
$thr->detach();
|
||||
$thr->join();
|
||||
}
|
||||
|
||||
@ServerThreads = ();
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.735
|
||||
%define release 190604
|
||||
%define release 190606
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#
|
||||
%define name pandorafms_server
|
||||
%define version 7.0NG.735
|
||||
%define release 190604
|
||||
%define release 190606
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
@ -9,7 +9,7 @@
|
||||
# **********************************************************************
|
||||
|
||||
PI_VERSION="7.0NG.735"
|
||||
PI_BUILD="190604"
|
||||
PI_BUILD="190606"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
@ -34,7 +34,7 @@ use PandoraFMS::Config;
|
||||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.735 PS190604";
|
||||
my $version = "7.0NG.735 PS190606";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
||||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "7.0NG.735 PS190604";
|
||||
my $version = "7.0NG.735 PS190606";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|