Merge branch 'develop' into 'ent-6631-Bug-en-dashboard-de-usuario-sin-permiso-2'

# Conflicts:
#   pandora_console/include/lib/Dashboard/Widgets/agent_module.php
This commit is contained in:
Alejandro Campos 2021-01-15 14:52:26 +01:00
commit 5b9d7bcb81
49 changed files with 805 additions and 180 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 7.0NG.751-210114 Version: 7.0NG.751-210115
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.751-210114" pandora_version="7.0NG.751-210115"
echo "Test if you has the tools for to make the packages." echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -1016,7 +1016,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.751'; use constant AGENT_VERSION => '7.0NG.751';
use constant AGENT_BUILD => '210114'; use constant AGENT_BUILD => '210115';
# Agent log default file size maximum and instances # Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000; use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.751 %define version 7.0NG.751
%define release 210114 %define release 210115
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 7.0NG.751 %define version 7.0NG.751
%define release 210114 %define release 210115
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -10,7 +10,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.751" PI_VERSION="7.0NG.751"
PI_BUILD="210114" PI_BUILD="210115"
OS_NAME=`uname -s` OS_NAME=`uname -s`
FORCE=0 FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{210114} {210115}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils; using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1 #define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.751(Build 210114)") #define PANDORA_VERSION ("7.0NG.751(Build 210115)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST" VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent" VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.751(Build 210114))" VALUE "ProductVersion", "(7.0NG.751(Build 210115))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 7.0NG.751-210114 Version: 7.0NG.751-210115
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.751-210114" pandora_version="7.0NG.751-210115"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -14,4 +14,58 @@ enterprise/godmode/reporting/cluster_view.php
enterprise/include/ajax/clustermap.php enterprise/include/ajax/clustermap.php
enterprise/include/functions_clustermap.php enterprise/include/functions_clustermap.php
enterprise/include/functions_clusters.php enterprise/include/functions_clusters.php
enterprise/include/javascript/ClusterMapController.js enterprise/include/javascript/ClusterMapController.js
enterprise/extensions/ipam/ipam_supernet_network.php
enterprise/extensions/ipam/ipam_vlan_wizard.php
enterprise/extensions/ipam/sql
enterprise/extensions/ipam/sql/ipam_mr_1.sql
enterprise/extensions/ipam/sql/ipam_mr_2.sql
enterprise/extensions/ipam/sql/ipam.sql
enterprise/extensions/ipam/css
enterprise/extensions/ipam/css/ipam.css
enterprise/extensions/ipam/ipam_ajax.php
enterprise/extensions/ipam/ipam_vlan_network.php
enterprise/extensions/ipam/ipam_supernet_config.php
enterprise/extensions/ipam/ipam_list.php
enterprise/extensions/ipam/ipam_excel.php
enterprise/extensions/ipam/ipam_massive.php
enterprise/extensions/ipam/ipam_editor.php
enterprise/extensions/ipam/recon_script
enterprise/extensions/ipam/recon_script/readme
enterprise/extensions/ipam/ipam_network.php
enterprise/extensions/ipam/ipam_calculator.php
enterprise/extensions/ipam/ipam_vlan_config.php
enterprise/extensions/ipam/images
enterprise/extensions/ipam/images/red_host_agent.png
enterprise/extensions/ipam/images/lil_green_host_alert.png
enterprise/extensions/ipam/images/lil_red_host_alert.png
enterprise/extensions/ipam/images/lil_red_host_agent.png
enterprise/extensions/ipam/images/green_host_dotted.png
enterprise/extensions/ipam/images/red_host.png
enterprise/extensions/ipam/images/red_host_alert.png
enterprise/extensions/ipam/images/not_host.png
enterprise/extensions/ipam/images/lil_green_host_agent_alert.png
enterprise/extensions/ipam/images/ball_alive.png
enterprise/extensions/ipam/images/lil_green_host_agent.png
enterprise/extensions/ipam/images/ball_notalive.png
enterprise/extensions/ipam/images/green_host_agent_alert.png
enterprise/extensions/ipam/images/green_host_agent.png
enterprise/extensions/ipam/images/lil_red_host.png
enterprise/extensions/ipam/images/green_host_alert.png
enterprise/extensions/ipam/images/lil_not_host.png
enterprise/extensions/ipam/images/green_host.png
enterprise/extensions/ipam/images/lil_green_host.png
enterprise/extensions/ipam/images/lil_red_host_agent_alert.png
enterprise/extensions/ipam/images/lil_green_host_dotted.png
enterprise/extensions/ipam/images/red_host_agent_alert.png
enterprise/extensions/ipam/ipam_supernet_map.php
enterprise/extensions/ipam/include
enterprise/extensions/ipam/include/functions_ipam.php
enterprise/extensions/ipam/include/ajax
enterprise/extensions/ipam/include/ajax/ipam_ajax.php
enterprise/extensions/ipam/include/javascript
enterprise/extensions/ipam/include/javascript/ipam.js
enterprise/extensions/ipam/include/javascript/IpamMapController.js
enterprise/extensions/ipam/ipam_action.php
enterprise/extensions/ipam.php
enterprise/extensions/ipam

View File

@ -1,5 +1,122 @@
START TRANSACTION; START TRANSACTION;
CREATE TABLE IF NOT EXISTS `tipam_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`network` varchar(100) NOT NULL default '',
`name_network` varchar(255) default '',
`description` text NOT NULL,
`location` tinytext NOT NULL,
`id_recon_task` int(10) unsigned NOT NULL,
`scan_interval` tinyint(2) default 1,
`monitoring` tinyint(2) default 0,
`id_group` mediumint(8) unsigned NULL default 0,
`lightweight_mode` tinyint(2) default 0,
`users_operator` text,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_ip` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_network` bigint(20) unsigned NOT NULL default 0,
`id_agent` int(10) unsigned NOT NULL,
`forced_agent` tinyint(2) NOT NULL default '0',
`ip` varchar(100) NOT NULL default '',
`ip_dec` int(10) unsigned NOT NULL,
`id_os` int(10) unsigned NOT NULL,
`forced_os` tinyint(2) NOT NULL default '0',
`hostname` tinytext NOT NULL,
`forced_hostname` tinyint(2) NOT NULL default '0',
`comments` text NOT NULL,
`alive` tinyint(2) NOT NULL default '0',
`managed` tinyint(2) NOT NULL default '0',
`reserved` tinyint(2) NOT NULL default '0',
`time_last_check` datetime NOT NULL default '1970-01-01 00:00:00',
`time_create` datetime NOT NULL default '1970-01-01 00:00:00',
`users_operator` text,
`time_last_edit` datetime NOT NULL default '1970-01-01 00:00:00',
`enabled` tinyint(2) NOT NULL default '1',
`generate_events` tinyint(2) NOT NULL default '0',
`leased` tinyint(2) DEFAULT '0',
`leased_expiration` bigint(20) DEFAULT '0',
`mac_address` varchar(20) DEFAULT NULL,
`leased_mode` tinyint(2) DEFAULT '0',
PRIMARY KEY (`id`),
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_vlan` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`name` varchar(250) NOT NULL,
`description` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_vlan_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_vlan` bigint(20) unsigned NOT NULL,
`id_network` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_vlan`) REFERENCES tipam_vlan(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_supernet` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`name` varchar(250) NOT NULL,
`description` text default '',
`address` varchar(250) NOT NULL,
`mask` varchar(250) NOT NULL,
`subneting_mask` varchar(250) default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_supernet_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_supernet` bigint(20) unsigned NOT NULL,
`id_network` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_supernet`) REFERENCES tipam_supernet(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET @insert_type = 3;
SET @insert_name = 'IPAM Recon';
SET @insert_description = 'This script is used to automatically detect network hosts availability and name, used as Recon Custom Script in the recon task. Parameters used are:\n\n* custom_field1 = network. i.e.: 192.168.100.0/24\n* custom_field2 = associated IPAM network id. i.e.: 4. Please do not change this value, it is assigned automatically in IPAM management.\n\nSee documentation for more information.';
SET @insert_script = '/usr/share/pandora_server/util/recon_scripts/IPAMrecon.pl';
SET @insert_macros = '{"1":{"macro":"_field1_","desc":"Network","help":"i.e.: 192.168.100.0/24","value":"","hide":""}}';
INSERT IGNORE INTO trecon_script (`id_recon_script`,`type`, `name`, `description`, `script`, `macros`)
SELECT `id_recon_script`,`type`, `name`, `description`, `script`, `macros` FROM (
SELECT `id_recon_script`,`type`, `name`, `description`, `script`, `macros` FROM `trecon_script` WHERE `name` = @insert_name
UNION
SELECT (SELECT max(`id_recon_script`)+1 FROM `trecon_script`) AS `id_recon_script`,
@insert_type as `type`,
@insert_name as `name`,
@insert_description as `description`,
@insert_script as `script`,
@insert_macros as `macros`
) t limit 1;
ALTER TABLE `tipam_ip` ADD COLUMN `leased` tinyint(2) DEFAULT '0';
ALTER TABLE `tipam_ip` ADD COLUMN `leased_expiration` bigint(20) DEFAULT '0';
ALTER TABLE `tipam_ip` ADD COLUMN `mac_address` varchar(20) DEFAULT NULL;
ALTER TABLE `tipam_ip` ADD COLUMN `leased_mode` tinyint(2) DEFAULT '0';
ALTER TABLE `tipam_network` ADD COLUMN `monitoring` tinyint(2) default '0';
ALTER TABLE `tipam_network` ADD COLUMN `id_group` mediumint(8) unsigned NULL default '0';
ALTER TABLE `tipam_network` ADD COLUMN `lightweight_mode` tinyint(2) default '0';
ALTER TABLE `tipam_network` ADD COLUMN `name_network` varchar(255) default '';
DELETE FROM `tconfig` WHERE `token` = 'ipam_installed';
DELETE FROM `tconfig` WHERE `token` = 'ipam_recon_script_id';
UPDATE `talert_commands` SET `fields_descriptions` = '[\"Event text\",\"Event type\",\"Source\",\"Agent name or _agent_\",\"Event severity\",\"ID extra\",\"Tags separated by commas\",\"Comments\",\"\",\"\"]' WHERE `id` = 3; UPDATE `talert_commands` SET `fields_descriptions` = '[\"Event text\",\"Event type\",\"Source\",\"Agent name or _agent_\",\"Event severity\",\"ID extra\",\"Tags separated by commas\",\"Comments\",\"\",\"\"]' WHERE `id` = 3;
ALTER TABLE `talert_templates` ALTER TABLE `talert_templates`

View File

@ -3868,3 +3868,103 @@ INSERT IGNORE INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_gro
INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mikrotik','MikroTik'),(6486,'alcatel','Alcatel-Lucent Enterprise'),(41112,'ubiquiti','Ubiquiti Networks, Inc.'),(207,'telesis','Allied Telesis, Inc.'),(10002,'frogfoot','Frogfoot Networks'),(2,'ibm','IBM'),(4,'unix','Unix'),(63,'apple','Apple Computer, Inc.'),(674,'dell','Dell Inc.'),(111,'oracle','Oracle'),(116,'hitachi','Hitachi, Ltd.'),(173,'netlink','Netlink'),(188,'ascom','Ascom'),(6574,'synology','Synology Inc.'),(3861,'fujitsu','Fujitsu Network Communications, Inc.'),(53526,'dell','Dell ATC'),(52627,'apple','Apple Inc'),(19464,'hitachi','Hitachi Communication Technologies, Ltd.'),(13062,'ascom','Ascom'); INSERT IGNORE INTO `tpen` VALUES (171,'dlink','D-Link Systems, Inc.'),(14988,'mikrotik','MikroTik'),(6486,'alcatel','Alcatel-Lucent Enterprise'),(41112,'ubiquiti','Ubiquiti Networks, Inc.'),(207,'telesis','Allied Telesis, Inc.'),(10002,'frogfoot','Frogfoot Networks'),(2,'ibm','IBM'),(4,'unix','Unix'),(63,'apple','Apple Computer, Inc.'),(674,'dell','Dell Inc.'),(111,'oracle','Oracle'),(116,'hitachi','Hitachi, Ltd.'),(173,'netlink','Netlink'),(188,'ascom','Ascom'),(6574,'synology','Synology Inc.'),(3861,'fujitsu','Fujitsu Network Communications, Inc.'),(53526,'dell','Dell ATC'),(52627,'apple','Apple Inc'),(19464,'hitachi','Hitachi Communication Technologies, Ltd.'),(13062,'ascom','Ascom');
CREATE TABLE IF NOT EXISTS `tipam_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`network` varchar(100) NOT NULL default '',
`name_network` varchar(255) default '',
`description` text NOT NULL,
`location` tinytext NOT NULL,
`id_recon_task` int(10) unsigned NOT NULL,
`scan_interval` tinyint(2) default 1,
`monitoring` tinyint(2) default 0,
`id_group` mediumint(8) unsigned NULL default 0,
`lightweight_mode` tinyint(2) default 0,
`users_operator` text,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_ip` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_network` bigint(20) unsigned NOT NULL default 0,
`id_agent` int(10) unsigned NOT NULL,
`forced_agent` tinyint(2) NOT NULL default '0',
`ip` varchar(100) NOT NULL default '',
`ip_dec` int(10) unsigned NOT NULL,
`id_os` int(10) unsigned NOT NULL,
`forced_os` tinyint(2) NOT NULL default '0',
`hostname` tinytext NOT NULL,
`forced_hostname` tinyint(2) NOT NULL default '0',
`comments` text NOT NULL,
`alive` tinyint(2) NOT NULL default '0',
`managed` tinyint(2) NOT NULL default '0',
`reserved` tinyint(2) NOT NULL default '0',
`time_last_check` datetime NOT NULL default '1970-01-01 00:00:00',
`time_create` datetime NOT NULL default '1970-01-01 00:00:00',
`users_operator` text,
`time_last_edit` datetime NOT NULL default '1970-01-01 00:00:00',
`enabled` tinyint(2) NOT NULL default '1',
`generate_events` tinyint(2) NOT NULL default '0',
`leased` tinyint(2) DEFAULT '0',
`leased_expiration` bigint(20) DEFAULT '0',
`mac_address` varchar(20) DEFAULT NULL,
`leased_mode` tinyint(2) DEFAULT '0',
PRIMARY KEY (`id`),
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_vlan` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`name` varchar(250) NOT NULL,
`description` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_vlan_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_vlan` bigint(20) unsigned NOT NULL,
`id_network` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_vlan`) REFERENCES tipam_vlan(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_supernet` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`name` varchar(250) NOT NULL,
`description` text default '',
`address` varchar(250) NOT NULL,
`mask` varchar(250) NOT NULL,
`subneting_mask` varchar(250) default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tipam_supernet_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_supernet` bigint(20) unsigned NOT NULL,
`id_network` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_supernet`) REFERENCES tipam_supernet(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET @insert_type = 3;
SET @insert_name = 'IPAM Recon';
SET @insert_description = 'This script is used to automatically detect network hosts availability and name, used as Recon Custom Script in the recon task. Parameters used are:\n\n* custom_field1 = network. i.e.: 192.168.100.0/24\n* custom_field2 = associated IPAM network id. i.e.: 4. Please do not change this value, it is assigned automatically in IPAM management.\n\nSee documentation for more information.';
SET @insert_script = '/usr/share/pandora_server/util/recon_scripts/IPAMrecon.pl';
SET @insert_macros = '{"1":{"macro":"_field1_","desc":"Network","help":"i.e.: 192.168.100.0/24","value":"","hide":""}}';
INSERT IGNORE INTO trecon_script (`id_recon_script`,`type`, `name`, `description`, `script`, `macros`)
SELECT `id_recon_script`,`type`, `name`, `description`, `script`, `macros` FROM (
SELECT `id_recon_script`,`type`, `name`, `description`, `script`, `macros` FROM `trecon_script` WHERE `name` = @insert_name
UNION
SELECT (SELECT max(`id_recon_script`)+1 FROM `trecon_script`) AS `id_recon_script`,
@insert_type as `type`,
@insert_name as `name`,
@insert_description as `description`,
@insert_script as `script`,
@insert_macros as `macros`
) t limit 1;
DELETE FROM `tconfig` WHERE `token` = 'ipam_installed';
DELETE FROM `tconfig` WHERE `token` = 'ipam_recon_script_id';

View File

@ -205,12 +205,16 @@ if ($update) {
} }
if ($create) { if ($create) {
$id = db_process_sql_insert('tevent_filter', $values); if (!empty($values['id_name'])) {
$id = db_process_sql_insert('tevent_filter', $values);
if ($id === false) { if ($id === false) {
ui_print_error_message('Error creating filter'); ui_print_error_message('Error creating filter');
} else {
ui_print_success_message('Filter created successfully');
}
} else { } else {
ui_print_success_message('Filter created successfully'); ui_print_error_message('Filter name must not be empty');
} }
} }

View File

@ -382,6 +382,7 @@ if (check_acl($config['id_user'], 0, 'PM') || check_acl($config['id_user'], 0, '
$sub['tools/diagnostics']['text'] = __('Diagnostic info'); $sub['tools/diagnostics']['text'] = __('Diagnostic info');
$sub['tools/diagnostics']['id'] = 'Diagnostic info'; $sub['tools/diagnostics']['id'] = 'Diagnostic info';
enterprise_hook('omnishell'); enterprise_hook('omnishell');
enterprise_hook('ipam_submenu');
$sub['godmode/setup/news']['text'] = __('Site news'); $sub['godmode/setup/news']['text'] = __('Site news');
$sub['godmode/setup/news']['id'] = 'Site news'; $sub['godmode/setup/news']['id'] = 'Site news';

View File

@ -450,6 +450,10 @@ class DiscoveryTaskList extends HTML
$table->align[9] = 'left'; $table->align[9] = 'left';
foreach ($recon_tasks as $task) { foreach ($recon_tasks as $task) {
if ($this->aclMulticheck('AR|AW|AM', $task['id_group']) === false) {
continue;
}
$no_operations = false; $no_operations = false;
$data = []; $data = [];
$server_name = servers_get_name($task['id_recon_server']); $server_name = servers_get_name($task['id_recon_server']);
@ -759,7 +763,7 @@ class DiscoveryTaskList extends HTML
if ($ipam === true) { if ($ipam === true) {
$data[9] .= '<a href="'.ui_get_full_url( $data[9] .= '<a href="'.ui_get_full_url(
sprintf( sprintf(
'index.php?sec=godmode/extensions&sec2=enterprise/extensions/ipam&action=edit&id=%d', 'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=edit&id=%d',
$tipam_task_id $tipam_task_id
) )
).'">'.html_print_image( ).'">'.html_print_image(
@ -768,7 +772,7 @@ class DiscoveryTaskList extends HTML
['title' => __('Edit task')] ['title' => __('Edit task')]
).'</a>'; ).'</a>';
$data[9] .= '<a href="'.ui_get_full_url( $data[9] .= '<a href="'.ui_get_full_url(
'index.php?sec=godmode/extensions&sec2=enterprise/extensions/ipam&action=delete&id='.$tipam_task_id 'index.php?sec=gextensions&sec2=enterprise/tools/ipam/ipam&action=delete&id='.$tipam_task_id
).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image( ).'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image(
'images/cross.png', 'images/cross.png',
true, true,

View File

@ -254,7 +254,7 @@ class HTML
* *
* @return boolean Alowed or not. * @return boolean Alowed or not.
*/ */
public function aclMulticheck($access=null) public function aclMulticheck($access=null, $id_group=0)
{ {
global $config; global $config;
@ -268,7 +268,7 @@ class HTML
foreach ($perms as $perm) { foreach ($perms as $perm) {
$allowed = $allowed || (bool) check_acl( $allowed = $allowed || (bool) check_acl(
$config['id_user'], $config['id_user'],
0, $id_group,
$perm $perm
); );
} }

View File

@ -20,7 +20,7 @@
/** /**
* Pandora build version and version * Pandora build version and version
*/ */
$build_version = 'PC210114'; $build_version = 'PC210115';
$pandora_version = 'v7.0NG.751'; $pandora_version = 'v7.0NG.751';
// Do not overwrite default timezone set if defined. // Do not overwrite default timezone set if defined.

View File

@ -1888,24 +1888,19 @@ function api_set_delete_agent($id, $thrash1, $other, $thrash3)
} }
} else { } else {
// Delete only if the centralised mode is disabled. // Delete only if the centralised mode is disabled.
if (is_central_policies_on_node()) { $headers = getallheaders();
if (isset($headers['idk']) === false || is_management_allowed($headers['idk']) === false) {
returnError('centralized'); returnError('centralized');
exit; exit;
} }
// Support for Pandora Enterprise.
if (license_free() === false) {
define('PANDORA_ENTERPRISE', true);
}
if ($agent_by_alias) { if ($agent_by_alias) {
$idsAgents = agents_get_agent_id_by_alias(io_safe_input($id)); $idsAgents = agents_get_agent_id_by_alias(io_safe_input($id));
} else {
$idAgent = agents_get_agent_id($id, true);
}
if (!$agent_by_alias) {
if (!util_api_check_agent_and_print_error($idAgent, 'string', 'AD')) {
return;
}
}
if ($agent_by_alias) {
foreach ($idsAgents as $id) { foreach ($idsAgents as $id) {
if (!util_api_check_agent_and_print_error($id['id_agente'], 'string', 'AD')) { if (!util_api_check_agent_and_print_error($id['id_agente'], 'string', 'AD')) {
continue; continue;
@ -1918,6 +1913,11 @@ function api_set_delete_agent($id, $thrash1, $other, $thrash3)
} }
} }
} else { } else {
$idAgent = agents_get_agent_id($id, true);
if (!util_api_check_agent_and_print_error($idAgent, 'string', 'AD')) {
return;
}
$result = agents_delete_agent($idAgent, true); $result = agents_delete_agent($idAgent, true);
} }
} }

View File

@ -165,6 +165,10 @@ function extensions_get_extensions($enterprise=false, $rel_path='')
return array_merge($extensions, extensions_get_extensions(true, $rel_path)); return array_merge($extensions, extensions_get_extensions(true, $rel_path));
} }
if (isset($extensions['ipam.php'])) {
unset($extensions['ipam.php']);
}
return $extensions; return $extensions;
} }

View File

@ -880,7 +880,7 @@ function reports_get_report_types($template=false, $not_editor=false)
]; ];
} }
if ($config['enterprise_installed'] && $template === false) { if ($config['enterprise_installed'] && $template === false && !is_metaconsole()) {
$types['event_report_log'] = [ $types['event_report_log'] = [
'optgroup' => __('Log'), 'optgroup' => __('Log'),
'name' => __('Log report'), 'name' => __('Log report'),

View File

@ -900,7 +900,11 @@ function tags_get_acl_tags_module_condition($acltags, $modules_table='', $force_
} }
$in_group = implode(',', $without_tags); $in_group = implode(',', $without_tags);
$condition .= sprintf('(tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))', $in_group, $in_group); if ($has_secondary) {
$condition .= sprintf('(tagente.id_grupo IN (%s) OR tasg.id_group IN (%s))', $in_group, $in_group);
} else {
$condition .= sprintf('(tagente.id_grupo IN (%s))', $in_group);
}
} }
$condition = !empty($condition) ? "($condition)" : ''; $condition = !empty($condition) ? "($condition)" : '';

View File

@ -30,23 +30,23 @@ Addresses will be shown as icons, large or small. This icons will render the fol
</tr> </tr>
<tr> <tr>
<td>No assigned agent<br><br>Disabled events</td> <td>No assigned agent<br><br>Disabled events</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host.png"></td>
</tr> </tr>
<tr> <tr>
<td>With assigned agent<br><br>Disabled events</td> <td>With assigned agent<br><br>Disabled events</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_agent.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_agent.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent.png"></td>
</tr> </tr>
<tr> <tr>
<td>No assigned agent<br><br>Activated events</td> <td>No assigned agent<br><br>Activated events</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_alert.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_alert.png"></td>
</tr> </tr>
<tr> <tr>
<td>With assigned agent<br><br>Activated events</td> <td>With assigned agent<br><br>Activated events</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_agent_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_agent_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td>
</tr> </tr>
<tr> <tr>
<th colspan=3>Not managed</th> <th colspan=3>Not managed</th>
@ -58,8 +58,8 @@ Addresses will be shown as icons, large or small. This icons will render the fol
</tr> </tr>
<tr> <tr>
<td style="width: 100px;">If an IP address is not managed, you can only view if is responding or not.</td> <td style="width: 100px;">If an IP address is not managed, you can only view if is responding or not.</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_dotted.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_dotted.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/not_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/not_host.png"></td>
</tr> </tr>
<tr> <tr>
<th colspan=3>Not assigned</th> <th colspan=3>Not assigned</th>

View File

@ -31,23 +31,23 @@ Cada dirección tendrá un icono grande que nos aportará información:<br><br>
</tr> </tr>
<tr> <tr>
<td>Sin agente asignado<br><br>Eventos desactivados</td> <td>Sin agente asignado<br><br>Eventos desactivados</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host.png"></td>
</tr> </tr>
<tr> <tr>
<td>Con agente asignado<br><br>Eventos desactivados</td> <td>Con agente asignado<br><br>Eventos desactivados</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_agent.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_agent.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent.png"></td>
</tr> </tr>
<tr> <tr>
<td>Sin agente asignado<br><br>Eventos activados</td> <td>Sin agente asignado<br><br>Eventos activados</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_alert.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_alert.png"></td>
</tr> </tr>
<tr> <tr>
<td>Con agente asignado<br><br>Eventos activados</td> <td>Con agente asignado<br><br>Eventos activados</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_agent_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_agent_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td>
</tr> </tr>
<tr> <tr>
<th colspan=3>Sin administrar</th> <th colspan=3>Sin administrar</th>
@ -59,8 +59,8 @@ Cada dirección tendrá un icono grande que nos aportará información:<br><br>
</tr> </tr>
<tr> <tr>
<td style="width: 100px;">Independientemente de la configuración, si el host no está administrado solo se diferenciará entre si está vivo y no responde</td> <td style="width: 100px;">Independientemente de la configuración, si el host no está administrado solo se diferenciará entre si está vivo y no responde</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_dotted.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_dotted.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/not_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/not_host.png"></td>
</tr> </tr>
<tr> <tr>
<th colspan=3>No asignado</th> <th colspan=3>No asignado</th>

View File

@ -31,23 +31,23 @@ IP 管理は、<?php echo get_product_name(); ?> エージェントで設定し
</tr> </tr>
<tr> <tr>
<td>エージェント未割当<br><br>イベント無効</td> <td>エージェント未割当<br><br>イベント無効</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host.png"></td>
</tr> </tr>
<tr> <tr>
<td>エージェント割当済<br><br>イベント無効</td> <td>エージェント割当済<br><br>イベント無効</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_agent.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_agent.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent.png"></td>
</tr> </tr>
<tr> <tr>
<td>エージェント未割当<br><br>イベント有効</td> <td>エージェント未割当<br><br>イベント有効</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_alert.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_alert.png"></td>
</tr> </tr>
<tr> <tr>
<td>エージェント割当済<br><br>イベント有効</td> <td>エージェント割当済<br><br>イベント有効</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_agent_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_agent_alert.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/red_host_agent_alert.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/red_host_agent_alert.png"></td>
</tr> </tr>
<tr> <tr>
<th colspan=3>未管理</th> <th colspan=3>未管理</th>
@ -59,8 +59,8 @@ IP 管理は、<?php echo get_product_name(); ?> エージェントで設定し
</tr> </tr>
<tr> <tr>
<td style="width: 100px;">IP アドレスが管理されていない場合、応答があるかどうかだけを見ることができます。</td> <td style="width: 100px;">IP アドレスが管理されていない場合、応答があるかどうかだけを見ることができます。</td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/green_host_dotted.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/green_host_dotted.png"></td>
<td style="text-align:center;"><img src="../enterprise/extensions/ipam/images/not_host.png"></td> <td style="text-align:center;"><img src="../enterprise/images/ipam/not_host.png"></td>
</tr> </tr>
<tr> <tr>
<th colspan=3>未割当</th> <th colspan=3>未割当</th>

View File

@ -27,6 +27,8 @@
*/ */
namespace PandoraFMS\Dashboard; namespace PandoraFMS\Dashboard;
use PandoraFMS\Agent;
use PandoraFMS\Module;
/** /**
* Agent module Widgets. * Agent module Widgets.
@ -355,8 +357,10 @@ class AgentModuleWidget extends Widget
foreach ($modules_by_name as $module) { foreach ($modules_by_name as $module) {
$row['modules'][$module['name']] = null; $row['modules'][$module['name']] = null;
foreach ($module['id'] as $module_id) { foreach ($module['id'] as $module_id) {
if (array_key_exists($module_id, $agent_modules)) { if (array_key_exists($module_id, $agent_modules) === true) {
$row['modules'][$module['name']] = modules_get_agentmodule_status($module_id); $row['modules'][$module['name']] = modules_get_agentmodule_status(
$module_id
);
break; break;
} }
} }
@ -373,12 +377,16 @@ class AgentModuleWidget extends Widget
* Draw table Agent/Module. * Draw table Agent/Module.
* *
* @param array $visualData Data for draw. * @param array $visualData Data for draw.
* @param array $allModules Data for th draw.
* *
* @return string Html output. * @return string Html output.
*/ */
private function generateViewAgentModule(array $visualData):string private function generateViewAgentModule(
{ array $visualData,
$table_data = '<div style="display:flex; width:100%; height:100%; margin: 10px;">'; array $allModules
):string {
$style = 'display:flex; width:100%; height:100%; margin: 10px;';
$table_data = '<div style="'.$style.'">';
$table_data .= '<table class="widget_agent_module" cellpadding="1" cellspacing="0" border="0" style="background-color: transparent; margin: 0 auto;">'; $table_data .= '<table class="widget_agent_module" cellpadding="1" cellspacing="0" border="0" style="background-color: transparent; margin: 0 auto;">';
if (empty($visualData) === false) { if (empty($visualData) === false) {
@ -386,20 +394,7 @@ class AgentModuleWidget extends Widget
$array_names = []; $array_names = [];
foreach ($visualData as $data) { foreach ($allModules as $module_name) {
foreach ($data['modules'] as $module_name => $module) {
if ($module === null
|| in_array($module_name, $array_names)
) {
continue;
} else {
$array_names[] = $module_name;
}
}
}
natcasesort($array_names);
foreach ($array_names as $module_name) {
$file_name = ui_print_truncate_text( $file_name = ui_print_truncate_text(
$module_name, $module_name,
'module_small', 'module_small',
@ -456,14 +451,17 @@ class AgentModuleWidget extends Widget
foreach ($row['modules'] as $module_name => $module) { foreach ($row['modules'] as $module_name => $module) {
if ($module === null) { if ($module === null) {
if (in_array($module_name, $array_names)) { if (in_array($module_name, $allModules) === true) {
$table_data .= "<td style='background-color: transparent;'>"; $style = 'background-color: transparent;';
$table_data .= "<td style='".$style."'>";
$table_data .= '</td>'; $table_data .= '</td>';
} else { } else {
continue; continue;
} }
} else { } else {
$table_data .= "<td style='text-align: center; background-color: transparent;'>"; $style = 'text-align: center;';
$style .= ' background-color: transparent;';
$table_data .= "<td style='".$style."'>";
switch ($module) { switch ($module) {
case AGENT_STATUS_NORMAL: case AGENT_STATUS_NORMAL:
$table_data .= \ui_print_status_image( $table_data .= \ui_print_status_image(
@ -604,70 +602,49 @@ class AgentModuleWidget extends Widget
return $output; return $output;
} }
if (isset($this->values['mAgents']) === true // Estract info all modules selected.
&& empty($this->values['mAgents']) === false $target_modules = explode(',', $this->values['mModules']);
) { $all_modules = Module::search(
$sql = sprintf( ['id_agente_modulo' => $target_modules]
'SELECT id_agente,nombre,alias );
FROM tagente $reduceAllModules = array_reduce(
WHERE id_agente IN (%s) $all_modules,
ORDER BY id_agente', function ($carry, $item) {
$this->values['mAgents'] $carry[$item->name()] = null;
); return $carry;
$agents = db_get_all_rows_sql($sql);
if ($agents === false) {
$agents = [];
} }
);
$modules = false; \ksort($reduceAllModules);
if (isset($this->values['mModules']) === true
&& empty($this->values['mModules']) === false $visualData = [];
) { // Estract info agents selected.
$sql = sprintf( $target_agents = explode(',', $this->values['mAgents']);
'SELECT nombre foreach ($target_agents as $agent_id) {
FROM tagente_modulo try {
WHERE id_agente_modulo IN (%s)', $agent = new Agent($agent_id);
$this->values['mModules'] $visualData[$agent_id]['agent_status'] = $agent->lastStatus();
$visualData[$agent_id]['agent_name'] = $agent->name();
$visualData[$agent_id]['agent_alias'] = $agent->alias();
$modules = $agent->searchModules(
['id_agente_modulo' => $target_modules]
); );
$arrayNames = db_get_all_rows_sql($sql); $visualData[$agent_id]['modules'] = $reduceAllModules;
$names = array_reduce( foreach ($modules as $module) {
$arrayNames, $visualData[$agent_id]['modules'][$module->name()] = $module->getStatus()->estado();
function ($carry, $item) { }
$carry[] = $item['nombre']; } catch (Exception $e) {
return $carry; echo 'Error: '.$e->getMessage();
}
);
$sql = sprintf(
'SELECT id_agente_modulo,nombre
FROM tagente_modulo
WHERE id_agente IN (%s)
AND nombre IN ("%s")
AND delete_pending = 0
ORDER BY nombre',
$this->values['mAgents'],
implode('","', $names)
);
$modules = index_array(
db_get_all_rows_sql($sql),
'id_agente_modulo',
'nombre'
);
} }
if ($modules === false) {
$modules = [];
}
} else {
$agents = [];
$modules = [];
} }
$visualData = $this->generateDataAgentModule($agents, $modules); $allModules = array_keys($reduceAllModules);
$output = $this->generateViewAgentModule(
$output = $this->generateViewAgentModule($visualData); $visualData,
$allModules
);
return $output; return $output;
} }

View File

@ -62,8 +62,14 @@ final class ModuleGraph extends Item
$return = parent::encode($data); $return = parent::encode($data);
$id_custom_graph = static::extractIdCustomGraph($data); $id_custom_graph = static::extractIdCustomGraph($data);
if ($id_custom_graph !== null) { if (!empty($id_custom_graph)) {
$return['id_custom_graph'] = $id_custom_graph; if (\is_metaconsole()) {
$explode_custom_graph = explode('|', $id_custom_graph);
$return['id_custom_graph'] = $explode_custom_graph[0];
$return['id_metaconsole'] = $explode_custom_graph[1];
} else {
$return['id_custom_graph'] = $id_custom_graph;
}
} }
$type_graph = static::getTypeGraph($data); $type_graph = static::getTypeGraph($data);
@ -89,7 +95,7 @@ final class ModuleGraph extends Item
*/ */
private static function extractIdCustomGraph(array $data) private static function extractIdCustomGraph(array $data)
{ {
return static::parseIntOr( return static::notEmptyStringOr(
static::issetInArray( static::issetInArray(
$data, $data,
[ [
@ -362,6 +368,7 @@ final class ModuleGraph extends Item
'show_legend' => $showLegend, 'show_legend' => $showLegend,
'return_img_base_64' => true, 'return_img_base_64' => true,
'show_title' => false, 'show_title' => false,
'server_id' => $metaconsoleId,
]; ];
$paramsCombined = [ $paramsCombined = [
@ -414,6 +421,7 @@ final class ModuleGraph extends Item
'show_legend' => $showLegend, 'show_legend' => $showLegend,
'show_title' => false, 'show_title' => false,
'dashboard' => true, 'dashboard' => true,
'server_id' => $metaconsoleId,
]; ];
if ($imageOnly !== false) { if ($imageOnly !== false) {
@ -452,16 +460,16 @@ final class ModuleGraph extends Item
true, true,
'RR' 'RR'
); );
}
$data = array_reduce( $data = array_reduce(
$data, $data,
function ($carry, $item) { function ($carry, $item) {
$carry[$item['id_graph']] = $item['name']; $carry[$item['id_graph']] = $item['name'];
return $carry; return $carry;
}, },
[] []
); );
}
return $data; return $data;
} }

View File

@ -407,6 +407,10 @@ table.group_modules_status_box tr td span a {
text-align: center; text-align: center;
} }
table.widget_agent_module tbody tr td {
padding: 5px;
}
.container-center .widget-histogram-chart .flot-text .flot-x-axis div { .container-center .widget-histogram-chart .flot-text .flot-x-axis div {
white-space: nowrap; white-space: nowrap;
} }

View File

@ -0,0 +1,243 @@
/**
* Extension to manage a list of gateways and the node address where they should
* point to.
*
* @category Extensions
* @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.
* ============================================================================
*/
.mask_example,
#ipv4_example,
#ipv6_example {
font-size: xx-small;
font-weight: normal;
margin-left: 5px;
}
.mode_img {
cursor: pointer;
margin-right: 5px;
}
.os_mode_img {
float: left;
margin-right: 0px;
}
.hidden {
display: none;
}
fieldset {
padding-top: 0px;
}
fieldset legend {
text-align: left;
}
.ui-autocomplete-input {
width: 120px;
}
.ball_addr_status {
float: left;
margin-right: 3px;
margin-top: 2px;
width: 8px;
}
.add_comments_button {
cursor: pointer;
}
.ipam_icon {
float: left;
display: inline;
text-align: center;
background: #fff;
position: relative;
}
.ipam_icon img {
display: block;
}
.address_os_icon {
position: absolute;
bottom: +12px;
right: 0px;
}
.address_os_icon img {
width: 16px;
}
.comment_icon {
position: absolute;
right: 0px;
}
.comment_icon img {
width: 16px;
}
.address_config_icon {
position: absolute;
bottom: -6px;
right: 0px;
}
.address_disabled_icon,
.address_os_icon {
position: absolute;
bottom: -5px;
left: 0px;
width: 18px;
}
.address_config_icon img {
width: 18px;
}
.address_disabled_icon {
position: absolute;
bottom: -6px;
left: 0px;
width: 18px;
}
.address_image {
cursor: pointer;
}
/* Big icons */
.ipam_icon_big {
margin: 10px;
padding: 5px 5px;
border-radius: 10px;
width: 90px;
}
.ipam_icon_big img {
margin: 8px auto;
margin-top: 8px;
}
/* Tiny icons */
.ipam_icon_tiny {
margin: 6px;
padding: 3px 3px;
border-radius: 7px;
width: 55px;
font-size: 6.5pt;
}
.ipam_icon_tiny img {
margin: 5px auto;
margin-top: 5px;
}
/* Un-reserved ip background */
.reserved {
background: #dbffff;
}
.unreserved {
background: #ffffff;
}
.unreserved_dhcp {
background: #ebebeb;
}
.container_network {
margin: 20px;
width: 100%;
display: flex;
justify-content: space-around;
}
.detailts_network {
width: 35%;
}
.statistics_network {
width: 50%;
}
.button_network {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
display: flex;
justify-content: flex-end;
}
.button_network input {
margin-right: 30px;
}
.vlan_statistics p {
margin-left: 10px;
font-style: italic;
}
.vlan_statistics div div {
width: 95%;
}
.container_button {
display: flex;
height: 200px;
justify-content: space-around;
align-items: center;
}
.container_button_int {
border: 1px solid #e1e2e1;
height: 150px;
width: 125px;
display: flex;
align-items: center;
text-align: center;
justify-content: center;
cursor: pointer;
}
.container_button_int:hover {
background: #e2e2e2;
}
.button_add_net {
width: 100px;
height: 100px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.button_add_net img {
vertical-align: middle;
}
.button_add_net span {
margin-top: 10px;
}

View File

@ -129,7 +129,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '7.0NG.751'; $version = '7.0NG.751';
$build = '210114'; $build = '210115';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -179,6 +179,8 @@ if ($searchAgents) {
$userGroups = users_get_groups($config['id_user'], 'AR', false); $userGroups = users_get_groups($config['id_user'], 'AR', false);
$id_userGroups = array_keys($userGroups); $id_userGroups = array_keys($userGroups);
$has_secondary = enterprise_hook('agents_is_using_secondary_groups');
$sql = "SELECT DISTINCT taddress_agent.id_agent FROM taddress $sql = "SELECT DISTINCT taddress_agent.id_agent FROM taddress
INNER JOIN taddress_agent ON INNER JOIN taddress_agent ON
taddress.id_a = taddress_agent.id_a taddress.id_a = taddress_agent.id_a
@ -188,10 +190,10 @@ if ($searchAgents) {
if ($id != '') { if ($id != '') {
$aux = $id[0]['id_agent']; $aux = $id[0]['id_agent'];
$search_sql = " t1.nombre COLLATE utf8_general_ci LIKE '%%cd ".$stringSearchSQL."%%' OR $search_sql = " t1.nombre COLLATE utf8_general_ci LIKE '%%cd ".$stringSearchSQL."%%' OR
t2.nombre COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR t2.nombre COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR
t1.alias COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR t1.alias COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR
t1.comentarios COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR t1.comentarios COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR
t1.id_agente = $aux"; t1.id_agente = $aux";
if (count($id) >= 2) { if (count($id) >= 2) {
for ($i = 1; $i < count($id); $i++) { for ($i = 1; $i < count($id); $i++) {
@ -201,10 +203,15 @@ if ($searchAgents) {
} }
} else { } else {
$search_sql = " t1.nombre COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR $search_sql = " t1.nombre COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR
t2.nombre COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR t2.nombre COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR
t1.direccion COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR t1.direccion COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR
t1.comentarios COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR t1.comentarios COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%' OR
t1.alias COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%'"; t1.alias COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%'";
}
if ($has_secondary === true) {
$search_sql .= " OR (tasg.id_group IS NOT NULL AND
tasg.id_group IN (SELECT id_grupo FROM tgrupo WHERE nombre COLLATE utf8_general_ci LIKE '%%".$stringSearchSQL."%%'))";
} }
$sql = " $sql = "
@ -235,7 +242,7 @@ if ($searchAgents) {
AND ( AND (
".$search_sql.' ".$search_sql.'
) )
'; ';
$select = 'SELECT DISTINCT(t1.id_agente), t1.ultimo_contacto, t1.nombre, t1.comentarios, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled, t1.alias, t1.quiet'; $select = 'SELECT DISTINCT(t1.id_agente), t1.ultimo_contacto, t1.nombre, t1.comentarios, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled, t1.alias, t1.quiet';
if ($only_count) { if ($only_count) {

View File

@ -67,7 +67,7 @@ $table->data[0][8] = html_print_image('images/chart_curve.png', true, ['title' =
$table->data[0][9] = "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalGraphs).'</a>'; $table->data[0][9] = "<a href='index.php?search_category=graphs&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalGraphs).'</a>';
$table->data[0][10] = html_print_image('images/reporting.png', true, ['title' => __('Reports found')]); $table->data[0][10] = html_print_image('images/reporting.png', true, ['title' => __('Reports found')]);
$table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>'; $table->data[0][11] = "<a href='index.php?search_category=reports&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalReports).'</a>';
$table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Maps found')]); $table->data[0][12] = html_print_image('images/visual_console_green.png', true, ['title' => __('Visual consoles')]);
$table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>'; $table->data[0][13] = "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".sprintf(__('%s Found'), $totalMaps).'</a>';
if (enterprise_installed()) { if (enterprise_installed()) {
$table->data[0][14] = html_print_image('images/policies.png', true, ['title' => __('Policies')]); $table->data[0][14] = html_print_image('images/policies.png', true, ['title' => __('Policies')]);

View File

@ -19,7 +19,7 @@ $maps = false;
$totalMaps = 0; $totalMaps = 0;
if ($searchMaps) { if ($searchMaps) {
$user_groups = users_get_groups($config['id_user'], 'AR', false); $user_groups = users_get_groups($config['id_user'], 'AR', true);
$id_user_groups = array_keys($user_groups); $id_user_groups = array_keys($user_groups);
$id_user_groups_str = implode(',', $id_user_groups); $id_user_groups_str = implode(',', $id_user_groups);

View File

@ -141,7 +141,7 @@ if ($searchMaps) {
'text' => "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image( 'text' => "<a href='index.php?search_category=maps&keywords=".$config['search_keywords']."&head_search_keywords=Search'>".html_print_image(
'images/visual_console.png', 'images/visual_console.png',
true, true,
['title' => __('Maps')] ['title' => __('Visual consoles')]
).'</a>', ).'</a>',
'active' => $searchTab == 'maps', 'active' => $searchTab == 'maps',
]; ];

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.751 %define version 7.0NG.751
%define release 210114 %define release 210115
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.751 %define version 7.0NG.751
%define release 210114 %define release 210115
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 7.0NG.751 %define version 7.0NG.751
%define release 210114 %define release 210115
%define httpd_name httpd %define httpd_name httpd
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name apache2 %define httpd_name apache2

View File

@ -3877,3 +3877,101 @@ CREATE TABLE `tnode_relations` (
`node_address` VARCHAR(60) NOT NULL, `node_address` VARCHAR(60) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tipam_network`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tipam_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`network` varchar(100) NOT NULL default '',
`name_network` varchar(255) default '',
`description` text NOT NULL,
`location` tinytext NOT NULL,
`id_recon_task` int(10) unsigned NOT NULL,
`scan_interval` tinyint(2) default 1,
`monitoring` tinyint(2) default 0,
`id_group` mediumint(8) unsigned NULL default 0,
`lightweight_mode` tinyint(2) default 0,
`users_operator` text,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_recon_task`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tipam_ip`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tipam_ip` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_network` bigint(20) unsigned NOT NULL default 0,
`id_agent` int(10) unsigned NOT NULL,
`forced_agent` tinyint(2) NOT NULL default '0',
`ip` varchar(100) NOT NULL default '',
`ip_dec` int(10) unsigned NOT NULL,
`id_os` int(10) unsigned NOT NULL,
`forced_os` tinyint(2) NOT NULL default '0',
`hostname` tinytext NOT NULL,
`forced_hostname` tinyint(2) NOT NULL default '0',
`comments` text NOT NULL,
`alive` tinyint(2) NOT NULL default '0',
`managed` tinyint(2) NOT NULL default '0',
`reserved` tinyint(2) NOT NULL default '0',
`time_last_check` datetime NOT NULL default '1970-01-01 00:00:00',
`time_create` datetime NOT NULL default '1970-01-01 00:00:00',
`users_operator` text,
`time_last_edit` datetime NOT NULL default '1970-01-01 00:00:00',
`enabled` tinyint(2) NOT NULL default '1',
`generate_events` tinyint(2) NOT NULL default '0',
`leased` tinyint(2) DEFAULT '0',
`leased_expiration` bigint(20) DEFAULT '0',
`mac_address` varchar(20) DEFAULT NULL,
`leased_mode` tinyint(2) DEFAULT '0',
PRIMARY KEY (`id`),
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tipam_vlan`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tipam_vlan` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`name` varchar(250) NOT NULL,
`description` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tipam_vlan_network`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tipam_vlan_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_vlan` bigint(20) unsigned NOT NULL,
`id_network` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_vlan`) REFERENCES tipam_vlan(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tipam_supernet`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tipam_supernet` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`name` varchar(250) NOT NULL,
`description` text default '',
`address` varchar(250) NOT NULL,
`mask` varchar(250) NOT NULL,
`subneting_mask` varchar(250) default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tipam_supernet_network`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tipam_supernet_network` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`id_supernet` bigint(20) unsigned NOT NULL,
`id_network` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_supernet`) REFERENCES tipam_supernet(`id`) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (`id_network`) REFERENCES tipam_network(`id`) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -1168,7 +1168,7 @@ INSERT INTO `treport_custom_sql` (`id`, `name`, `sql`) VALUES (4, 'Group&#x20;vi
-- trecon scripts -- trecon scripts
INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (1, 'Discovery.Application.VMware', 'Discovery&#x20;Application&#x20;script&#x20;to&#x20;monitor&#x20;VMware&#x20;technologies&#x20;&#40;ESXi,&#x20;VCenter,&#x20;VSphere&#41;', '/usr/share/pandora_server/util/recon_scripts/vmware-plugin.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}'); INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (1, 'Discovery.Application.VMware', 'Discovery&#x20;Application&#x20;script&#x20;to&#x20;monitor&#x20;VMware&#x20;technologies&#x20;&#40;ESXi,&#x20;VCenter,&#x20;VSphere&#41;', '/usr/share/pandora_server/util/recon_scripts/vmware-plugin.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}');
INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (2, 'Discovery.Cloud', 'Discovery&#x20;Cloud&#x20;script&#x20;to&#x20;monitor&#x20;Cloud&#x20;technologies&#x20;&#40;AWS.EC2,&#x20;AWS.S3,&#x20;AWS.RDS,&#x20RDS,&#x20AWS.EKS&#41;', '/usr/share/pandora_server/util/recon_scripts/pcm_client.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}'); INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (2, 'Discovery.Cloud', 'Discovery&#x20;Cloud&#x20;script&#x20;to&#x20;monitor&#x20;Cloud&#x20;technologies&#x20;&#40;AWS.EC2,&#x20;AWS.S3,&#x20;AWS.RDS,&#x20RDS,&#x20AWS.EKS&#41;', '/usr/share/pandora_server/util/recon_scripts/pcm_client.pl', '{"1":{"macro":"_field1_","desc":"Configuration&#x20;file","help":"","value":"","hide":""}}');
-- IPAM is 3. INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (3, 'IPAM Recon', 'This script is used to automatically detect network hosts availability and name, used as Recon Custom Script in the recon task. Parameters used are:\n\n* custom_field1 = network. i.e.: 192.168.100.0/24\n* custom_field2 = associated IPAM network id. i.e.: 4. Please do not change this value, it is assigned automatically in IPAM management.\n\nSee documentation for more information.', '/usr/share/pandora_server/util/recon_scripts/IPAMrecon.pl', '{"1":{"macro":"_field1_","desc":"Network","help":"i.e.:&#x20;192.168.100.0/24","value":"","hide":""}}');
INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (4, 'IPMI&#x20;Recon','Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident_flag&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0','/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}'); INSERT INTO `trecon_script` (`type`,`name`,`description`,`script`,`macros`) VALUES (4, 'IPMI&#x20;Recon','Specific&#x20;Pandora&#x20;FMS&#x20;Intel&#x20;DCM&#x20;Discovery&#x20;&#40;c&#41;&#x20;Artica&#x20;ST&#x20;2011&#x20;&lt;info@artica.es&gt;&#x0d;&#x0a;&#x0d;&#x0a;Usage:&#x20;./ipmi-recon.pl&#x20;&lt;task_id&gt;&#x20;&lt;group_id&gt;&#x20;&lt;create_incident_flag&gt;&#x20;&lt;custom_field1&gt;&#x20;&lt;custom_field2&gt;&#x20;&lt;custom_field3&gt;&#x20;&lt;custom_field4&gt;&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;Network&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;Username&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;Password&#x0d;&#x0a;*&#x20;custom_field4&#x20;=&#x20;Additional&#x20;parameters&#x20;i.e.:&#x20;-D&#x20;LAN_2_0','/usr/share/pandora_server/util/recon_scripts/ipmi-recon.pl','{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Network\",\"help\":\"i.e.:&#x20;192.168.100.0/24\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"1\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Additional&#x20;parameters\",\"help\":\"Optional&#x20;additional&#x20;parameters&#x20;such&#x20;as&#x20;-D&#x20;LAN_2_0&#x20;to&#x20;use&#x20;IPMI&#x20;ver&#x20;2.0&#x20;instead&#x20;of&#x20;1.5.&#x20;&#x20;These&#x20;options&#x20;will&#x20;also&#x20;be&#x20;passed&#x20;to&#x20;the&#x20;IPMI&#x20;plugin&#x20;when&#x20;the&#x20;current&#x20;values&#x20;are&#x20;read.\",\"value\":\"\",\"hide\":\"\"}}');
INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `plugin_type`, `macros`, `parameters`) VALUES (1,'IPMI&#x20;Plugin','Plugin&#x20;to&#x20;get&#x20;IPMI&#x20;monitors&#x20;from&#x20;a&#x20;IPMI&#x20;Device.',0,'/usr/share/pandora_server/util/plugin/ipmi-plugin.pl',0,'{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target&#x20;IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"true\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Sensor\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"5\":{\"macro\":\"_field5_\",\"desc\":\"Additional&#x20;Options\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','-h&#x20;_field1_&#x20;-u&#x20;_field2_&#x20;-p&#x20;_field3_&#x20;-s&#x20;_field4_&#x20;--&#x20;_field5_'); INSERT INTO `tplugin` (`id`, `name`, `description`, `max_timeout`, `execute`, `plugin_type`, `macros`, `parameters`) VALUES (1,'IPMI&#x20;Plugin','Plugin&#x20;to&#x20;get&#x20;IPMI&#x20;monitors&#x20;from&#x20;a&#x20;IPMI&#x20;Device.',0,'/usr/share/pandora_server/util/plugin/ipmi-plugin.pl',0,'{\"1\":{\"macro\":\"_field1_\",\"desc\":\"Target&#x20;IP\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"2\":{\"macro\":\"_field2_\",\"desc\":\"Username\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"3\":{\"macro\":\"_field3_\",\"desc\":\"Password\",\"help\":\"\",\"value\":\"\",\"hide\":\"true\"},\"4\":{\"macro\":\"_field4_\",\"desc\":\"Sensor\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"},\"5\":{\"macro\":\"_field5_\",\"desc\":\"Additional&#x20;Options\",\"help\":\"\",\"value\":\"\",\"hide\":\"\"}}','-h&#x20;_field1_&#x20;-u&#x20;_field2_&#x20;-p&#x20;_field3_&#x20;-s&#x20;_field4_&#x20;--&#x20;_field5_');

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 7.0NG.751-210114 Version: 7.0NG.751-210115
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
pandora_version="7.0NG.751-210114" pandora_version="7.0NG.751-210115"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.751"; my $pandora_version = "7.0NG.751";
my $pandora_build = "210114"; my $pandora_build = "210115";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only # version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.751"; my $pandora_version = "7.0NG.751";
my $pandora_build = "210114"; my $pandora_build = "210115";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.751 %define version 7.0NG.751
%define release 210114 %define release 210115
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 7.0NG.751 %define version 7.0NG.751
%define release 210114 %define release 210115
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -9,7 +9,7 @@
# ********************************************************************** # **********************************************************************
PI_VERSION="7.0NG.751" PI_VERSION="7.0NG.751"
PI_BUILD="210114" PI_BUILD="210115"
MODE=$1 MODE=$1
if [ $# -gt 1 ]; then if [ $# -gt 1 ]; then

View File

@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "7.0NG.751 PS210114"; my $version = "7.0NG.751 PS210115";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv; Encode::Locale::decode_argv;
# version: define current version # version: define current version
my $version = "7.0NG.751 PS210114"; my $version = "7.0NG.751 PS210115";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);