Merge remote-tracking branch 'origin/develop' into ent-8942-token-para-cambiar-comportamiento-de-la-busqueda-de-grupos-en-filtro-de-eventos
Conflicts: pandora_console/extras/mr/56.sql
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.763-220705
|
Version: 7.0NG.763-220719
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.763-220705"
|
pandora_version="7.0NG.763-220719"
|
||||||
|
|
||||||
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
|
||||||
|
@ -1015,7 +1015,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.763';
|
use constant AGENT_VERSION => '7.0NG.763';
|
||||||
use constant AGENT_BUILD => '220705';
|
use constant AGENT_BUILD => '220719';
|
||||||
|
|
||||||
# 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;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.763
|
%define version 7.0NG.763
|
||||||
%define release 220705
|
%define release 220719
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.763
|
%define version 7.0NG.763
|
||||||
%define release 220705
|
%define release 220719
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.763"
|
PI_VERSION="7.0NG.763"
|
||||||
PI_BUILD="220705"
|
PI_BUILD="220719"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{220705}
|
{220719}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -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.763 Build 220705")
|
#define PANDORA_VERSION ("7.0NG.763 Build 220719")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -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.763(Build 220705))"
|
VALUE "ProductVersion", "(7.0NG.763(Build 220719))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.763-220705
|
Version: 7.0NG.763-220719
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.763-220705"
|
pandora_version="7.0NG.763-220719"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -1,5 +1,43 @@
|
|||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `tuser_task` (
|
||||||
|
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
`function_name` VARCHAR(80) NOT NULL DEFAULT '',
|
||||||
|
`parameters` TEXT ,
|
||||||
|
`name` VARCHAR(60) NOT NULL DEFAULT '',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `tuser_task_scheduled` (
|
||||||
|
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
`id_usuario` VARCHAR(255) NOT NULL DEFAULT '0',
|
||||||
|
`id_user_task` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
|
`args` TEXT,
|
||||||
|
`scheduled` ENUM('no','hourly','daily','weekly','monthly','yearly','custom') DEFAULT 'no',
|
||||||
|
`last_run` INT UNSIGNED DEFAULT 0,
|
||||||
|
`custom_data` INT NULL DEFAULT 0,
|
||||||
|
`flag_delete` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
|
`id_grupo` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
|
`enabled` TINYINT UNSIGNED NOT NULL DEFAULT 1,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||||
|
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `type_execution` VARCHAR(100) NOT NULL DEFAULT 'start';
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `type_periodicity` VARCHAR(100) NOT NULL DEFAULT 'weekly';
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `monday` TINYINT DEFAULT 0;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `tuesday` TINYINT DEFAULT 0;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `wednesday` TINYINT DEFAULT 0;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `thursday` TINYINT DEFAULT 0;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `friday` TINYINT DEFAULT 0;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `saturday` TINYINT DEFAULT 0;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `sunday` TINYINT DEFAULT 0;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `periodically_day_from` INT UNSIGNED DEFAULT NULL;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `periodically_time_from` time NULL DEFAULT NULL;
|
||||||
|
ALTER TABLE `tautoconfig` ADD COLUMN `executed` TINYINT UNSIGNED NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
|
ALTER TABLE `tusuario` DROP COLUMN `metaconsole_assigned_server`;
|
||||||
|
|
||||||
ALTER TABLE `tevent_filter` ADD COLUMN `search_secondary_groups` INT NOT NULL DEFAULT 0;
|
ALTER TABLE `tevent_filter` ADD COLUMN `search_secondary_groups` INT NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
@ -526,7 +526,8 @@ $menu_godmode['links']['sub'] = $sub;
|
|||||||
|
|
||||||
// Warp Manager.
|
// Warp Manager.
|
||||||
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && (bool) $config['enable_update_manager'] === true) {
|
if ((bool) check_acl($config['id_user'], 0, 'PM') === true && (bool) $config['enable_update_manager'] === true) {
|
||||||
$menu_godmode['messages']['text'] = __('Warp Update');;
|
$menu_godmode['messages']['text'] = __('Warp Update');
|
||||||
|
;
|
||||||
$menu_godmode['messages']['id'] = 'god-um_messages';
|
$menu_godmode['messages']['id'] = 'god-um_messages';
|
||||||
$menu_godmode['messages']['sec2'] = '';
|
$menu_godmode['messages']['sec2'] = '';
|
||||||
|
|
||||||
|
@ -301,7 +301,6 @@ if ($new_user && $config['admin_can_add_user']) {
|
|||||||
|
|
||||||
if (enterprise_installed() && is_metaconsole() === true) {
|
if (enterprise_installed() && is_metaconsole() === true) {
|
||||||
$user_info['metaconsole_agents_manager'] = 0;
|
$user_info['metaconsole_agents_manager'] = 0;
|
||||||
$user_info['metaconsole_assigned_server'] = '';
|
|
||||||
$user_info['metaconsole_access_node'] = 0;
|
$user_info['metaconsole_access_node'] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,7 +374,6 @@ if ($create_user) {
|
|||||||
if (defined('METACONSOLE')) {
|
if (defined('METACONSOLE')) {
|
||||||
$values['metaconsole_access'] = get_parameter('metaconsole_access', 'basic');
|
$values['metaconsole_access'] = get_parameter('metaconsole_access', 'basic');
|
||||||
$values['metaconsole_agents_manager'] = ($user_is_admin == 1 ? 1 : get_parameter('metaconsole_agents_manager', '0'));
|
$values['metaconsole_agents_manager'] = ($user_is_admin == 1 ? 1 : get_parameter('metaconsole_agents_manager', '0'));
|
||||||
$values['metaconsole_assigned_server'] = get_parameter('metaconsole_assigned_server', '');
|
|
||||||
$values['metaconsole_access_node'] = ($user_is_admin == 1 ? 1 : get_parameter('metaconsole_access_node', '0'));
|
$values['metaconsole_access_node'] = ($user_is_admin == 1 ? 1 : get_parameter('metaconsole_access_node', '0'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -588,7 +586,6 @@ if ($update_user) {
|
|||||||
if (enterprise_installed() && defined('METACONSOLE')) {
|
if (enterprise_installed() && defined('METACONSOLE')) {
|
||||||
$values['metaconsole_access'] = get_parameter('metaconsole_access');
|
$values['metaconsole_access'] = get_parameter('metaconsole_access');
|
||||||
$values['metaconsole_agents_manager'] = get_parameter('metaconsole_agents_manager', '0');
|
$values['metaconsole_agents_manager'] = get_parameter('metaconsole_agents_manager', '0');
|
||||||
$values['metaconsole_assigned_server'] = get_parameter('metaconsole_assigned_server', '');
|
|
||||||
$values['metaconsole_access_node'] = get_parameter('metaconsole_access_node', '0');
|
$values['metaconsole_access_node'] = get_parameter('metaconsole_access_node', '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1357,15 +1354,6 @@ if ($meta) {
|
|||||||
true
|
true
|
||||||
).'</div>';
|
).'</div>';
|
||||||
|
|
||||||
$metaconsole_assigned_server = '<div class="label_select" id="metaconsole_assigned_server_div"><p class="edit_user_labels">'.__('Assigned node').ui_print_help_tip(__('Server where the agents created of this user will be placed'), true).'</p>';
|
|
||||||
$servers = metaconsole_get_servers();
|
|
||||||
$servers_for_select = [];
|
|
||||||
foreach ($servers as $server) {
|
|
||||||
$servers_for_select[$server['id']] = $server['server_name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$metaconsole_assigned_server .= html_print_select($servers_for_select, 'metaconsole_assigned_server', $user_info['metaconsole_assigned_server'], '', '', -1, true, false, false).'</div>';
|
|
||||||
|
|
||||||
$metaconsole_access_node = '<div class="label_select_simple" id="metaconsole_access_node_div"><p class="edit_user_labels">'.__('Enable node access').ui_print_help_tip(__('With this option enabled, the user will can access to nodes console'), true).'</p>';
|
$metaconsole_access_node = '<div class="label_select_simple" id="metaconsole_access_node_div"><p class="edit_user_labels">'.__('Enable node access').ui_print_help_tip(__('With this option enabled, the user will can access to nodes console'), true).'</p>';
|
||||||
$metaconsole_access_node .= html_print_checkbox(
|
$metaconsole_access_node .= html_print_checkbox(
|
||||||
'metaconsole_access_node',
|
'metaconsole_access_node',
|
||||||
@ -1416,7 +1404,7 @@ if (!is_metaconsole()) {
|
|||||||
<map name="timezone-map" id="timezone-map">'.$area_data_timezone_polys.$area_data_timezone_rects.'</map>
|
<map name="timezone-map" id="timezone-map">'.$area_data_timezone_polys.$area_data_timezone_rects.'</map>
|
||||||
</div>';
|
</div>';
|
||||||
} else {
|
} else {
|
||||||
echo $search_custom_fields_view.$metaconsole_agents_manager.$metaconsole_assigned_server.$metaconsole_access_node;
|
echo $search_custom_fields_view.$metaconsole_agents_manager.$metaconsole_access_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</div>
|
echo '</div>
|
||||||
@ -1535,16 +1523,16 @@ $(document).ready (function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('#checkbox-is_admin').change(function() {
|
$('#checkbox-is_admin').change(function() {
|
||||||
if($('#checkbox-is_admin').is(':checked') == true) {
|
if ($('#checkbox-is_admin').is(':checked') == true) {
|
||||||
$('#metaconsole_agents_manager_div').show();
|
|
||||||
$('#metaconsole_access_node_div').show();
|
|
||||||
if($('#checkbox-metaconsole_agents_manager').prop('checked')) {
|
|
||||||
$('#metaconsole_assigned_server_div').show();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$('#metaconsole_agents_manager_div').hide();
|
$('#metaconsole_agents_manager_div').hide();
|
||||||
$('#metaconsole_access_node_div').hide();
|
$('#metaconsole_access_node_div').hide();
|
||||||
$('#metaconsole_assigned_server_div').hide();
|
$('#metaconsole_assigned_server_div').hide();
|
||||||
|
} else {
|
||||||
|
$('#metaconsole_agents_manager_div').show();
|
||||||
|
$('#metaconsole_access_node_div').show();
|
||||||
|
if ($('#checkbox-metaconsole_agents_manager').prop('checked')) {
|
||||||
|
$('#metaconsole_assigned_server_div').show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
BIN
pandora_console/images/alarm-off.png
Normal file
After Width: | Height: | Size: 419 B |
BIN
pandora_console/images/gear.png
Normal file
After Width: | Height: | Size: 712 B |
BIN
pandora_console/images/no-alerts-discovered.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
pandora_console/images/play-white.png
Normal file
After Width: | Height: | Size: 232 B |
BIN
pandora_console/images/silence-alerts.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
pandora_console/images/sound_wave.png
Normal file
After Width: | Height: | Size: 463 B |
BIN
pandora_console/images/stop.png
Normal file
After Width: | Height: | Size: 284 B |
@ -55,6 +55,7 @@ if (! check_acl($config['id_user'], 0, 'ER')
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$drawConsoleSound = (bool) get_parameter('drawConsoleSound', false);
|
||||||
$process_buffers = (bool) get_parameter('process_buffers', false);
|
$process_buffers = (bool) get_parameter('process_buffers', false);
|
||||||
$get_extended_event = (bool) get_parameter('get_extended_event');
|
$get_extended_event = (bool) get_parameter('get_extended_event');
|
||||||
$change_status = (bool) get_parameter('change_status');
|
$change_status = (bool) get_parameter('change_status');
|
||||||
@ -2232,6 +2233,228 @@ if ($process_buffers === true) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($drawConsoleSound === true) {
|
||||||
|
echo ui_require_css_file('wizard', 'include/styles/', true);
|
||||||
|
echo ui_require_css_file('discovery', 'include/styles/', true);
|
||||||
|
echo ui_require_css_file('sound_events', 'include/styles/', true);
|
||||||
|
$output = '<div id="tabs-sound-modal">';
|
||||||
|
// Header tabs.
|
||||||
|
$output .= '<ul class="tabs-sound-modal-options">';
|
||||||
|
$output .= '<li>';
|
||||||
|
$output .= '<a href="#tabs-sound-modal-1">';
|
||||||
|
$output .= html_print_image(
|
||||||
|
'images/gear.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Options'),
|
||||||
|
'class' => 'invert_filter',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$output .= '</a>';
|
||||||
|
$output .= '</li>';
|
||||||
|
$output .= '<li>';
|
||||||
|
$output .= '<a href="#tabs-sound-modal-2">';
|
||||||
|
$output .= html_print_image(
|
||||||
|
'images/list.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('Events list'),
|
||||||
|
'class' => 'invert_filter',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$output .= '</a>';
|
||||||
|
$output .= '</li>';
|
||||||
|
$output .= '</ul>';
|
||||||
|
|
||||||
|
// Content tabs.
|
||||||
|
$output .= '<div id="tabs-sound-modal-1">';
|
||||||
|
$output .= '<h3 class="console-configuration">';
|
||||||
|
$output .= __('Console configuration');
|
||||||
|
$output .= '</h3>';
|
||||||
|
$inputs = [];
|
||||||
|
|
||||||
|
// Load filter.
|
||||||
|
$fields = \events_get_event_filter_select();
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => \__('Set condition'),
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $fields,
|
||||||
|
'name' => 'filter_id',
|
||||||
|
'selected' => 0,
|
||||||
|
'return' => true,
|
||||||
|
'nothing' => \__('All new events'),
|
||||||
|
'nothing_value' => 0,
|
||||||
|
'class' => 'fullwidth',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$times_interval = [
|
||||||
|
10 => '10 '.__('seconds'),
|
||||||
|
15 => '15 '.__('seconds'),
|
||||||
|
30 => '30 '.__('seconds'),
|
||||||
|
60 => '60 '.__('seconds'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$times_sound = [
|
||||||
|
2 => '2 '.__('seconds'),
|
||||||
|
5 => '5 '.__('seconds'),
|
||||||
|
10 => '10 '.__('seconds'),
|
||||||
|
15 => '15 '.__('seconds'),
|
||||||
|
30 => '30 '.__('seconds'),
|
||||||
|
60 => '60 '.__('seconds'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'class' => 'interval-sounds',
|
||||||
|
'direct' => 1,
|
||||||
|
'block_content' => [
|
||||||
|
[
|
||||||
|
'label' => __('Interval'),
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $times_interval,
|
||||||
|
'name' => 'interval',
|
||||||
|
'selected' => 10,
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'label' => __('Time Sound'),
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $times_sound,
|
||||||
|
'name' => 'time_sound',
|
||||||
|
'selected' => 10,
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$sounds = [
|
||||||
|
'aircraftalarm.wav' => 'Air craft alarm',
|
||||||
|
'air_shock_alarm.wav' => 'Air shock alarm',
|
||||||
|
'alien_alarm.wav' => 'Alien alarm',
|
||||||
|
'alien_beacon.wav' => 'Alien beacon',
|
||||||
|
'bell_school_ringing.wav' => 'Bell school ringing',
|
||||||
|
'Door_Alarm.wav' => 'Door alarm',
|
||||||
|
'EAS_beep.wav' => 'EAS beep',
|
||||||
|
'Firewarner.wav' => 'Fire warner',
|
||||||
|
'HardPCMAlarm.wav' => 'Hard PCM Alarm',
|
||||||
|
'negativebeep.wav' => 'Negative beep',
|
||||||
|
'Star_Trek_emergency_simulation.wav' => 'StarTrek emergency simulation',
|
||||||
|
];
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'class' => 'test-sounds',
|
||||||
|
'direct' => 1,
|
||||||
|
'block_content' => [
|
||||||
|
[
|
||||||
|
'label' => \__('Sound melody'),
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $sounds,
|
||||||
|
'name' => 'sound_id',
|
||||||
|
'selected' => 'Star_Trek_emergency_simulation.wav',
|
||||||
|
'return' => true,
|
||||||
|
'class' => 'fullwidth',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'arguments' => [
|
||||||
|
'type' => 'button',
|
||||||
|
'name' => 'melody_sound',
|
||||||
|
'label' => __('Test sound'),
|
||||||
|
'attributes' => 'class="sub upd"',
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// Print form.
|
||||||
|
$output .= HTML::printForm(
|
||||||
|
[
|
||||||
|
'form' => [
|
||||||
|
'action' => '',
|
||||||
|
'method' => 'POST',
|
||||||
|
],
|
||||||
|
'inputs' => $inputs,
|
||||||
|
],
|
||||||
|
true,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
$output .= '<div id="tabs-sound-modal-2">';
|
||||||
|
$output .= '<h3 class="title-discovered-alerts">';
|
||||||
|
$output .= __('Discovered alerts');
|
||||||
|
$output .= '</h3>';
|
||||||
|
$output .= '<div class="empty-discovered-alerts">';
|
||||||
|
$output .= html_print_image(
|
||||||
|
'images/no-alerts-discovered.png',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'title' => __('No alerts discovered'),
|
||||||
|
'class' => 'invert_filter',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$output .= '<span class="text-discovered-alerts">';
|
||||||
|
$output .= __('Congrats! there’s nothing to show');
|
||||||
|
$output .= '</span>';
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '<div class="elements-discovered-alerts"><ul></ul></div>';
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
$output .= '<div class="actions-sound-modal">';
|
||||||
|
$output .= '<div id="progressbar_time"></div>';
|
||||||
|
$output .= '<div class="buttons-sound-modal">';
|
||||||
|
$output .= '<div class="container-button-play">';
|
||||||
|
$output .= html_print_input(
|
||||||
|
[
|
||||||
|
'label' => __('Start'),
|
||||||
|
'type' => 'button',
|
||||||
|
'name' => 'start-search',
|
||||||
|
'attributes' => 'class="sub play"',
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
'div',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '<div class="container-button-alert">';
|
||||||
|
$output .= html_print_input(
|
||||||
|
[
|
||||||
|
'type' => 'button',
|
||||||
|
'name' => 'no-alerts',
|
||||||
|
'label' => __('No alerts'),
|
||||||
|
'attributes' => 'class="sub alerts"',
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
'div',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
$output .= html_print_input(
|
||||||
|
[
|
||||||
|
'type' => 'hidden',
|
||||||
|
'name' => 'mode_alert',
|
||||||
|
'value' => 0,
|
||||||
|
'return' => true,
|
||||||
|
],
|
||||||
|
'div',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '</div>';
|
||||||
|
|
||||||
|
echo $output;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ($get_events_fired) {
|
if ($get_events_fired) {
|
||||||
global $config;
|
global $config;
|
||||||
$filter_id = (int) get_parameter('filter_id', 0);
|
$filter_id = (int) get_parameter('filter_id', 0);
|
||||||
|
@ -2483,14 +2483,12 @@ class ConsoleSupervisor
|
|||||||
SERVER_TYPE_ENTERPRISE_SATELLITE
|
SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$missed = 0;
|
$missed = 0;
|
||||||
|
|
||||||
if (is_array($server_version_list) === true) {
|
if (is_array($server_version_list) === true) {
|
||||||
foreach ($server_version_list as $server) {
|
foreach ($server_version_list as $server) {
|
||||||
if (strpos(
|
if (strpos(
|
||||||
$server['version'],
|
$server['version'],
|
||||||
(string) floor($config['current_package'])
|
(string) floor((int) $config['current_package'])
|
||||||
) === false
|
) === false
|
||||||
) {
|
) {
|
||||||
$missed++;
|
$missed++;
|
||||||
|
@ -252,6 +252,7 @@ class TreeService extends Tree
|
|||||||
protected function getProcessedServices()
|
protected function getProcessedServices()
|
||||||
{
|
{
|
||||||
$is_favourite = $this->getServiceFavouriteFilter();
|
$is_favourite = $this->getServiceFavouriteFilter();
|
||||||
|
$service_search = $this->getServiceNameSearchFilter();
|
||||||
|
|
||||||
if (users_can_manage_group_all('AR')) {
|
if (users_can_manage_group_all('AR')) {
|
||||||
$groups_acl = '';
|
$groups_acl = '';
|
||||||
@ -259,6 +260,16 @@ class TreeService extends Tree
|
|||||||
$groups_acl = 'AND ts.id_group IN ('.implode(',', $this->userGroupsArray).')';
|
$groups_acl = 'AND ts.id_group IN ('.implode(',', $this->userGroupsArray).')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$exclude_children = 'ts.id NOT IN (
|
||||||
|
SELECT DISTINCT id_service_child
|
||||||
|
FROM tservice_element
|
||||||
|
WHERE id_server_meta = 0
|
||||||
|
)';
|
||||||
|
|
||||||
|
if ($service_search !== '') {
|
||||||
|
$exclude_children = '1=1';
|
||||||
|
}
|
||||||
|
|
||||||
$sql = sprintf(
|
$sql = sprintf(
|
||||||
'SELECT
|
'SELECT
|
||||||
ts.id,
|
ts.id,
|
||||||
@ -277,15 +288,14 @@ class TreeService extends Tree
|
|||||||
FROM tservice ts
|
FROM tservice ts
|
||||||
LEFT JOIN tservice_element tse
|
LEFT JOIN tservice_element tse
|
||||||
ON tse.id_service = ts.id
|
ON tse.id_service = ts.id
|
||||||
WHERE ts.id NOT IN (
|
WHERE %s
|
||||||
SELECT DISTINCT id_service_child
|
%s
|
||||||
FROM tservice_element
|
|
||||||
WHERE id_server_meta = 0
|
|
||||||
)
|
|
||||||
%s
|
%s
|
||||||
%s
|
%s
|
||||||
GROUP BY ts.id',
|
GROUP BY ts.id',
|
||||||
|
$exclude_children,
|
||||||
$is_favourite,
|
$is_favourite,
|
||||||
|
$service_search,
|
||||||
$groups_acl
|
$groups_acl
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -722,6 +732,23 @@ class TreeService extends Tree
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve SQL filter for current filter
|
||||||
|
*
|
||||||
|
* @return string SQL filter.
|
||||||
|
*/
|
||||||
|
protected function getServiceNameSearchFilter()
|
||||||
|
{
|
||||||
|
if (isset($this->filter['searchService']) === true
|
||||||
|
&& empty($this->filter['searchService']) === false
|
||||||
|
) {
|
||||||
|
return " AND (ts.name LIKE '%".$this->filter['searchService']."%' OR ts.description LIKE '%".$this->filter['searchService']."%')";
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overwrites partial functionality of general Tree.class.
|
* Overwrites partial functionality of general Tree.class.
|
||||||
*
|
*
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC220705';
|
$build_version = 'PC220719';
|
||||||
$pandora_version = 'v7.0NG.763';
|
$pandora_version = 'v7.0NG.763';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -2263,7 +2263,14 @@ function check_login($output=true)
|
|||||||
|| (isset($_SESSION['merge-request-user-trick']) === true
|
|| (isset($_SESSION['merge-request-user-trick']) === true
|
||||||
&& $_SESSION['merge-request-user-trick'] === $_SESSION['id_usuario'])
|
&& $_SESSION['merge-request-user-trick'] === $_SESSION['id_usuario'])
|
||||||
) {
|
) {
|
||||||
$config['id_user'] = $_SESSION['id_usuario'];
|
if (isset($config['auth']) === true && $config['auth'] === 'ad' && is_user($_SESSION['id_usuario'])) {
|
||||||
|
// User name in active directory is case insensitive.
|
||||||
|
// Get the user name from database.
|
||||||
|
$user_info = get_user_info($_SESSION['id_usuario']);
|
||||||
|
$config['id_user'] = $user_info['id_user'];
|
||||||
|
} else {
|
||||||
|
$config['id_user'] = $_SESSION['id_usuario'];
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -4294,3 +4294,140 @@ function agents_get_offspring(int $id_agent)
|
|||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function agents_get_starmap(int $id_agent, float $width=0, float $height=0)
|
||||||
|
{
|
||||||
|
ui_require_css_file('heatmap');
|
||||||
|
|
||||||
|
$all_modules = agents_get_modules($id_agent);
|
||||||
|
if (empty($all_modules)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$total_modules = count($all_modules);
|
||||||
|
|
||||||
|
// Best square.
|
||||||
|
$high = (float) max($width, $height);
|
||||||
|
$low = 0.0;
|
||||||
|
|
||||||
|
while (abs($high - $low) > 0.000001) {
|
||||||
|
$mid = (($high + $low) / 2.0);
|
||||||
|
$midval = (floor($width / $mid) * floor($height / $mid));
|
||||||
|
if ($midval >= $total_modules) {
|
||||||
|
$low = $mid;
|
||||||
|
} else {
|
||||||
|
$high = $mid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$square_length = min(($width / floor($width / $low)), ($height / floor($height / $low)));
|
||||||
|
|
||||||
|
// Print starmap.
|
||||||
|
$html = sprintf(
|
||||||
|
'<svg id="svg_%s" style="width: %spx; height: %spx;">',
|
||||||
|
$id_agent,
|
||||||
|
$width,
|
||||||
|
$height
|
||||||
|
);
|
||||||
|
|
||||||
|
$html .= '<g>';
|
||||||
|
$row = 0;
|
||||||
|
$column = 0;
|
||||||
|
$x = 0;
|
||||||
|
$y = 0;
|
||||||
|
$cont = 1;
|
||||||
|
foreach ($all_modules as $key => $value) {
|
||||||
|
// Colour by status.
|
||||||
|
$status = modules_get_agentmodule_status($key);
|
||||||
|
switch ($status) {
|
||||||
|
case 0:
|
||||||
|
case 4:
|
||||||
|
case 300:
|
||||||
|
$status = 'normal';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
case 100:
|
||||||
|
$status = 'critical';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
case 200:
|
||||||
|
$status = 'warning';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
$status = 'unknown';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
$status = 'notinit';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$html .= sprintf(
|
||||||
|
'<rect id="%s" x="%s" y="%s" row="%s" col="%s" width="%s" height="%s" class="%s_%s"></rect>',
|
||||||
|
'rect_'.$cont,
|
||||||
|
$x,
|
||||||
|
$y,
|
||||||
|
$row,
|
||||||
|
$column,
|
||||||
|
$square_length,
|
||||||
|
$square_length,
|
||||||
|
$status,
|
||||||
|
random_int(1, 10)
|
||||||
|
);
|
||||||
|
|
||||||
|
$y += $square_length;
|
||||||
|
$row++;
|
||||||
|
if ((int) ($y + $square_length) > (int) $height) {
|
||||||
|
$y = 0;
|
||||||
|
$x += $square_length;
|
||||||
|
$row = 0;
|
||||||
|
$column++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((int) ($x + $square_length) > (int) $width) {
|
||||||
|
$x = 0;
|
||||||
|
$y += $square_length;
|
||||||
|
$column = 0;
|
||||||
|
$row++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$cont++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
const total_modules = '<?php echo $total_modules; ?>';
|
||||||
|
|
||||||
|
function getRandomInteger(min, max) {
|
||||||
|
return Math.floor(Math.random() * max) + min;
|
||||||
|
}
|
||||||
|
|
||||||
|
function oneSquare(solid, time) {
|
||||||
|
var randomPoint = getRandomInteger(1, total_modules);
|
||||||
|
let target = $(`#rect_${randomPoint}`);
|
||||||
|
let class_name = target.attr('class');
|
||||||
|
class_name = class_name.split('_')[0];
|
||||||
|
setTimeout(function() {
|
||||||
|
target.removeClass();
|
||||||
|
target.addClass(`${class_name}_${solid}`);
|
||||||
|
oneSquare(getRandomInteger(1, 10), getRandomInteger(100, 900));
|
||||||
|
}, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
let cont = 0;
|
||||||
|
while (cont < Math.ceil(total_modules / 3)) {
|
||||||
|
oneSquare(getRandomInteger(1, 10), getRandomInteger(100, 900));
|
||||||
|
cont ++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
$html .= '</g>';
|
||||||
|
$html .= '</svg>';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
@ -1455,16 +1455,19 @@ function events_get_all(
|
|||||||
$group_selects = '';
|
$group_selects = '';
|
||||||
if ($group_by != '') {
|
if ($group_by != '') {
|
||||||
if ($count === false) {
|
if ($count === false) {
|
||||||
$group_selects = ',COUNT(id_evento) AS event_rep,
|
|
||||||
GROUP_CONCAT(DISTINCT user_comment SEPARATOR "<br>") AS comments,
|
|
||||||
MAX(utimestamp) as timestamp_last,
|
|
||||||
MIN(utimestamp) as timestamp_first,
|
|
||||||
MAX(id_evento) as max_id_evento';
|
|
||||||
|
|
||||||
$idx = array_search('te.user_comment', $fields);
|
$idx = array_search('te.user_comment', $fields);
|
||||||
if ($idx !== false) {
|
if ($idx !== false) {
|
||||||
unset($fields[$idx]);
|
unset($fields[$idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$group_selects = sprintf(
|
||||||
|
',COUNT(id_evento) AS event_rep,
|
||||||
|
%s
|
||||||
|
MAX(utimestamp) as timestamp_last,
|
||||||
|
MIN(utimestamp) as timestamp_first,
|
||||||
|
MAX(id_evento) as max_id_evento',
|
||||||
|
($idx !== false) ? 'GROUP_CONCAT(DISTINCT user_comment SEPARATOR "<br>") AS comments,' : ''
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$idx = array_search('te.user_comment', $fields);
|
$idx = array_search('te.user_comment', $fields);
|
||||||
|
@ -2558,7 +2558,8 @@ function combined_graph_summatory_average(
|
|||||||
function graphic_agentaccess(
|
function graphic_agentaccess(
|
||||||
int $id_agent,
|
int $id_agent,
|
||||||
int $period=0,
|
int $period=0,
|
||||||
?bool $return=false
|
?bool $return=false,
|
||||||
|
?bool $agent_view=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -2599,6 +2600,10 @@ function graphic_agentaccess(
|
|||||||
$options = [];
|
$options = [];
|
||||||
$options['grid']['hoverable'] = true;
|
$options['grid']['hoverable'] = true;
|
||||||
|
|
||||||
|
if ($agent_view === true) {
|
||||||
|
$options['agent_view'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
if ($return === true) {
|
if ($return === true) {
|
||||||
return vbar_graph($data_array, $options, 1);
|
return vbar_graph($data_array, $options, 1);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1013,13 +1013,17 @@ function html_print_select(
|
|||||||
if(count_shift_'.$id.' == 2 ){
|
if(count_shift_'.$id.' == 2 ){
|
||||||
if(shift_array_'.$id.'[0] <= shift_array_'.$id.'[1]) {
|
if(shift_array_'.$id.'[0] <= shift_array_'.$id.'[1]) {
|
||||||
for (var i = shift_array_'.$id.'[0]; i <= shift_array_'.$id.'[1]; i++) {
|
for (var i = shift_array_'.$id.'[0]; i <= shift_array_'.$id.'[1]; i++) {
|
||||||
var option_value = $("#'.$id.' option").eq(i).val();
|
if ($("#'.$id.' option").eq(i).text().includes($(".select2-search__field").val()) == true) {
|
||||||
options_selecteds_'.$id.'.push(option_value);
|
var option_value = $("#'.$id.' option").eq(i).val();
|
||||||
|
options_selecteds_'.$id.'.push(option_value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (var i = shift_array_'.$id.'[0]; i >= shift_array_'.$id.'[1]; i--) {
|
for (var i = shift_array_'.$id.'[0]; i >= shift_array_'.$id.'[1]; i--) {
|
||||||
var option_value = $("#'.$id.' option").eq(i).val();
|
if ($("#'.$id.' option").eq(i).text().includes($(".select2-search__field").val()) == true) {
|
||||||
options_selecteds_'.$id.'.push(option_value);
|
var option_value = $("#'.$id.' option").eq(i).val();
|
||||||
|
options_selecteds_'.$id.'.push(option_value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6134,3 +6138,36 @@ function html_print_select_agent_secondary($agent, $id_agente, $options=[])
|
|||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints a simple 'Go Back' button.
|
||||||
|
*
|
||||||
|
* @param string $url Destination Url.
|
||||||
|
* @param array $options Options.
|
||||||
|
* `button_class`: Class for button. 'w100p' by default.
|
||||||
|
* `title`: Title of the button. 'Go Back' by default.
|
||||||
|
* `action_class`: Class of icon of button. 'cancel' by default.
|
||||||
|
* @param boolean $return If true, return a formed HTML element.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
function html_print_go_back_button(string $url, array $options=[], bool $return=false)
|
||||||
|
{
|
||||||
|
$output = html_print_div(
|
||||||
|
[
|
||||||
|
'class' => ($options['button_class'] ?? 'w100p'),
|
||||||
|
'content' => html_print_button(
|
||||||
|
($options['title'] ?? __('Go back')),
|
||||||
|
'go_back',
|
||||||
|
false,
|
||||||
|
'window.location.href = \''.$url.'\'',
|
||||||
|
'class="sub '.($options['action_class'] ?? ' cancel').' right"',
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
|
$return
|
||||||
|
);
|
||||||
|
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
@ -11121,7 +11121,7 @@ function reporting_get_group_stats($id_group=0, $access='AR', $recursion=true)
|
|||||||
*
|
*
|
||||||
* @return array Group statistics
|
* @return array Group statistics
|
||||||
*/
|
*/
|
||||||
function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_permissions=false)
|
function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_permissions=false, $recursive=false)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -11165,6 +11165,8 @@ function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_per
|
|||||||
$id_group = array_keys(
|
$id_group = array_keys(
|
||||||
users_get_groups($config['id_user'], $access, false)
|
users_get_groups($config['id_user'], $access, false)
|
||||||
);
|
);
|
||||||
|
} else if ($recursive === true) {
|
||||||
|
$id_group = groups_get_children_ids($id_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
@ -11295,7 +11297,7 @@ function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_per
|
|||||||
$group_stat = db_get_all_rows_sql($sql);
|
$group_stat = db_get_all_rows_sql($sql);
|
||||||
$data = [
|
$data = [
|
||||||
'monitor_checks' => (int) $group_stat[0]['modules'],
|
'monitor_checks' => (int) $group_stat[0]['modules'],
|
||||||
'monitor_alerts' => (int) groups_monitor_alerts($group_array),
|
'monitor_alerts' => (int) groups_monitor_alerts($group_stat[0]['id_group']),
|
||||||
'monitor_alerts_fired' => (int) $group_stat[0]['alerts_fired'],
|
'monitor_alerts_fired' => (int) $group_stat[0]['alerts_fired'],
|
||||||
'monitor_alerts_fire_count' => (int) $group_stat[0]['alerts_fired'],
|
'monitor_alerts_fire_count' => (int) $group_stat[0]['alerts_fired'],
|
||||||
'monitor_ok' => (int) $group_stat[0]['normal'],
|
'monitor_ok' => (int) $group_stat[0]['normal'],
|
||||||
@ -11309,10 +11311,33 @@ function reporting_get_group_stats_resume($id_group=0, $access='AR', $ignore_per
|
|||||||
'agent_warning' => (int) $group_stat[0]['agents_warnings'],
|
'agent_warning' => (int) $group_stat[0]['agents_warnings'],
|
||||||
'agent_critical' => (int) $group_stat[0]['agents_critical'],
|
'agent_critical' => (int) $group_stat[0]['agents_critical'],
|
||||||
'total_checks' => (int) $group_stat[0]['modules'],
|
'total_checks' => (int) $group_stat[0]['modules'],
|
||||||
'total_alerts' => (int) groups_monitor_alerts($group_array),
|
'total_alerts' => (int) groups_monitor_alerts($group_stat[0]['id_group']),
|
||||||
'total_agents' => (int) $group_stat[0]['agents'],
|
'total_agents' => (int) $group_stat[0]['agents'],
|
||||||
'utimestamp' => (int) $group_stat[0]['utimestamp'],
|
'utimestamp' => (int) $group_stat[0]['utimestamp'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($recursive === true) {
|
||||||
|
unset($group_stat[0]);
|
||||||
|
foreach ($group_stat as $value) {
|
||||||
|
$data['monitor_checks'] = ($data['monitor_checks'] + $value['modules']);
|
||||||
|
$data['monitor_alerts'] = ($data['monitor_alerts'] + groups_monitor_alerts($value['id_group']));
|
||||||
|
$data['monitor_alerts_fired'] = ($data['monitor_alerts_fired'] + $value['alerts_fired']);
|
||||||
|
$data['monitor_alerts_fire_count'] = ($data['monitor_alerts_fire_count'] + $value['alerts_fired']);
|
||||||
|
$data['monitor_ok'] = ($data['monitor_ok'] + $value['normal']);
|
||||||
|
$data['monitor_warning'] = ($data['monitor_warning'] + $value['warning']);
|
||||||
|
$data['monitor_critical'] = ($data['monitor_critical'] + $value['critical']);
|
||||||
|
$data['monitor_unknown'] = ($data['monitor_unknown'] + $value['unknown']);
|
||||||
|
$data['monitor_not_init'] = ($data['monitor_not_init'] + $value['non-init']);
|
||||||
|
$data['agent_not_init'] = ($data['agent_not_init'] + $value['agents_not_init']);
|
||||||
|
$data['agent_unknown'] = ($data['agent_unknown'] + $value['agents_unknown']);
|
||||||
|
$data['agent_ok'] = ($data['agent_ok'] + $value['agents_normal']);
|
||||||
|
$data['agent_warning'] = ($data['agent_warning'] + $value['agents_warnings']);
|
||||||
|
$data['agent_critical'] = ($data['agent_critical'] + $value['agents_critical']);
|
||||||
|
$data['total_checks'] = ($data['total_checks'] + $value['modules']);
|
||||||
|
$data['total_alerts'] = ($data['total_alerts'] + groups_monitor_alerts($value['id_group']));
|
||||||
|
$data['total_agents'] = ($data['total_agents'] + $value['agents']);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3416,7 +3416,17 @@ function ui_print_datatable(array $parameters)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Languages.
|
// Languages.
|
||||||
$processing = __('Processing');
|
$processing = '<div class=\'processing-datatables-inside\'>';
|
||||||
|
$processing .= '<i>'.__('Processing').'</i> ';
|
||||||
|
$processing .= str_replace(
|
||||||
|
'"',
|
||||||
|
"'",
|
||||||
|
html_print_image(
|
||||||
|
'images/spinner.gif',
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$processing .= '</div>';
|
||||||
|
|
||||||
// Extra html.
|
// Extra html.
|
||||||
$extra = '';
|
$extra = '';
|
||||||
@ -3524,6 +3534,10 @@ function ui_print_datatable(array $parameters)
|
|||||||
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
|
url: "'.ui_get_full_url('ajax.php', false, false, false).'",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
dataSrc: function (json) {
|
dataSrc: function (json) {
|
||||||
|
if($("#'.$form_id.'_search_bt") != undefined) {
|
||||||
|
$("#'.$form_id.'_loading").remove();
|
||||||
|
}
|
||||||
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.error(json.error);
|
console.error(json.error);
|
||||||
$("#error-'.$table_id.'").html(json.error);
|
$("#error-'.$table_id.'").html(json.error);
|
||||||
@ -3570,6 +3584,18 @@ function ui_print_datatable(array $parameters)
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: function (data) {
|
data: function (data) {
|
||||||
|
if($("#'.$form_id.'_search_bt") != undefined) {
|
||||||
|
var loading = \''.html_print_image(
|
||||||
|
'images/spinner.gif',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'id' => $form_id.'_loading',
|
||||||
|
'class' => 'loading-search-datatables-button',
|
||||||
|
]
|
||||||
|
).'\';
|
||||||
|
$("#'.$form_id.'_search_bt").parent().append(loading);
|
||||||
|
}
|
||||||
|
|
||||||
inputs = $("#'.$form_id.' :input");
|
inputs = $("#'.$form_id.' :input");
|
||||||
|
|
||||||
values = {};
|
values = {};
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
global $pandora_version;
|
||||||
|
global $build_version;
|
||||||
|
|
||||||
require_once __DIR__.'/config.php';
|
require_once __DIR__.'/config.php';
|
||||||
|
@ -494,7 +494,7 @@ function vbar_graph(
|
|||||||
'weight' => $options['x']['font']['weight'],
|
'weight' => $options['x']['font']['weight'],
|
||||||
'family' => $options['x']['font']['family'],
|
'family' => $options['x']['font']['family'],
|
||||||
'variant' => $options['x']['font']['variant'],
|
'variant' => $options['x']['font']['variant'],
|
||||||
'color' => $options['x']['font']['color'],
|
'color' => ($options['agent_view'] === true) ? 'black' : $options['x']['font']['color'],
|
||||||
],
|
],
|
||||||
'show' => $options['x']['show'],
|
'show' => $options['x']['show'],
|
||||||
'position' => $options['x']['position'],
|
'position' => $options['x']['position'],
|
||||||
@ -516,7 +516,7 @@ function vbar_graph(
|
|||||||
'weight' => $options['y']['font']['weight'],
|
'weight' => $options['y']['font']['weight'],
|
||||||
'family' => $options['y']['font']['family'],
|
'family' => $options['y']['font']['family'],
|
||||||
'variant' => $options['y']['font']['variant'],
|
'variant' => $options['y']['font']['variant'],
|
||||||
'color' => $options['y']['font']['color'],
|
'color' => ($options['agent_view'] === true) ? 'black' : $options['y']['font']['color'],
|
||||||
],
|
],
|
||||||
'show' => $options['y']['show'],
|
'show' => $options['y']['show'],
|
||||||
'position' => $options['y']['position'],
|
'position' => $options['y']['position'],
|
||||||
@ -534,8 +534,8 @@ function vbar_graph(
|
|||||||
'aboveData' => $options['grid']['aboveData'],
|
'aboveData' => $options['grid']['aboveData'],
|
||||||
'color' => $options['grid']['color'],
|
'color' => $options['grid']['color'],
|
||||||
'backgroundColor' => $options['grid']['backgroundColor'],
|
'backgroundColor' => $options['grid']['backgroundColor'],
|
||||||
'margin' => $options['grid']['margin'],
|
'margin' => ($options['agent_view'] === true) ? 6 : $options['grid']['margin'],
|
||||||
'labelMargin' => $options['grid']['labelMargin'],
|
'labelMargin' => ($options['agent_view'] === true) ? 12 : $options['grid']['labelMargin'],
|
||||||
'axisMargin' => $options['grid']['axisMargin'],
|
'axisMargin' => $options['grid']['axisMargin'],
|
||||||
'markings' => $options['grid']['markings'],
|
'markings' => $options['grid']['markings'],
|
||||||
'borderWidth' => $options['grid']['borderWidth'],
|
'borderWidth' => $options['grid']['borderWidth'],
|
||||||
@ -561,6 +561,10 @@ function vbar_graph(
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($options['agent_view'] === true) {
|
||||||
|
$params['agent_view'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($params['data']) === true) {
|
if (empty($params['data']) === true) {
|
||||||
return graph_nodata_image(
|
return graph_nodata_image(
|
||||||
0,
|
0,
|
||||||
|
@ -670,6 +670,10 @@ function flot_vcolumn_chart(array $options)
|
|||||||
$style .= 'height:'.$options['generals']['pdf']['height'].'px;';
|
$style .= 'height:'.$options['generals']['pdf']['height'].'px;';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($options['agent_view'] === true) {
|
||||||
|
$style = 'width: 95%; height: 85px';
|
||||||
|
}
|
||||||
|
|
||||||
$class = '';
|
$class = '';
|
||||||
if ($options['generals']['rotate'] === true) {
|
if ($options['generals']['rotate'] === true) {
|
||||||
$class = 'bars-graph-rotate';
|
$class = 'bars-graph-rotate';
|
||||||
|
@ -2869,7 +2869,7 @@ function donutNarrowGraph(
|
|||||||
arc = d3.svg
|
arc = d3.svg
|
||||||
.arc()
|
.arc()
|
||||||
.outerRadius(radius)
|
.outerRadius(radius)
|
||||||
.innerRadius(radius - radius / 6);
|
.innerRadius(radius - radius / 4);
|
||||||
|
|
||||||
svg = donutbody
|
svg = donutbody
|
||||||
.append("svg")
|
.append("svg")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*global jQuery, $, forced_title_callback, confirmDialog*/
|
/*global jQuery, $, forced_title_callback, confirmDialog, progressTimeBar*/
|
||||||
|
|
||||||
// Show the modal window of an event
|
// Show the modal window of an event
|
||||||
function show_event_dialog(event, dialog_page) {
|
function show_event_dialog(event, dialog_page) {
|
||||||
@ -1028,3 +1028,256 @@ function process_buffers(buffers) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openSoundEventModal(settings) {
|
||||||
|
settings = JSON.parse(atob(settings));
|
||||||
|
|
||||||
|
// Check modal exists and is open.
|
||||||
|
if (
|
||||||
|
$("#modal-sound").hasClass("ui-dialog-content") &&
|
||||||
|
$("#modal-sound").dialog("isOpen")
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize modal.
|
||||||
|
$("#modal-sound")
|
||||||
|
.empty()
|
||||||
|
.dialog({
|
||||||
|
title: settings.title,
|
||||||
|
resizable: false,
|
||||||
|
modal: true,
|
||||||
|
position: { my: "right top", at: "right bottom", of: window },
|
||||||
|
overlay: {
|
||||||
|
opacity: 0.5,
|
||||||
|
background: "black"
|
||||||
|
},
|
||||||
|
width: 600,
|
||||||
|
height: 600,
|
||||||
|
open: function() {
|
||||||
|
$.ajax({
|
||||||
|
method: "post",
|
||||||
|
url: settings.url,
|
||||||
|
data: {
|
||||||
|
page: settings.page,
|
||||||
|
drawConsoleSound: 1
|
||||||
|
},
|
||||||
|
dataType: "html",
|
||||||
|
success: function(data) {
|
||||||
|
$("#modal-sound").append(data);
|
||||||
|
$("#tabs-sound-modal").tabs({
|
||||||
|
disabled: [1]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Test sound.
|
||||||
|
$("#button-melody_sound").click(function() {
|
||||||
|
var sound = false;
|
||||||
|
if ($("#id_sound_event").length == 0) {
|
||||||
|
sound = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
test_sound_button(sound);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Play Stop.
|
||||||
|
$("#button-start-search").click(function() {
|
||||||
|
var mode = $("#hidden-mode_alert").val();
|
||||||
|
var action = false;
|
||||||
|
if (mode == 0) {
|
||||||
|
action = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
action_events_sound(action, settings);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Silence Alert.
|
||||||
|
$("#button-no-alerts").click(function() {
|
||||||
|
if ($("#button-no-alerts").hasClass("silence-alerts") === true) {
|
||||||
|
// Remove audio.
|
||||||
|
remove_audio();
|
||||||
|
|
||||||
|
// Clean events.
|
||||||
|
$("#tabs-sound-modal .elements-discovered-alerts ul").empty();
|
||||||
|
$("#tabs-sound-modal .empty-discovered-alerts").removeClass(
|
||||||
|
"invisible_important"
|
||||||
|
);
|
||||||
|
|
||||||
|
// Clean progress.
|
||||||
|
$("#progressbar_time").empty();
|
||||||
|
|
||||||
|
// Change img button.
|
||||||
|
$("#button-no-alerts")
|
||||||
|
.removeClass("silence-alerts")
|
||||||
|
.addClass("alerts");
|
||||||
|
// Change value button.
|
||||||
|
$("#button-no-alerts").val(settings.noAlert);
|
||||||
|
|
||||||
|
// Background button.
|
||||||
|
$(".container-button-alert").removeClass("fired");
|
||||||
|
|
||||||
|
// New progress.
|
||||||
|
listen_event_sound(settings);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error: function(error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close: function() {
|
||||||
|
remove_audio();
|
||||||
|
$(this).dialog("destroy");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_sound_button(test_sound) {
|
||||||
|
if (test_sound === true) {
|
||||||
|
add_audio();
|
||||||
|
} else {
|
||||||
|
remove_audio();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function action_events_sound(mode, settings) {
|
||||||
|
if (mode === true) {
|
||||||
|
// Enable tabs.
|
||||||
|
$("#tabs-sound-modal").tabs("option", "disabled", [0]);
|
||||||
|
// Active tabs.
|
||||||
|
$("#tabs-sound-modal").tabs("option", "active", 1);
|
||||||
|
// Change mode.
|
||||||
|
$("#hidden-mode_alert").val(1);
|
||||||
|
// Change img button.
|
||||||
|
$("#button-start-search")
|
||||||
|
.removeClass("play")
|
||||||
|
.addClass("stop");
|
||||||
|
// Change value button.
|
||||||
|
$("#button-start-search").val(settings.stop);
|
||||||
|
// Add Progress bar.
|
||||||
|
listen_event_sound(settings);
|
||||||
|
} else {
|
||||||
|
// Enable tabs.
|
||||||
|
$("#tabs-sound-modal").tabs("option", "disabled", [1]);
|
||||||
|
// Active tabs.
|
||||||
|
$("#tabs-sound-modal").tabs("option", "active", 0);
|
||||||
|
// Change mode.
|
||||||
|
$("#hidden-mode_alert").val(0);
|
||||||
|
// Change img button.
|
||||||
|
$("#button-start-search")
|
||||||
|
.removeClass("stop")
|
||||||
|
.addClass("play");
|
||||||
|
// Change value button.
|
||||||
|
$("#button-start-search").val(settings.start);
|
||||||
|
// Remove progress bar.
|
||||||
|
$("#progressbar_time").empty();
|
||||||
|
// Remove audio.
|
||||||
|
remove_audio();
|
||||||
|
// Clean events.
|
||||||
|
$("#tabs-sound-modal .elements-discovered-alerts ul").empty();
|
||||||
|
$("#tabs-sound-modal .empty-discovered-alerts").removeClass(
|
||||||
|
"invisible_important"
|
||||||
|
);
|
||||||
|
// Change img button.
|
||||||
|
$("#button-no-alerts")
|
||||||
|
.removeClass("silence-alerts")
|
||||||
|
.addClass("alerts");
|
||||||
|
// Change value button.
|
||||||
|
$("#button-no-alerts").val(settings.noAlert);
|
||||||
|
|
||||||
|
// Background button.
|
||||||
|
$(".container-button-alert").removeClass("fired");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function add_audio() {
|
||||||
|
var sound = "./include/sounds/" + $("#tabs-sound-modal #sound_id").val();
|
||||||
|
$(".actions-sound-modal").append(
|
||||||
|
"<audio id='id_sound_event' src='" +
|
||||||
|
sound +
|
||||||
|
"' autoplay='true' hidden='true' loop='false'>"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function remove_audio() {
|
||||||
|
$(".actions-sound-modal audio").remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
function listen_event_sound(settings) {
|
||||||
|
progressTimeBar(
|
||||||
|
"progressbar_time",
|
||||||
|
$("#interval").val(),
|
||||||
|
"infinite",
|
||||||
|
function() {
|
||||||
|
// Search events.
|
||||||
|
check_event_sound(settings);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_event_sound(settings) {
|
||||||
|
jQuery.post(
|
||||||
|
"./ajax.php",
|
||||||
|
{
|
||||||
|
page: "include/ajax/events",
|
||||||
|
get_events_fired: 1,
|
||||||
|
filter_id: $("#tabs-sound-modal #filter_id").val(),
|
||||||
|
interval: $("#tabs-sound-modal #interval").val(),
|
||||||
|
time_sound: $("#tabs-sound-modal #time_sound").val()
|
||||||
|
},
|
||||||
|
function(data) {
|
||||||
|
if (data != false) {
|
||||||
|
// Hide empty.
|
||||||
|
$("#tabs-sound-modal .empty-discovered-alerts").addClass(
|
||||||
|
"invisible_important"
|
||||||
|
);
|
||||||
|
|
||||||
|
// Change img button.
|
||||||
|
$("#button-no-alerts")
|
||||||
|
.removeClass("alerts")
|
||||||
|
.addClass("silence-alerts");
|
||||||
|
// Change value button.
|
||||||
|
$("#button-no-alerts").val(settings.silenceAlarm);
|
||||||
|
|
||||||
|
// Background button.
|
||||||
|
$(".container-button-alert").addClass("fired");
|
||||||
|
|
||||||
|
// Remove audio.
|
||||||
|
remove_audio();
|
||||||
|
|
||||||
|
// Apend audio.
|
||||||
|
add_audio();
|
||||||
|
|
||||||
|
// Add elements.
|
||||||
|
data.forEach(function(element) {
|
||||||
|
var li = document.createElement("li");
|
||||||
|
li.insertAdjacentHTML(
|
||||||
|
"beforeend",
|
||||||
|
'<div class="li-priority">' + element.priority + "</div>"
|
||||||
|
);
|
||||||
|
li.insertAdjacentHTML(
|
||||||
|
"beforeend",
|
||||||
|
'<div class="li-type">' + element.type + "</div>"
|
||||||
|
);
|
||||||
|
li.insertAdjacentHTML(
|
||||||
|
"beforeend",
|
||||||
|
'<div class="li-title">' + element.message + "</div>"
|
||||||
|
);
|
||||||
|
li.insertAdjacentHTML(
|
||||||
|
"beforeend",
|
||||||
|
'<div class="li-time">' + element.timestamp + "</div>"
|
||||||
|
);
|
||||||
|
$("#tabs-sound-modal .elements-discovered-alerts ul").append(li);
|
||||||
|
});
|
||||||
|
|
||||||
|
// -100 delay sound.
|
||||||
|
setTimeout(
|
||||||
|
remove_audio,
|
||||||
|
parseInt($("#tabs-sound-modal #time_sound").val()) * 1000 - 100
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"json"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
@ -615,6 +615,10 @@ class EventsListWidget extends Widget
|
|||||||
$fields = $default_fields;
|
$fields = $default_fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($filter['search']) === false || empty($filter['user_comment']) === false) {
|
||||||
|
$fields[] = 'user_comment';
|
||||||
|
}
|
||||||
|
|
||||||
// Get column names.
|
// Get column names.
|
||||||
$column_names = events_get_column_names($fields, true);
|
$column_names = events_get_column_names($fields, true);
|
||||||
|
|
||||||
|
@ -193,6 +193,10 @@ class GroupsStatusWidget extends Widget
|
|||||||
$values['groupId'] = $decoder['groupId'];
|
$values['groupId'] = $decoder['groupId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($decoder['groupRecursion']) === true) {
|
||||||
|
$values['groupRecursion'] = $decoder['groupRecursion'];
|
||||||
|
}
|
||||||
|
|
||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,6 +228,16 @@ class GroupsStatusWidget extends Widget
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$inputs[] = [
|
||||||
|
'label' => __('Group recursion'),
|
||||||
|
'arguments' => [
|
||||||
|
'name' => 'groupRecursion',
|
||||||
|
'id' => 'groupRecursion',
|
||||||
|
'type' => 'switch',
|
||||||
|
'value' => $values['groupRecursion'],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
return $inputs;
|
return $inputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,6 +253,7 @@ class GroupsStatusWidget extends Widget
|
|||||||
$values = parent::getPost();
|
$values = parent::getPost();
|
||||||
|
|
||||||
$values['groupId'] = \get_parameter('groupId', 0);
|
$values['groupId'] = \get_parameter('groupId', 0);
|
||||||
|
$values['groupRecursion'] = \get_parameter_switch('groupRecursion', 0);
|
||||||
|
|
||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
@ -260,9 +275,12 @@ class GroupsStatusWidget extends Widget
|
|||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$user_groups = \users_get_groups(false, 'AR', false);
|
$stats = \reporting_get_group_stats_resume(
|
||||||
|
$this->values['groupId'],
|
||||||
$stats = \reporting_get_group_stats_resume($this->values['groupId'], 'AR', true);
|
'AR',
|
||||||
|
true,
|
||||||
|
(bool) $this->values['groupRecursion']
|
||||||
|
);
|
||||||
|
|
||||||
$data = '<div class="widget-groups-status"><span>';
|
$data = '<div class="widget-groups-status"><span>';
|
||||||
$data .= ui_print_group_icon(
|
$data .= ui_print_group_icon(
|
||||||
@ -393,7 +411,7 @@ class GroupsStatusWidget extends Widget
|
|||||||
$table->data[0][0] .= '</span>';
|
$table->data[0][0] .= '</span>';
|
||||||
$table->data[0][1] = '<span>';
|
$table->data[0][1] = '<span>';
|
||||||
$table->data[0][1] .= '<b>';
|
$table->data[0][1] .= '<b>';
|
||||||
$table->data[0][1] .= $stats['monitor_total'];
|
$table->data[0][1] .= $stats['total_checks'];
|
||||||
$table->data[0][1] .= '</b>';
|
$table->data[0][1] .= '</b>';
|
||||||
$table->data[0][1] .= '</span>';
|
$table->data[0][1] .= '</span>';
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ class Event extends Entity
|
|||||||
* @param boolean $return_sql Return sql or execute it.
|
* @param boolean $return_sql Return sql or execute it.
|
||||||
* @param string $having Having.
|
* @param string $having Having.
|
||||||
*
|
*
|
||||||
* @return array|string|false Found events or SQL query or error.
|
* @return array Found events or SQL query or error.
|
||||||
* @throws \Exception On error.
|
* @throws \Exception On error.
|
||||||
*/
|
*/
|
||||||
public static function search(
|
public static function search(
|
||||||
@ -160,7 +160,7 @@ class Event extends Entity
|
|||||||
bool $return_sql=false,
|
bool $return_sql=false,
|
||||||
string $having=''
|
string $having=''
|
||||||
):array {
|
):array {
|
||||||
return \events_get_all(
|
$result = \events_get_all(
|
||||||
$fields,
|
$fields,
|
||||||
$filter,
|
$filter,
|
||||||
$offset,
|
$offset,
|
||||||
@ -171,6 +171,13 @@ class Event extends Entity
|
|||||||
$return_sql,
|
$return_sql,
|
||||||
$having
|
$having
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Always return an array.
|
||||||
|
if (empty($result) === true) {
|
||||||
|
$result = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -159,10 +159,26 @@
|
|||||||
fill: #cccccc;
|
fill: #cccccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notinit_10,
|
||||||
|
.notinit_9,
|
||||||
|
.notinit_8,
|
||||||
.notinit {
|
.notinit {
|
||||||
fill: #4a83f3;
|
fill: #4a83f3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notinit_7,
|
||||||
|
.notinit_6,
|
||||||
|
.notinit_5,
|
||||||
|
.notinit_4 {
|
||||||
|
fill: #6695f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notinit_3,
|
||||||
|
.notinit_2,
|
||||||
|
.notinit_1 {
|
||||||
|
fill: #79a3f6;
|
||||||
|
}
|
||||||
|
|
||||||
.hover {
|
.hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
@ -5614,12 +5614,12 @@ div#bullets_modules div {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_col_left {
|
.agent_details_col_left {
|
||||||
width: 40%;
|
width: 49%;
|
||||||
min-width: 300px;
|
min-width: 450px;
|
||||||
}
|
}
|
||||||
.agent_details_col_right {
|
.agent_details_col_right {
|
||||||
width: 59%;
|
width: 49%;
|
||||||
min-width: 480px;
|
min-width: 450px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_access_rate_events {
|
.agent_access_rate_events {
|
||||||
@ -5630,14 +5630,15 @@ div#bullets_modules div {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.white_table_graph#table_access_rate {
|
.white_table_graph#table_access_rate {
|
||||||
flex: 1 1 auto;
|
margin-left: 1px;
|
||||||
min-width: 450px;
|
margin-right: 1px;
|
||||||
margin-right: 1%;
|
width: 49%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.white_table_graph#table_events {
|
.white_table_graph#table_events {
|
||||||
flex: 1 1 auto;
|
margin-left: 1px;
|
||||||
min-width: 450px;
|
margin-right: 1px;
|
||||||
|
width: 49%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1150px) {
|
@media screen and (max-width: 1150px) {
|
||||||
@ -5676,7 +5677,7 @@ div#status_pie {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid #e2e2e2;
|
border-bottom: 1px solid #e2e2e2;
|
||||||
padding: 6px 20px;
|
padding: 8px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.agent_details_content {
|
.agent_details_content {
|
||||||
@ -9077,3 +9078,33 @@ div#err_msg_centralised {
|
|||||||
margin-bottom: 4px !important;
|
margin-bottom: 4px !important;
|
||||||
padding: 2px 5px !important;
|
padding: 2px 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dataTables_wrapper {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_wrapper .dataTables_processing {
|
||||||
|
margin-top: -37px !important;
|
||||||
|
top: 50px !important;
|
||||||
|
padding-top: 0px !important;
|
||||||
|
height: 0px !important;
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_wrapper .dataTables_processing .processing-datatables-inside {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_wrapper .dataTables_processing .processing-datatables-inside img {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-search-datatables-button {
|
||||||
|
float: right;
|
||||||
|
margin-right: -110px;
|
||||||
|
margin-top: 13px;
|
||||||
|
}
|
||||||
|
300
pandora_console/include/styles/sound_events.css
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
/*
|
||||||
|
* Css Modal Sound events.
|
||||||
|
*/
|
||||||
|
#modal-sound {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0px 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal h3.console-configuration {
|
||||||
|
color: #000000;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 19px;
|
||||||
|
text-align: left;
|
||||||
|
text-transform: none;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.tabs-sound-modal-options {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 0px;
|
||||||
|
border-bottom: 1px solid #eaeaea;
|
||||||
|
height: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.tabs-sound-modal-options li {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.tabs-sound-modal-options li.ui-tabs-active {
|
||||||
|
border-bottom: 2px solid #82b92e;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard li label {
|
||||||
|
color: #95a3bf;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 16px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard li.interval-sounds,
|
||||||
|
#tabs-sound-modal ul.wizard li.test-sounds {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard li.interval-sounds label,
|
||||||
|
#tabs-sound-modal ul.wizard li.test-sounds label {
|
||||||
|
flex: 0;
|
||||||
|
width: inherit;
|
||||||
|
position: absolute;
|
||||||
|
top: -12px;
|
||||||
|
left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard li.interval-sounds label:first-of-type,
|
||||||
|
#tabs-sound-modal ul.wizard li.test-sounds label:first-of-type {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard li.interval-sounds .select2 {
|
||||||
|
width: 48% !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard li.test-sounds .select2 {
|
||||||
|
width: 70% !important;
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard li.test-sounds input[type="button"] {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
width: 131px;
|
||||||
|
height: 38px;
|
||||||
|
color: #95a3bf;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 0px;
|
||||||
|
padding-right: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal button.upd,
|
||||||
|
input.upd {
|
||||||
|
background-image: url(../../images/sound_wave.png);
|
||||||
|
background-position: 90px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal ul.wizard .select2 {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal .select2-selection {
|
||||||
|
border: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-bottom: 1px solid #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal .select2-container,
|
||||||
|
#tabs-sound-modal .select2-selection__rendered {
|
||||||
|
padding-left: 0px;
|
||||||
|
color: #555555;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 25px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div h3.title-discovered-alerts {
|
||||||
|
margin: 0px;
|
||||||
|
color: #000000;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 19px;
|
||||||
|
text-align: left;
|
||||||
|
text-transform: none;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div span.text-discovered-alerts {
|
||||||
|
color: #95a3bf;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 16px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .empty-discovered-alerts {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
align-items: center;
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .elements-discovered-alerts {
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .elements-discovered-alerts ul {
|
||||||
|
width: 99%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .elements-discovered-alerts ul li {
|
||||||
|
border: 1px solid #eaeaea;
|
||||||
|
height: 46px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
color: #555555;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .elements-discovered-alerts ul li div.li-priority {
|
||||||
|
flex: 0;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal
|
||||||
|
div
|
||||||
|
.elements-discovered-alerts
|
||||||
|
ul
|
||||||
|
li
|
||||||
|
div.li-priority
|
||||||
|
.mini-criticity {
|
||||||
|
border-radius: 5px;
|
||||||
|
width: 6px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .elements-discovered-alerts ul li div.li-type {
|
||||||
|
flex: 0;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .elements-discovered-alerts ul li div.li-time {
|
||||||
|
flex: 0 1 100px;
|
||||||
|
text-align: end;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tabs-sound-modal div .elements-discovered-alerts ul li div.li-title {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .buttons-sound-modal {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .buttons-sound-modal input[type="button"] {
|
||||||
|
border: 1px solid #dddddd;
|
||||||
|
border-radius: 4px;
|
||||||
|
width: 107px;
|
||||||
|
height: 50px;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 24px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .buttons-sound-modal button.play,
|
||||||
|
.actions-sound-modal .buttons-sound-modal input[type="button"].play {
|
||||||
|
background: url(../../images/play-white.png), transparent;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 70px 17px;
|
||||||
|
color: #ffffff;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .buttons-sound-modal button.stop,
|
||||||
|
.actions-sound-modal .buttons-sound-modal input[type="button"].stop {
|
||||||
|
background: url(../../images/stop.png), transparent;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 70px 17px;
|
||||||
|
color: #ffffff;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .buttons-sound-modal button.alerts,
|
||||||
|
.actions-sound-modal .buttons-sound-modal input[type="button"].alerts {
|
||||||
|
width: 154px;
|
||||||
|
color: #95a3bf;
|
||||||
|
background: url(../../images/alarm-off.png), transparent;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 108px 9px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .buttons-sound-modal button.silence-alerts,
|
||||||
|
.actions-sound-modal .buttons-sound-modal input[type="button"].silence-alerts {
|
||||||
|
width: 184px;
|
||||||
|
color: #ffffff;
|
||||||
|
background: url(../../images/silence-alerts.png), transparent;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: 138px 9px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .container-button-play {
|
||||||
|
background: radial-gradient(118.26% 33.15%, #82b92e 0%, #1d4e4a 100%);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .container-button-alert.fired {
|
||||||
|
background: #ee2132;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .progressbar {
|
||||||
|
width: 100%;
|
||||||
|
margin: 4px 2px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions-sound-modal .progressbar .inner {
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
animation: progressbar-countdown;
|
||||||
|
/* Placeholder, this will be updated using javascript */
|
||||||
|
animation-duration: 40s;
|
||||||
|
/* We stop in the end */
|
||||||
|
animation-iteration-count: 1;
|
||||||
|
/* Stay on pause when the animation is finished finished */
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
/* We start paused, we start the animation using javascript */
|
||||||
|
animation-play-state: paused;
|
||||||
|
/* We want a linear animation, ease-out is standard */
|
||||||
|
animation-timing-function: linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes progressbar-countdown {
|
||||||
|
0% {
|
||||||
|
width: 100%;
|
||||||
|
background: #82b92e;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
width: 0%;
|
||||||
|
background: #e63c52;
|
||||||
|
}
|
||||||
|
}
|
@ -129,7 +129,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.763';
|
$version = '7.0NG.763';
|
||||||
$build = '220705';
|
$build = '220719';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -193,15 +193,23 @@ switch ($action) {
|
|||||||
|
|
||||||
if ($user->isWaitingDoubleAuth()) {
|
if ($user->isWaitingDoubleAuth()) {
|
||||||
if ($user->validateDoubleAuthCode()) {
|
if ($user->validateDoubleAuthCode()) {
|
||||||
// Logged. Refresh the page
|
$url = ui_get_full_url('');
|
||||||
header('Location: .');
|
$url = str_replace("\n", '', $url);
|
||||||
|
$url = str_replace('?action=logout', '', $url);
|
||||||
|
|
||||||
|
// Logged. Refresh the page.
|
||||||
|
header('Location: '.$url);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
$user->showDoubleAuthPage();
|
$user->showDoubleAuthPage();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Logged. Refresh the page
|
$url = ui_get_full_url('');
|
||||||
header('Location: .');
|
$url = str_replace("\n", '', $url);
|
||||||
|
$url = str_replace('?action=logout', '', $url);
|
||||||
|
|
||||||
|
// Logged. Refresh the page.
|
||||||
|
header('Location: '.$url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -294,6 +302,42 @@ switch ($action) {
|
|||||||
$_GET['id'] = $id_map;
|
$_GET['id'] = $id_map;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'External link':
|
||||||
|
$full_url = ui_get_full_url();
|
||||||
|
$section_data = io_safe_output($section_data);
|
||||||
|
|
||||||
|
$host_full = parse_url($full_url, PHP_URL_HOST);
|
||||||
|
$host_section = parse_url($section_data, PHP_URL_HOST);
|
||||||
|
|
||||||
|
if ($host_full !== $host_section) {
|
||||||
|
$has_mobile = strpos($section_data, 'mobile');
|
||||||
|
if ($has_mobile === false) {
|
||||||
|
$pos = strpos($section_data, '/index');
|
||||||
|
if ($pos !== false) {
|
||||||
|
$section_data = substr_replace($section_data, '/mobile', $pos, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<script type="text/javascript">document.location="'.$section_data.'"</script>';
|
||||||
|
} else {
|
||||||
|
if (strpos($full_url, 'event') !== false) {
|
||||||
|
$page = 'events';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($full_url, 'alert') !== false) {
|
||||||
|
$page = 'alerts';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($full_url, 'tactical') !== false) {
|
||||||
|
$page = 'tactical';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($full_url, 'visual_console') !== false) {
|
||||||
|
$page = 'visualmap';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 'Group view':
|
case 'Group view':
|
||||||
default:
|
default:
|
||||||
// No content.
|
// No content.
|
||||||
|
@ -363,12 +363,6 @@ class Agent
|
|||||||
$events = new Events();
|
$events = new Events();
|
||||||
$events->addJavascriptDialog();
|
$events->addJavascriptDialog();
|
||||||
|
|
||||||
$options = $events->get_event_dialog_options();
|
|
||||||
$ui->addDialog($options);
|
|
||||||
|
|
||||||
$options = $events->get_event_dialog_error_options($options);
|
|
||||||
$ui->addDialog($options);
|
|
||||||
|
|
||||||
$ui->contentAddHtml("<a id='detail_event_dialog_hook' href='#detail_event_dialog' class='invisible'>detail_event_hook</a>");
|
$ui->contentAddHtml("<a id='detail_event_dialog_hook' href='#detail_event_dialog' class='invisible'>detail_event_hook</a>");
|
||||||
$ui->contentAddHtml("<a id='detail_event_dialog_error_hook' href='#detail_event_dialog_error' class='invisible'>detail_event_dialog_error_hook</a>");
|
$ui->contentAddHtml("<a id='detail_event_dialog_error_hook' href='#detail_event_dialog_error' class='invisible'>detail_event_dialog_error_hook</a>");
|
||||||
|
|
||||||
|
@ -74,9 +74,7 @@ if (! check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$alive_animation = agents_get_status_animation(
|
$alive_animation = agents_get_starmap($id_agente, 200, 50);
|
||||||
agents_get_interval_status($agent, false)
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* START: TABLE AGENT BUILD.
|
* START: TABLE AGENT BUILD.
|
||||||
@ -170,10 +168,10 @@ $status_img = agents_detail_view_status_img(
|
|||||||
$table_agent_header .= '<div class="icono_right">'.$status_img.'</div>';
|
$table_agent_header .= '<div class="icono_right">'.$status_img.'</div>';
|
||||||
|
|
||||||
// Fixed width non interactive charts.
|
// Fixed width non interactive charts.
|
||||||
$status_chart_width = 180;
|
$status_chart_width = 150;
|
||||||
$graph_width = 180;
|
$graph_width = 150;
|
||||||
|
|
||||||
$table_agent_graph = '<div id="status_pie" style="width: '.$status_chart_width.'px;">';
|
$table_agent_graph = '<div id="status_pie" style="width: '.$graph_width.'px;">';
|
||||||
$table_agent_graph .= graph_agent_status(
|
$table_agent_graph .= graph_agent_status(
|
||||||
$id_agente,
|
$id_agente,
|
||||||
$graph_width,
|
$graph_width,
|
||||||
@ -604,6 +602,7 @@ if ($config['agentaccess'] && $access_agent > 0) {
|
|||||||
$table_access_rate .= graphic_agentaccess(
|
$table_access_rate .= graphic_agentaccess(
|
||||||
$id_agente,
|
$id_agente,
|
||||||
SECONDS_1DAY,
|
SECONDS_1DAY,
|
||||||
|
true,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$table_access_rate .= '</div>';
|
$table_access_rate .= '</div>';
|
||||||
|
@ -288,7 +288,6 @@ if (is_ajax() === true) {
|
|||||||
'te.event_type',
|
'te.event_type',
|
||||||
'te.id_alert_am',
|
'te.id_alert_am',
|
||||||
'te.criticity',
|
'te.criticity',
|
||||||
'te.user_comment',
|
|
||||||
'te.tags',
|
'te.tags',
|
||||||
'te.source',
|
'te.source',
|
||||||
'te.id_extra',
|
'te.id_extra',
|
||||||
@ -305,6 +304,13 @@ if (is_ajax() === true) {
|
|||||||
'ta.direccion',
|
'ta.direccion',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (strpos($config['event_fields'], 'user_comment') !== false
|
||||||
|
|| empty($user_comment) === false
|
||||||
|
|| empty($search) === false
|
||||||
|
) {
|
||||||
|
$fields[] = 'te.user_comment';
|
||||||
|
}
|
||||||
|
|
||||||
$order = get_datatable_order(true);
|
$order = get_datatable_order(true);
|
||||||
|
|
||||||
if (is_array($order) === true && $order['field'] === 'mini_severity') {
|
if (is_array($order) === true && $order['field'] === 'mini_severity') {
|
||||||
@ -392,14 +398,23 @@ if (is_ajax() === true) {
|
|||||||
$tmp->meta = is_metaconsole();
|
$tmp->meta = is_metaconsole();
|
||||||
|
|
||||||
// phpcs:disable Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
// phpcs:disable Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
||||||
|
$server_url = '';
|
||||||
|
$hashdata = '';
|
||||||
if ($tmp->meta === true) {
|
if ($tmp->meta === true) {
|
||||||
if ($tmp->server_name !== null) {
|
if ($tmp->server_name !== null) {
|
||||||
$data_server = metaconsole_get_servers(
|
$data_server = metaconsole_get_servers(
|
||||||
$tmp->server_id
|
$tmp->server_id
|
||||||
);
|
);
|
||||||
$tmp->server_url_hash = metaconsole_get_servers_url_hash(
|
|
||||||
$data_server
|
// Url to go to node from meta.
|
||||||
);
|
if (isset($data_server) === true
|
||||||
|
&& $data_server !== false
|
||||||
|
) {
|
||||||
|
$server_url = $data_server['server_url'];
|
||||||
|
$hashdata = metaconsole_get_servers_url_hash(
|
||||||
|
$data_server
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -892,19 +907,6 @@ if (is_ajax() === true) {
|
|||||||
|
|
||||||
$tmp->m .= 'class="candeleted chk_val">';
|
$tmp->m .= 'class="candeleted chk_val">';
|
||||||
|
|
||||||
// Url to go to node from meta.
|
|
||||||
$server_url = '';
|
|
||||||
$hashdata = '';
|
|
||||||
if ($tmp->meta === true) {
|
|
||||||
if (isset($data_server) === true
|
|
||||||
&& $data_server !== false
|
|
||||||
&& isset($tmp->server_url_hash) === true
|
|
||||||
) {
|
|
||||||
$server_url = $data_server['server_url'];
|
|
||||||
$hashdata = $tmp->server_url_hash;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Url to agent view.
|
// Url to agent view.
|
||||||
$url_link = ui_get_full_url(
|
$url_link = ui_get_full_url(
|
||||||
'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='
|
'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='
|
||||||
|
@ -342,7 +342,8 @@ var test_sound = false;
|
|||||||
function test_sound_button() {
|
function test_sound_button() {
|
||||||
if (!test_sound) {
|
if (!test_sound) {
|
||||||
$("#button_try").attr('src', '../../images/icono_test.png');
|
$("#button_try").attr('src', '../../images/icono_test.png');
|
||||||
$('body').append("<audio src='../../include/sounds/Star_Trek_emergency_simulation.wav' autoplay='true' hidden='true' loop='false'>");
|
var sound = '../../include/sounds/' + $('#sound_id').val();
|
||||||
|
$('body').append("<audio src='"+sound+"' autoplay='true' hidden='true' loop='false'>");
|
||||||
test_sound = true;
|
test_sound = true;
|
||||||
} else {
|
} else {
|
||||||
$("#button_try").attr('src', '../../images/icono_test.png');
|
$("#button_try").attr('src', '../../images/icono_test.png');
|
||||||
|
@ -419,12 +419,34 @@ if (check_acl($config['id_user'], 0, 'ER')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sound Events.
|
// Sound Events.
|
||||||
$javascript = "javascript: window.open('operation/events/sound_events.php');";
|
// $javascript = 'javascript: openSoundEventWindow();';
|
||||||
$javascript = 'javascript: openSoundEventWindow();';
|
// $sub[$javascript]['text'] = __('Sound Events');
|
||||||
|
// $sub[$javascript]['id'] = 'Sound Events';
|
||||||
|
// $sub[$javascript]['type'] = 'direct';
|
||||||
|
$data_sound = base64_encode(
|
||||||
|
json_encode(
|
||||||
|
[
|
||||||
|
'title' => __('Sound Console'),
|
||||||
|
'start' => __('Start'),
|
||||||
|
'stop' => __('Stop'),
|
||||||
|
'noAlert' => __('No alert'),
|
||||||
|
'silenceAlarm' => __('Silence alarm'),
|
||||||
|
'url' => ui_get_full_url('ajax.php'),
|
||||||
|
'page' => 'include/ajax/events',
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
$javascript = 'javascript: openSoundEventModal(\''.$data_sound.'\');';
|
||||||
$sub[$javascript]['text'] = __('Sound Events');
|
$sub[$javascript]['text'] = __('Sound Events');
|
||||||
$sub[$javascript]['id'] = 'Sound Events';
|
$sub[$javascript]['id'] = 'Sound Events Modal';
|
||||||
$sub[$javascript]['type'] = 'direct';
|
$sub[$javascript]['type'] = 'direct';
|
||||||
|
|
||||||
|
echo '<div id="modal-sound" style="display:none;"></div>';
|
||||||
|
|
||||||
|
ui_require_javascript_file('pandora_events');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function openSoundEventWindow() {
|
function openSoundEventWindow() {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.763
|
%define version 7.0NG.763
|
||||||
%define release 220705
|
%define release 220719
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.763
|
%define version 7.0NG.763
|
||||||
%define release 220705
|
%define release 220719
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.763
|
%define version 7.0NG.763
|
||||||
%define release 220705
|
%define release 220719
|
||||||
%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
|
||||||
|
@ -1292,7 +1292,6 @@ CREATE TABLE IF NOT EXISTS `tusuario` (
|
|||||||
`not_login` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
`not_login` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`local_user` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
`local_user` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`metaconsole_agents_manager` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
`metaconsole_agents_manager` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`metaconsole_assigned_server` INT UNSIGNED NOT NULL DEFAULT 0,
|
|
||||||
`metaconsole_access_node` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
`metaconsole_access_node` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`strict_acl` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
`strict_acl` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`id_filter` INT UNSIGNED NULL DEFAULT NULL,
|
`id_filter` INT UNSIGNED NULL DEFAULT NULL,
|
||||||
@ -3576,6 +3575,18 @@ CREATE TABLE IF NOT EXISTS `tautoconfig` (
|
|||||||
`order` INT NOT NULL DEFAULT 0,
|
`order` INT NOT NULL DEFAULT 0,
|
||||||
`description` TEXT,
|
`description` TEXT,
|
||||||
`disabled` TINYINT DEFAULT 0,
|
`disabled` TINYINT DEFAULT 0,
|
||||||
|
`type_execution` VARCHAR(100) NOT NULL DEFAULT 'start',
|
||||||
|
`type_periodicity` VARCHAR(100) NOT NULL DEFAULT 'weekly',
|
||||||
|
`monday` TINYINT DEFAULT 0,
|
||||||
|
`tuesday` TINYINT DEFAULT 0,
|
||||||
|
`wednesday` TINYINT DEFAULT 0,
|
||||||
|
`thursday` TINYINT DEFAULT 0,
|
||||||
|
`friday` TINYINT DEFAULT 0,
|
||||||
|
`saturday` TINYINT DEFAULT 0,
|
||||||
|
`sunday` TINYINT DEFAULT 0,
|
||||||
|
`periodically_day_from` INT UNSIGNED DEFAULT NULL,
|
||||||
|
`periodically_time_from` time NULL DEFAULT NULL,
|
||||||
|
`executed` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
|
||||||
|
|
||||||
|
779
pandora_plugins/cisco_ipsla/pandora_ipsla.sh
Executable file
@ -0,0 +1,779 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# IPSLA remote Plugin for Pandora FMS
|
||||||
|
# (c) ArticaST 2014
|
||||||
|
|
||||||
|
|
||||||
|
# Default values
|
||||||
|
COMMUNITY="public"
|
||||||
|
TAG_TABLE_CACHE="/tmp/ipsla_cache"
|
||||||
|
|
||||||
|
function help {
|
||||||
|
echo -e "Cisco IP SLA Server Plugin for Pandora FMS. http://pandorafms.com"
|
||||||
|
echo -e "Syntax:\n\n-c <community> -t <target> -v <version> [other options]\n"
|
||||||
|
echo -e "\t\t-c community"
|
||||||
|
echo -e "\t\t-t target"
|
||||||
|
echo -e "\t\t-v version"
|
||||||
|
echo -e "Other options\n";
|
||||||
|
echo -e "\t\t-s show defined tags for cisco ipsla device and exit"
|
||||||
|
echo -e "\t\t-l <auth-type> "
|
||||||
|
echo -e "\t\t-u <user> "
|
||||||
|
echo -e "\t\t-a <authentication> "
|
||||||
|
echo -e "\t\t-A <authenticacion-password> "
|
||||||
|
echo -e "\t\t-x <encryption> "
|
||||||
|
echo -e "\t\t-X <encryption-pass> "
|
||||||
|
echo -e "\t\t-g <id> "
|
||||||
|
echo -e "\t\t-m <module>\n"
|
||||||
|
echo -e "Available Modules list: \n"
|
||||||
|
echo -e "\tICPIF - Calculated Planning Impairment Factor for specified tag"
|
||||||
|
echo -e "\tMOS - Mean Opinion Score"
|
||||||
|
echo -e "\tPacket_Out_of_Sequence - Packets arriving out of sequence "
|
||||||
|
echo -e "\tPacket_Late_Arrival - Packets arriving late"
|
||||||
|
echo -e "\tAverage_Jitter - Average jitter is the estimated average jitter observed in the last XX RTP packets"
|
||||||
|
echo -e "\tPacketLossSD - Packet loss from source to destination"
|
||||||
|
echo -e "\tPacketLossDS - Packet loss from destination to source"
|
||||||
|
echo -e "\tPacketLost - The number of packets that are lost for which we cannot determine the direction "
|
||||||
|
echo -e "\tNegativesSD - The sum of number of all negative jitter values from packets sent from source to destination "
|
||||||
|
echo -e "\tNegativesDS - The sum of number of all negative jitter values from packets sent from destination to source"
|
||||||
|
echo -e "\tPositivesSD - The sum of number of all positive jitter values from packets sent from source to destination"
|
||||||
|
echo -e "\tPositivesDS - The sum of number of all positive jitter values from packets sent from source to destination"
|
||||||
|
echo -e "\tRTTMax - Max Round Trip Time"
|
||||||
|
echo -e "\tRTTMin - Min Round Trip Time"
|
||||||
|
echo -e "\tOperNumOfRTT - The number of successful round trips"
|
||||||
|
echo -e "\tOperPacketLossSD - Packet loss from source to destination for jitter tests"
|
||||||
|
echo -e "\tOperPacketLossDS - Packet loss from destination to source for jitter tests"
|
||||||
|
echo -e "\tRttOperSense - A sense code for the completion status of the latest RTT operation."
|
||||||
|
echo -e "\tRttOperCompletionTime - The completion time of the latest RTT operation successfully completed."
|
||||||
|
echo -e "\tRttOperTime - The value of the agent system time at the time of the latest RTT operation."
|
||||||
|
echo -e "\tRttOperAddress - A string which specifies the address of the target."
|
||||||
|
echo -e "\tHTTPOperRTT - Round Trip Time taken to perform HTTP operation. This value is the sum of DNSRTT, TCPConnectRTT and TransactionRTT."
|
||||||
|
echo -e "\tHTTPOperDNSRTT Round Trip Time taken to perform DNS query within the HTTP operation."
|
||||||
|
echo -e "\tHTTPOperTCPConnectRTT - Round Trip Time taken to connect to the HTTP server."
|
||||||
|
echo -e "\tIcmpJitterAvgJitter The average of positive and negative jitter values in Source-to-Destionation and Destination-to-Source direction."
|
||||||
|
echo -e "\tHTTPOperTransactionRTT - Round Trip Time taken to download the object specified by the URL."
|
||||||
|
echo -e ""
|
||||||
|
echo -e " Example execution"
|
||||||
|
echo -e " snmp version 3: ./pandora_ipsla.sh -t <ip_target> -v 3 -l authPriv -u pandorafms -a MD5 -A pandorafms -x AES -X pandorafms -g jitter -m Average_Jitter"
|
||||||
|
echo -e " snmp version 2c: ./pandora_ipsla.sh -t <ip_target> -v 2c -c public -g jitter -m Average_Jitter"
|
||||||
|
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
function show_tags {
|
||||||
|
local TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET
|
||||||
|
|
||||||
|
if [ $version != "3" ]
|
||||||
|
then
|
||||||
|
snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
|
||||||
|
fi
|
||||||
|
if [ $version == "3" ]
|
||||||
|
#if snmp v3 snmpget with v3
|
||||||
|
then
|
||||||
|
if [ $auth == "authPriv" ]
|
||||||
|
# if authpriv snmpget with all parameters
|
||||||
|
then
|
||||||
|
snmpwalk -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
|
||||||
|
fi
|
||||||
|
if [ $auth == "authNoPriv" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
snmpget -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat $TAG_TABLE_CACHE
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_tags {
|
||||||
|
local TAG_TABLE_CACHE=$TAG_TABLE_CACHE.$TARGET
|
||||||
|
|
||||||
|
if [ $version != "3" ]
|
||||||
|
then
|
||||||
|
snmpwalk -v 1 -Onq -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
|
||||||
|
fi
|
||||||
|
if [ $version == "3" ]
|
||||||
|
#if snmp v3 snmpget with v3
|
||||||
|
then
|
||||||
|
if [ $auth == "authPriv" ]
|
||||||
|
# if authpriv snmpget with all parameters
|
||||||
|
then
|
||||||
|
snmpwalk -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
|
||||||
|
fi
|
||||||
|
if [ $auth == "authNoPriv" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
snmpget -v 3 -Onq -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.1.1.3 > $TAG_TABLE_CACHE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_index {
|
||||||
|
cat $TAG_TABLE_CACHE.$TARGET | grep "\"$1\"" | grep -o "[0-9]*\s"
|
||||||
|
}
|
||||||
|
|
||||||
|
# This function requires two arguments. MODULE_TYPE TAG
|
||||||
|
function get_module {
|
||||||
|
MODULE_TYPE=$1
|
||||||
|
update_tags
|
||||||
|
INDICE=$2
|
||||||
|
|
||||||
|
if [ $version != "3" ]
|
||||||
|
|
||||||
|
then
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "ICPIF" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "MOS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Average_Jitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLost" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMax" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMin" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperSense" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperAddress" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v $version -Oqv -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $version == "3" ]
|
||||||
|
|
||||||
|
#if snmp v3 snmpget with v3
|
||||||
|
then
|
||||||
|
if [ $auth == "authPriv" ]
|
||||||
|
# if authpriv snmpget with all parameters
|
||||||
|
then
|
||||||
|
if [ "$MODULE_TYPE" == "ICPIF" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "MOS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Average_Jitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLost" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMax" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMin" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperSense" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperAddress" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -x $hash2 -X $hash2pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $auth == "authNoPriv" ]
|
||||||
|
then
|
||||||
|
if [ "$hash1" ]
|
||||||
|
then
|
||||||
|
if [ "$MODULE_TYPE" == "ICPIF" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "MOS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Average_Jitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLost" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMax" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMin" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperSense" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperAddress" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -a $hash1 -A $hash1pass -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$MODULE_TYPE" == "ICPIF" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.43.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "MOS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.42.$INDICE`
|
||||||
|
fi
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Out_of_Sequence" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.28.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Packet_Late_Arrival" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.30.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "Average_Jitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.46.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PacketLost" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.29.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.12.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "NegativesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.22.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.7.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "PositivesDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.17.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMax" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RTTMin" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperNumOfRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossSD" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.26.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "OperPacketLossDS" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.2.1.27.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperCompletionTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperSense" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperTime" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.5.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "RttOperAddress" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.2.10.1.6.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.1.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperDNSRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.2.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTCPConnectRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.3.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "IcmpJitterAvgJitter" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.4.1.44.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$MODULE_TYPE" == "HTTPOperTransactionRTT" ]
|
||||||
|
then
|
||||||
|
VALOR=`snmpget -v 3 -l $auth -u $user -c $COMMUNITY $TARGET 1.3.6.1.4.1.9.9.42.1.5.1.1.4.$INDICE`
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n $VALOR | awk '{print $NF}'
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "`which snmpwalk`" ]
|
||||||
|
then
|
||||||
|
echo "ERROR: snmpwalk is not in the path. Exiting..."
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]
|
||||||
|
then
|
||||||
|
help
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Main parsing code
|
||||||
|
|
||||||
|
while getopts ":hc:t:v:l:u:a:A:x:X:sm:g:" optname
|
||||||
|
do
|
||||||
|
case "$optname" in
|
||||||
|
"h")
|
||||||
|
help
|
||||||
|
;;
|
||||||
|
"c")
|
||||||
|
COMMUNITY=$OPTARG
|
||||||
|
;;
|
||||||
|
"t")
|
||||||
|
TARGET=$OPTARG
|
||||||
|
;;
|
||||||
|
"v")
|
||||||
|
version=$OPTARG
|
||||||
|
;;
|
||||||
|
"l")
|
||||||
|
auth=$OPTARG
|
||||||
|
;;
|
||||||
|
"u")
|
||||||
|
user=$OPTARG
|
||||||
|
;;
|
||||||
|
"a")
|
||||||
|
hash1=$OPTARG
|
||||||
|
;;
|
||||||
|
"A")
|
||||||
|
hash1pass=$OPTARG
|
||||||
|
;;
|
||||||
|
"x")
|
||||||
|
hash2=$OPTARG
|
||||||
|
;;
|
||||||
|
"X")
|
||||||
|
hash2pass=$OPTARG
|
||||||
|
;;
|
||||||
|
"g")
|
||||||
|
TAG=$OPTARG
|
||||||
|
;;
|
||||||
|
"s")
|
||||||
|
SHOWTAGS=1
|
||||||
|
;;
|
||||||
|
"m")
|
||||||
|
MODULE=$OPTARG
|
||||||
|
;;
|
||||||
|
?)
|
||||||
|
help
|
||||||
|
;;
|
||||||
|
default)
|
||||||
|
help
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Execution
|
||||||
|
[ "$SHOWTAGS" ] && echo "Showing avaliables ipsla tags for the device $TARGET and OID 1.3.6.1.4.1.9.9.42.1.2.1.1.3" && show_tags
|
||||||
|
|
||||||
|
[ -z "$TARGET" ] && echo "Error missing target ip definition please use -t to difine it or -h to see help" && exit 1
|
||||||
|
[ -z "$MODULE" ] && echo "Error missing module definition please use -m to difine it or -h to see help" && exit 1
|
||||||
|
[ -z "$TAG" ] && echo "Error missing id definition please use -g to difine it or -h to see help" && exit 1
|
||||||
|
[ -z "$version" ] && echo "Error missing snmp version definition please use -v to difine it or -h to see help" && exit 1
|
||||||
|
|
||||||
|
|
||||||
|
get_module $MODULE $TAG
|
||||||
|
echo "DEBUG"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
#RttOperSense
|
||||||
|
# 0:other
|
||||||
|
# 1:ok
|
||||||
|
# 2:disconnected
|
||||||
|
# 3:overThreshold
|
||||||
|
# 4:timeout
|
||||||
|
# 5:busy
|
||||||
|
# 6:notConnected
|
||||||
|
# 7:dropped
|
||||||
|
# 8:sequenceError
|
||||||
|
# 9:verifyError
|
||||||
|
# 10:applicationSpecific
|
||||||
|
# 11:dnsServerTimeout
|
||||||
|
# 12:tcpConnectTimeout
|
||||||
|
# 13:httpTransactionTimeout
|
||||||
|
# 14:dnsQueryError
|
||||||
|
# 15:httpError
|
||||||
|
# 16:error
|
||||||
|
# 17:mplsLspEchoTxError
|
||||||
|
# 18:mplsLspUnreachable
|
||||||
|
# 19:mplsLspMalformedReq
|
||||||
|
# 20:mplsLspReachButNotFEC
|
||||||
|
# 21:enableOk
|
||||||
|
# 22:enableNoConnect
|
||||||
|
# 23:enableVersionFail
|
||||||
|
# 24:enableInternalError
|
||||||
|
# 25:enableAbort
|
||||||
|
# 26:enableFail
|
||||||
|
# 27:enableAuthFail
|
||||||
|
# 28:enableFormatError
|
||||||
|
# 29:enablePortInUse
|
||||||
|
# 30:statsRetrieveOk
|
||||||
|
# 31:statsRetrieveNoConnect
|
||||||
|
# 32:statsRetrieveVersionFail
|
||||||
|
# 33:statsRetrieveInternalError
|
||||||
|
# 34:statsRetrieveAbort
|
||||||
|
# 35:statsRetrieveFail
|
||||||
|
# 36:statsRetrieveAuthFail
|
||||||
|
# 37:statsRetrieveFormatError
|
||||||
|
# 38:statsRetrievePortInUse
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.763-220705
|
Version: 7.0NG.763-220719
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -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.763-220705"
|
pandora_version="7.0NG.763-220719"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -140,6 +140,9 @@ sub pandora_startup () {
|
|||||||
# Start the policy queue thread.
|
# Start the policy queue thread.
|
||||||
start_server_thread(\&pandora_process_policy_queue, [\%Config]) if ($Config{'__enterprise_enabled'} == 1 && $Config{'policy_manager'} == 1);
|
start_server_thread(\&pandora_process_policy_queue, [\%Config]) if ($Config{'__enterprise_enabled'} == 1 && $Config{'policy_manager'} == 1);
|
||||||
|
|
||||||
|
# Start agent autoconfiguration thread.
|
||||||
|
start_server_thread(\&pandora_agent_autoconfiguration_scheduled, [\%Config]) if ($Config{'__enterprise_enabled'} == 1 && $Config{'autoconfigure_agents'} == 1);
|
||||||
|
|
||||||
pandora_audit (\%Config, $Config{'rb_product_name'} . ' Server Daemon starting', 'SYSTEM', 'System', $DBH);
|
pandora_audit (\%Config, $Config{'rb_product_name'} . ' Server Daemon starting', 'SYSTEM', 'System', $DBH);
|
||||||
|
|
||||||
# Load servers
|
# Load servers
|
||||||
@ -308,6 +311,67 @@ sub pandora_stop_netflow_daemon () {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub pandora_agent_autoconfiguration_scheduled($) {
|
||||||
|
my $pa_config = shift;
|
||||||
|
|
||||||
|
my %pa_config = %{$pa_config};
|
||||||
|
|
||||||
|
my $dbh = db_connect ($pa_config{'dbengine'}, $pa_config{'dbname'}, $pa_config{'dbhost'}, $pa_config{'dbport'},
|
||||||
|
$pa_config{'dbuser'}, $pa_config{'dbpass'});
|
||||||
|
|
||||||
|
while ($THRRUN == 1) {
|
||||||
|
eval {{
|
||||||
|
local $SIG{__DIE__};
|
||||||
|
|
||||||
|
my @autoconfig = get_db_rows (
|
||||||
|
$dbh,
|
||||||
|
'SELECT *, DATE_FORMAT(DATE_ADD(periodically_time_from, INTERVAL ' . $pa_config->{'autoconfigure_agents_threshold'} . ' SECOND), "%H:%i:%S") AS time_minutes
|
||||||
|
FROM tautoconfig WHERE executed = 0 AND type_execution LIKE "scheduled" AND disabled = 0'
|
||||||
|
);
|
||||||
|
|
||||||
|
# Get current time.
|
||||||
|
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time());
|
||||||
|
my $time = sprintf ("%.2d:%.2d:%.2d", $hour, $min, $sec);
|
||||||
|
|
||||||
|
foreach my $conf (@autoconfig) {
|
||||||
|
if (($conf->{'type_periodicity'} eq 'daily') ||
|
||||||
|
($conf->{'type_periodicity'} eq 'monthly' && $conf->{'periodically_day_from'} eq $mday) ||
|
||||||
|
($conf->{'type_periodicity'} eq 'weekly' && (($conf->{'sunday'} eq 1 && $wday eq 0) ||
|
||||||
|
($conf->{'monday'} eq 1 && $wday eq 1) || ($conf->{'tuesday'} eq 1 && $wday eq 2) ||
|
||||||
|
($conf->{'wednesday'} eq 1 && $wday eq 3) || ($conf->{'thursday'} eq 1 && $wday eq 4) ||
|
||||||
|
($conf->{'friday'} eq 1 && $wday eq 5) || ($conf->{'saturday'} eq 1 && $wday eq 6)))
|
||||||
|
) {
|
||||||
|
if ($time ge $conf->{'periodically_time_from'} && $time le $conf->{'time_minutes'}) {
|
||||||
|
# Update executed.
|
||||||
|
db_process_update ($dbh, 'tautoconfig', {'executed' => 1}, {'id' => $conf->{'id'}});
|
||||||
|
# Get agents.
|
||||||
|
my @agents = get_db_rows(
|
||||||
|
$dbh,
|
||||||
|
'SELECT id_agente, alias, id_grupo, id_os, os_version, direccion, nombre AS agent_name FROM tagente
|
||||||
|
WHERE `disabled` = 0'
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach my $agent (@agents) {
|
||||||
|
# Check if the agent matches the rules.
|
||||||
|
my $match = enterprise_hook('autoconf_evaluate_rules', [$pa_config, $dbh, $agent, $conf->{'id'}, $agent->{'id_agente'}, 1]);
|
||||||
|
if (defined($match) && $match > 0) {
|
||||||
|
enterprise_hook('autoconf_execute_actions', [$pa_config, $dbh, $agent->{'id_agente'}, $agent, $conf->{'id'}]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Update executed.
|
||||||
|
db_process_update ($dbh, 'tautoconfig', {'executed' => 0}, {'id' => $conf->{'id'}});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}};
|
||||||
|
|
||||||
|
sleep ($pa_config->{'autoconfigure_agents_threshold'});
|
||||||
|
}
|
||||||
|
|
||||||
|
db_disconnect($dbh);
|
||||||
|
}
|
||||||
|
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# Additional tasks executed periodically by the Pandora FMS Server
|
# Additional tasks executed periodically by the Pandora FMS Server
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
@ -46,7 +46,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.763";
|
my $pandora_version = "7.0NG.763";
|
||||||
my $pandora_build = "220705";
|
my $pandora_build = "220719";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
@ -539,6 +539,7 @@ sub pandora_load_config {
|
|||||||
$pa_config->{"provisioning_cache_interval"} = 300; # 7.0 720
|
$pa_config->{"provisioning_cache_interval"} = 300; # 7.0 720
|
||||||
|
|
||||||
$pa_config->{"autoconfigure_agents"} = 1; # 7.0 725
|
$pa_config->{"autoconfigure_agents"} = 1; # 7.0 725
|
||||||
|
$pa_config->{"autoconfigure_agents_threshold"} = 300; #7.0 764
|
||||||
|
|
||||||
$pa_config->{'snmp_extlog'} = ""; # 7.0 726
|
$pa_config->{'snmp_extlog'} = ""; # 7.0 726
|
||||||
|
|
||||||
@ -1265,6 +1266,9 @@ sub pandora_load_config {
|
|||||||
elsif ($parametro =~ m/^autoconfigure_agents\s+([0-1])/i){
|
elsif ($parametro =~ m/^autoconfigure_agents\s+([0-1])/i){
|
||||||
$pa_config->{'autoconfigure_agents'}= clean_blank($1);
|
$pa_config->{'autoconfigure_agents'}= clean_blank($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^autoconfigure_agents_threshold\s+([0-1])/i){
|
||||||
|
$pa_config->{'autoconfigure_agents_threshold'}= clean_blank($1);
|
||||||
|
}
|
||||||
elsif ($parametro =~ m/^snmp_extlog\s(.*)/i) {
|
elsif ($parametro =~ m/^snmp_extlog\s(.*)/i) {
|
||||||
$pa_config->{'snmp_extlog'} = clean_blank($1);
|
$pa_config->{'snmp_extlog'} = clean_blank($1);
|
||||||
}
|
}
|
||||||
|
@ -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.763";
|
my $pandora_version = "7.0NG.763";
|
||||||
my $pandora_build = "220705";
|
my $pandora_build = "220719";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.763
|
%define version 7.0NG.763
|
||||||
%define release 220705
|
%define release 220719
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.763
|
%define version 7.0NG.763
|
||||||
%define release 220705
|
%define release 220719
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.763"
|
PI_VERSION="7.0NG.763"
|
||||||
PI_BUILD="220705"
|
PI_BUILD="220719"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
@ -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.763 Build 220705";
|
my $version = "7.0NG.763 Build 220719";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -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.763 Build 220705";
|
my $version = "7.0NG.763 Build 220719";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|