Merge branch 'pandora_6.0' into feature/reports-SLA
This commit is contained in:
commit
04f0458cf6
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 6.0SP4-161119
|
||||
Version: 6.0SP4-161129
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0SP4-161119"
|
||||
pandora_version="6.0SP4-161129"
|
||||
|
||||
echo "Test if you has the tools for to make the packages."
|
||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||
|
|
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||
my $ThreadSem = undef;
|
||||
|
||||
use constant AGENT_VERSION => '6.0SP4';
|
||||
use constant AGENT_BUILD => '161119';
|
||||
use constant AGENT_BUILD => '161129';
|
||||
|
||||
# Agent log default file size maximum and instances
|
||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0SP4
|
||||
%define release 161119
|
||||
%define release 161129
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0SP4
|
||||
%define release 161119
|
||||
%define release 161129
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="6.0SP4"
|
||||
PI_BUILD="161119"
|
||||
PI_BUILD="161129"
|
||||
OS_NAME=`uname -s`
|
||||
|
||||
FORCE=0
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{161119}
|
||||
{161129}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("6.0SP4(Build 161119)")
|
||||
#define PANDORA_VERSION ("6.0SP4(Build 161129)")
|
||||
|
||||
string pandora_path;
|
||||
string pandora_dir;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
VALUE "LegalCopyright", "Artica ST"
|
||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||
VALUE "ProductVersion", "(6.0SP4(Build 161119))"
|
||||
VALUE "ProductVersion", "(6.0SP4(Build 161129))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 6.0SP4-161119
|
||||
Version: 6.0SP4-161129
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0SP4-161119"
|
||||
pandora_version="6.0SP4-161129"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -39,6 +39,9 @@ switch ($tipo) {
|
|||
case "infomodal":
|
||||
echo "icono_info.png";
|
||||
break;
|
||||
case "helpmodal":
|
||||
echo "icono_info.png";
|
||||
break;
|
||||
case "modulemodal":
|
||||
echo "icono_popup.png";
|
||||
break;
|
||||
|
@ -85,6 +88,13 @@ echo "'>
|
|||
|
||||
switch ($tipo) {
|
||||
|
||||
case "helpmodal":
|
||||
|
||||
echo __("This is the online help for Pandora FMS console. This help is -in best cases- just a brief contextual help, not intented to teach you how to use Pandora FMS. Official documentation of Pandora FMS is about 900 pages, and you probably don't need to read it entirely, but sure, you should download it and take a look.<br><br>
|
||||
<a href='https://pandorafms.org/en/docs/monitoring-documentation/' target='_blanck'>Download the official documentation</a>");
|
||||
|
||||
break;
|
||||
|
||||
case "noaccess":
|
||||
|
||||
echo __('Access to this page is restricted to authorized users only, please contact system administrator if you need assistance. <br/> <br/>
|
||||
|
|
|
@ -273,7 +273,11 @@ config_check();
|
|||
$table->data[0][3] = $maintenance_img;
|
||||
|
||||
// Main help icon
|
||||
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal"><img src="images/header_help.png""></a>';
|
||||
$table->data[0][4] = '<a href="#" class="modalpopup" id="helpmodal">'.html_print_image("images/header_help.png",
|
||||
true, array(
|
||||
"title" => __('Main help'),
|
||||
"id" => "helpmodal",
|
||||
"class" => "modalpopup")).'</a>';
|
||||
|
||||
// Logout
|
||||
$table->data[0][5] = '<a class="white" href="' . ui_get_full_url('index.php?bye=bye') . '">';
|
||||
|
|
|
@ -1015,7 +1015,7 @@ if ($update_module || $create_module) {
|
|||
|
||||
$throw_unknown_events = (bool)get_parameter('throw_unknown_events', false);
|
||||
//Set the event type that can show.
|
||||
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
|
||||
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
|
||||
$disabled_types_event = io_json_mb_encode($disabled_types_event);
|
||||
|
||||
$module_macro_names = (array) get_parameter('module_macro_names', array());
|
||||
|
|
|
@ -30,7 +30,7 @@ if (is_ajax ()) {
|
|||
$component = db_get_row ('tnetwork_component', 'id_nc', $id_component);
|
||||
|
||||
$component['throw_unknown_events'] =
|
||||
!network_components_is_disable_type_event($id_component, EVENTS_GOING_UNKNOWN);
|
||||
network_components_is_disable_type_event($id_component, EVENTS_GOING_UNKNOWN);
|
||||
|
||||
// Decrypt passwords in the component.
|
||||
$component['plugin_pass'] = io_output_password($component['plugin_pass']);
|
||||
|
|
|
@ -403,13 +403,13 @@ $table_advanced->colspan[4][1] = 2;
|
|||
// Code comes from module_editor
|
||||
if ($__code_from == 'modules') {
|
||||
$throw_unknown_events_check =
|
||||
!modules_is_disable_type_event($id_agent_module, EVENTS_GOING_UNKNOWN);
|
||||
modules_is_disable_type_event($id_agent_module, EVENTS_GOING_UNKNOWN);
|
||||
}
|
||||
else {
|
||||
global $__id_pol_mod;
|
||||
|
||||
$throw_unknown_events_check =
|
||||
!policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
|
||||
policy_module_is_disable_type_event($__id_pol_mod, EVENTS_GOING_UNKNOWN);
|
||||
}
|
||||
$table_advanced->data[4][3] = __('Throw unknown events');
|
||||
$table_advanced->data[4][4] = html_print_checkbox('throw_unknown_events',
|
||||
|
|
|
@ -1066,7 +1066,7 @@ function process_manage_edit ($module_name, $agents_select = null) {
|
|||
if ($throw_unknown_events !== '') {
|
||||
//Set the event type that can show.
|
||||
$disabled_types_event = array(
|
||||
EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
|
||||
EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
|
||||
$values['disabled_types_event'] = json_encode($disabled_types_event);
|
||||
}
|
||||
|
||||
|
|
|
@ -122,12 +122,11 @@ if (check_acl ($config['id_user'], 0, "AW")) {
|
|||
$sub2["godmode/massive/massive_operations&tab=massive_alerts"]["text"] = __('Alerts operations');
|
||||
enterprise_hook('massivepolicies_submenu');
|
||||
enterprise_hook('massivesnmp_submenu');
|
||||
enterprise_hook('massivesatellite_submenu');
|
||||
|
||||
$sub["gmassive"]["sub2"] = $sub2;
|
||||
}
|
||||
|
||||
enterprise_hook('massivesatellite_submenu');
|
||||
|
||||
if (!empty($sub)) {
|
||||
$menu_godmode["gmodules"]["text"] = __('Configuration');
|
||||
$menu_godmode["gmodules"]["sec2"] = "godmode/modules/manage_network_templates";
|
||||
|
|
|
@ -135,7 +135,7 @@ $snmp3_security_level = (string) get_parameter('snmp3_security_level');
|
|||
|
||||
$throw_unknown_events = get_parameter('throw_unknown_events', false);
|
||||
//Set the event type that can show.
|
||||
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)!$throw_unknown_events);
|
||||
$disabled_types_event = array(EVENTS_GOING_UNKNOWN => (int)$throw_unknown_events);
|
||||
$disabled_types_event = json_encode($disabled_types_event);
|
||||
|
||||
$create_component = (bool) get_parameter ('create_component');
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1021 B |
Binary file not shown.
After Width: | Height: | Size: 1017 B |
Binary file not shown.
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 214 B |
Binary file not shown.
Before Width: | Height: | Size: 1017 B After Width: | Height: | Size: 216 B |
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC161119';
|
||||
$build_version = 'PC161129';
|
||||
$pandora_version = 'v6.0SP4';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -2645,7 +2645,7 @@ function pandora_setlocale() {
|
|||
'el' => 'el_GR',
|
||||
'ru' => 'ru_RU',
|
||||
'ar' => 'ar_MA',
|
||||
'ja' => 'ja_JP',
|
||||
'ja' => 'ja_JP.UTF-8',
|
||||
'zh_CN' => 'zh_CN',
|
||||
);
|
||||
|
||||
|
|
|
@ -1879,6 +1879,8 @@ function agents_delete_agent ($id_agents, $disableACL = false) {
|
|||
//And at long last, the agent
|
||||
db_process_delete_temp ("tagente", "id_agente", $id_agent);
|
||||
|
||||
db_process_sql ("delete from ttag_module where id_agente_modulo in (select id_agente_modulo from tagente_modulo where id_agente = ".$id_agent.")");
|
||||
|
||||
db_pandora_audit( "Agent management",
|
||||
"Deleted agent '$agent_name'");
|
||||
|
||||
|
|
|
@ -111,7 +111,8 @@ function events_get_event ($id, $fields = false) {
|
|||
}
|
||||
|
||||
function events_get_events_grouped($sql_post, $offset = 0,
|
||||
$pagination = 1, $meta = false, $history = false, $total = false) {
|
||||
$pagination = 1, $meta = false, $history = false, $total = false,
|
||||
$history_db = false) {
|
||||
|
||||
global $config;
|
||||
|
||||
|
@ -211,7 +212,7 @@ function events_get_events_grouped($sql_post, $offset = 0,
|
|||
}
|
||||
|
||||
//Extract the events by filter (or not) from db
|
||||
$events = db_get_all_rows_sql ($sql);
|
||||
$events = db_get_all_rows_sql ($sql, $history_db);
|
||||
|
||||
if ($total) {
|
||||
return reset($events[0]);
|
||||
|
@ -1186,7 +1187,7 @@ function events_print_type_description ($type, $return = false) {
|
|||
function events_get_group_events ($id_group, $period, $date,
|
||||
$filter_event_validated = false, $filter_event_critical = false,
|
||||
$filter_event_warning = false, $filter_event_no_validated = false,
|
||||
$filter_event_search = false, $meta = false) {
|
||||
$filter_event_search = false, $meta = false, $history = false) {
|
||||
|
||||
global $config;
|
||||
|
||||
|
@ -1228,7 +1229,8 @@ function events_get_group_events ($id_group, $period, $date,
|
|||
AND utimestamp <= %d ',
|
||||
implode (",", $id_group), $datelimit, $date);
|
||||
|
||||
return events_get_events_grouped($sql_where, 0, 1000, $meta);
|
||||
return events_get_events_grouped($sql_where, 0, 1000, $meta,
|
||||
false, false, $history);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1305,7 +1307,8 @@ function events_get_group_events_steps ($begin, &$result, $id_group, $period, $d
|
|||
*/
|
||||
function events_get_agent ($id_agent, $period, $date = 0,
|
||||
$filter_event_validated = false, $filter_event_critical = false,
|
||||
$filter_event_warning = false, $filter_event_no_validated = false) {
|
||||
$filter_event_warning = false, $filter_event_no_validated = false,
|
||||
$history = false) {
|
||||
|
||||
if (!is_numeric ($date)) {
|
||||
$date = strtotime ($date);
|
||||
|
@ -1345,7 +1348,8 @@ function events_get_agent ($id_agent, $period, $date = 0,
|
|||
$sql_where .= sprintf(' AND id_agente = %d AND utimestamp > %d
|
||||
AND utimestamp <= %d ', $id_agent, $datelimit, $date);
|
||||
|
||||
return events_get_events_grouped($sql_where, 0, 1000, is_metaconsole());
|
||||
return events_get_events_grouped($sql_where, 0, 1000,
|
||||
is_metaconsole(), false, false, $history);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1359,7 +1363,9 @@ function events_get_agent ($id_agent, $period, $date = 0,
|
|||
*
|
||||
* @return array An array with all the events happened.
|
||||
*/
|
||||
function events_get_module ($id_agent_module, $period, $date = 0) {
|
||||
function events_get_module ($id_agent_module, $period, $date = 0, $history = false) {
|
||||
global $config;
|
||||
|
||||
if (!is_numeric ($date)) {
|
||||
$date = strtotime ($date);
|
||||
}
|
||||
|
@ -1372,7 +1378,8 @@ function events_get_module ($id_agent_module, $period, $date = 0) {
|
|||
$sql_where = sprintf(' AND id_agentmodule = %d AND utimestamp > %d
|
||||
AND utimestamp <= %d ', $id_agent_module, $datelimit, $date);
|
||||
|
||||
return events_get_events_grouped($sql_where, 0, 1000);
|
||||
return events_get_events_grouped($sql_where, 0, 1000, false,
|
||||
false, false, $history);
|
||||
|
||||
$sql = sprintf ('SELECT evento, event_type, criticity, count(*) as count_rep, max(timestamp) AS time2
|
||||
FROM tevento
|
||||
|
|
|
@ -1227,6 +1227,10 @@ function reporting_event_report_group($report, $content,
|
|||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$history = false;
|
||||
if ($config['history_event_enabled'])
|
||||
$history = true;
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = groups_get_name($content['id_group'], true);
|
||||
if (!empty($content['style']['event_filter_search'])) {
|
||||
|
@ -1252,7 +1256,7 @@ function reporting_event_report_group($report, $content,
|
|||
$content['id_group'], $content['period'], $report["datetime"],
|
||||
true, true, $filter_event_validated, $filter_event_critical,
|
||||
$filter_event_warning, $filter_event_no_validated,
|
||||
$filter_event_filter_search, 'hash');
|
||||
$filter_event_filter_search, 'hash', $history);
|
||||
|
||||
if (empty($data)) {
|
||||
$return['failed'] = __('No events');
|
||||
|
@ -2142,6 +2146,9 @@ function reporting_event_report_agent($report, $content,
|
|||
$content['name'] = __('Event Report Agent');
|
||||
}
|
||||
|
||||
$history = false;
|
||||
if ($config['history_event_enabled'])
|
||||
$history = true;
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = agents_get_name($content['id_agent']);
|
||||
|
@ -2169,7 +2176,8 @@ function reporting_event_report_agent($report, $content,
|
|||
$filter_event_critical,
|
||||
$filter_event_warning,
|
||||
$filter_event_no_validated,
|
||||
true);
|
||||
true,
|
||||
$history);
|
||||
|
||||
|
||||
|
||||
|
@ -5612,7 +5620,7 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
|||
$date = 0, $return = false, $html = true,
|
||||
$filter_event_validated = false, $filter_event_critical = false,
|
||||
$filter_event_warning = false, $filter_event_no_validated = false,
|
||||
$filter_event_filter_search = null, $return_type = false) {
|
||||
$filter_event_filter_search = null, $return_type = false, $history = false) {
|
||||
|
||||
global $config;
|
||||
|
||||
|
@ -5644,7 +5652,7 @@ function reporting_get_group_detailed_event ($id_group, $period = 0,
|
|||
$events = events_get_group_events($id_group, $period, $date,
|
||||
$filter_event_validated, $filter_event_critical,
|
||||
$filter_event_warning, $filter_event_no_validated,
|
||||
$filter_event_filter_search);
|
||||
$filter_event_filter_search, false, $history);
|
||||
|
||||
if ($return_type === 'hash') {
|
||||
return $events;
|
||||
|
@ -5750,11 +5758,14 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
|
|||
$date = get_system_time ();
|
||||
}
|
||||
|
||||
$history = false;
|
||||
if ($config['history_event_enabled'])
|
||||
$history = true;
|
||||
|
||||
$events = array ();
|
||||
|
||||
foreach ($id_modules as $id_module) {
|
||||
$event = events_get_module ($id_module, (int) $period, (int) $date);
|
||||
$event = events_get_module ($id_module, (int) $period, (int) $date, $history);
|
||||
if (!empty ($event)) {
|
||||
array_push ($events, $event);
|
||||
}
|
||||
|
@ -5837,7 +5848,7 @@ function reporting_get_module_detailed_event ($id_modules, $period = 0,
|
|||
function reporting_get_agents_detailed_event ($id_agents, $period = 0,
|
||||
$date = 0, $return = false, $filter_event_validated = false,
|
||||
$filter_event_critical = false, $filter_event_warning = false,
|
||||
$filter_event_no_validated = false, $only_data = false) {
|
||||
$filter_event_no_validated = false, $only_data = false, $history = false) {
|
||||
|
||||
global $config;
|
||||
|
||||
|
@ -5863,7 +5874,8 @@ function reporting_get_agents_detailed_event ($id_agents, $period = 0,
|
|||
(int)$period,
|
||||
(int)$date,
|
||||
$filter_event_validated, $filter_event_critical,
|
||||
$filter_event_warning, $filter_event_no_validated);
|
||||
$filter_event_warning, $filter_event_no_validated,
|
||||
$history);
|
||||
|
||||
if (empty($event)) {
|
||||
$event = array();
|
||||
|
|
|
@ -3649,12 +3649,21 @@ function ui_print_module_string_value($value, $id_agente_module,
|
|||
"id=" . $id_agente_module .
|
||||
"&refr=" . $current_interval .
|
||||
"&label=" . rawurlencode(urlencode(io_safe_output($module_name))) . "','" . $win_handle . "', 700,480)";
|
||||
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image("images/photo.png", true,
|
||||
array("border" => '0',
|
||||
"alt" => "",
|
||||
"title" => __("Snapshot view"))) . '</a> ';
|
||||
if (is_image_data($value)) {
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image("images/photo.png", true,
|
||||
array("border" => '0',
|
||||
"alt" => "",
|
||||
"title" => __("Snapshot view"))) . '</a> ';
|
||||
}
|
||||
else {
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image("images/default_list.png", true,
|
||||
array("border" => '0',
|
||||
"alt" => "",
|
||||
"title" => __("Snapshot view"))) . '</a> ';
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '6.0SP4';
|
||||
$build = '161119';
|
||||
$build = '161129';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -548,12 +548,56 @@ class Modules {
|
|||
}
|
||||
}
|
||||
|
||||
$row[7] = $row[__('Data')] =
|
||||
'<span style="white-space: nowrap;">' .
|
||||
'<span style="display: none;" class="show_collapside">' . $row[__('Status')] . ' </span>' .
|
||||
'<a data-ajax="false" class="ui-link" ' .
|
||||
'href="index.php?page=module_graph&id=' . $module['id_agente_modulo'] . '&id_agent=' . $this->id_agent . '">' .
|
||||
$output . '</a>' . '</span>';
|
||||
|
||||
$is_snapshot = is_snapshot_data($module["datos"]);
|
||||
|
||||
$handle = "snapshot" . "_" . $module["id_agente_modulo"];
|
||||
$url = 'include/procesos.php?agente=' . $module["id_agente_modulo"];
|
||||
|
||||
$link = "window.open('../operation/agentes/snapshot_view.php?" .
|
||||
"id=" . $module["id_agente_modulo"] .
|
||||
"&refr=" . $module["module_interval"]."','".$handle."','width=700, height=480')";
|
||||
|
||||
if ($is_snapshot) {
|
||||
|
||||
if (is_image_data($module["datos"])) {
|
||||
$row[7] = $row[__('Data')] = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image("images/photo.png", true,
|
||||
array("border" => '0',
|
||||
"alt" => "",
|
||||
"title" => __("Snapshot view"))) . '</a> ';
|
||||
}
|
||||
else {
|
||||
$row[7] = $row[__('Data')] = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image("images/default_list.png", true,
|
||||
array("border" => '0',
|
||||
"alt" => "",
|
||||
"title" => __("Snapshot view"))) . '</a> ';
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
||||
$row[7] = $row[__('Data')] = '<span style="white-space: nowrap;">' .
|
||||
'<span style="display: none;" class="show_collapside">' .
|
||||
$row[__('Status')] . ' </span>' .
|
||||
'<a data-ajax="false" class="ui-link" ' .
|
||||
'href="index.php?page=module_graph&id=' .
|
||||
$module['id_agente_modulo'] . '&id_agent=' .
|
||||
$this->id_agent . '">' . $output . '</a>' . '</span>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
'<span style="white-space: nowrap;">' .
|
||||
'<span style="display: none;" class="show_collapside">' .
|
||||
$row[__('Status')] . ' </span>' .
|
||||
'<a data-ajax="false" class="ui-link" ' .
|
||||
'href="index.php?page=module_graph&id=' .
|
||||
$module['id_agente_modulo'] . '&id_agent=' .
|
||||
$this->id_agent . '">' . $output . '</a>' . '</span>';*/
|
||||
|
||||
if (!$ajax) {
|
||||
if ($this->columns['agent']) {
|
||||
|
|
|
@ -72,8 +72,10 @@ $label = get_parameter ("label");
|
|||
echo '<img src="' . $datos . '" alt="image"/>';
|
||||
}
|
||||
else {
|
||||
$datos = preg_replace ('/</', '<', $datos);
|
||||
$datos = preg_replace ('/>/', '>', $datos);
|
||||
$datos = preg_replace ('/\n/i','<br>',$datos);
|
||||
$datos = preg_replace ('/\s/i',' ',$datos);
|
||||
$datos = preg_replace ('/\s/i',' ',$datos);
|
||||
echo "<div id='result_div' style='width: 100%; height: 100%; overflow: scroll; padding: 10px; font-size: 14px; line-height: 16px; font-family: mono,monospace; text-align: left'>";
|
||||
echo $datos;
|
||||
echo "</div>";
|
||||
|
|
|
@ -1347,19 +1347,21 @@ if (!empty($result)) {
|
|||
$link = "winopeng_var('$row[datos]','',700,480)";
|
||||
|
||||
}
|
||||
if(!is_snapshot_data($row['datos'])){
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image('images/default_list.png', true,
|
||||
array('border' => '0',
|
||||
|
||||
if(!is_image_data($row['datos'])){
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image('images/default_list.png', true,
|
||||
array('border' => '0',
|
||||
'alt' => '',
|
||||
'title' => __('Snapshot view'))) . '</a> ';
|
||||
}else{
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image('images/photo.png', true,
|
||||
array('border' => '0',
|
||||
'alt' => '',
|
||||
'title' => __('Snapshot view'))) . '</a> ';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$salida = '<a href="javascript:' . $link . '">' .
|
||||
html_print_image('images/photo.png', true,
|
||||
array('border' => '0',
|
||||
'alt' => '',
|
||||
'title' => __('Snapshot view'))) . '</a> ';
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
|
|
|
@ -156,8 +156,30 @@ if (is_ajax ()) {
|
|||
AND t1.id_grupo IN (' . $group_id_list .')
|
||||
AND t2.nombre IN (\'' . implode('\',\'', $nameModules) . '\')';
|
||||
|
||||
// Status selector
|
||||
if ($status_modulo == AGENT_MODULE_STATUS_NORMAL) { //Normal
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0)
|
||||
OR (t1.id_tipo_modulo IN(21,22,23,100))) ';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_CRITICAL_BAD) { //Critical
|
||||
$sql_conditions .= ' estado = 1 AND utimestamp > 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_WARNING) { //Warning
|
||||
$sql_conditions .= ' estado = 2 AND utimestamp > 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_NOT_NORMAL) { //Not normal
|
||||
$sql_conditions .= ' estado <> 0';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_UNKNOWN) { //Unknown
|
||||
$sql_conditions .= ' estado = 3 AND utimestamp <> 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_NOT_INIT) { //Not init
|
||||
$sql_conditions .= ' utimestamp = 0 )
|
||||
AND t1.id_tipo_modulo NOT IN (21,22,23,100)';
|
||||
}
|
||||
|
||||
if ($status_modulo != -1) {
|
||||
$sql .= ' AND t2.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = ' . $status_modulo . ') ';
|
||||
$filter .= ' AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where ' . $sql_conditions;
|
||||
}
|
||||
|
||||
if ($selection_mode == 'common') {
|
||||
|
@ -267,10 +289,31 @@ if (is_ajax ()) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($status_modulo != -1) {
|
||||
$filter .= ' AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where estado = ' . $status_modulo . ')';
|
||||
// Status selector
|
||||
if ($status_modulo == AGENT_MODULE_STATUS_NORMAL) { //Normal
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0 )
|
||||
OR (t1.id_tipo_modulo IN(21,22,23,100)) ';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_CRITICAL_BAD) { //Critical
|
||||
$sql_conditions .= ' estado = 1 AND utimestamp > 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_WARNING) { //Warning
|
||||
$sql_conditions .= ' estado = 2 AND utimestamp > 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_NOT_NORMAL) { //Not normal
|
||||
$sql_conditions .= ' estado <> 0)';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_UNKNOWN) { //Unknown
|
||||
$sql_conditions .= ' estado = 3 AND utimestamp <> 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_NOT_INIT) { //Not init
|
||||
$sql_conditions .= ' utimestamp = 0 )
|
||||
AND t1.id_tipo_modulo NOT IN (21,22,23,100)';
|
||||
}
|
||||
|
||||
if ($status_modulo != -1) {
|
||||
$filter .= ' AND t1.id_agente_modulo IN (SELECT id_agente_modulo FROM tagente_estado where ' . $sql_conditions;
|
||||
}
|
||||
|
||||
if (is_metaconsole()) {
|
||||
$result = array();
|
||||
|
@ -466,8 +509,30 @@ HAVING count(nombre) = (SELECT count(nombre) FROM tagente_modulo))';
|
|||
if (empty($filter))
|
||||
$filter = false;
|
||||
|
||||
// Status selector
|
||||
if ($status_modulo == AGENT_MODULE_STATUS_NORMAL) { //Normal
|
||||
$sql_conditions .= ' estado = 0 AND utimestamp > 0 )
|
||||
OR (tagente_modulo.id_tipo_modulo IN(21,22,23,100)) ';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_CRITICAL_BAD) { //Critical
|
||||
$sql_conditions .= ' estado = 1 AND utimestamp > 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_WARNING) { //Warning
|
||||
$sql_conditions .= ' estado = 2 AND utimestamp > 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_NOT_NORMAL) { //Not normal
|
||||
$sql_conditions .= ' estado <> 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_UNKNOWN) { //Unknown
|
||||
$sql_conditions .= ' estado = 3 AND utimestamp <> 0 )';
|
||||
}
|
||||
elseif ($status_modulo == AGENT_MODULE_STATUS_NOT_INIT) { //Not init
|
||||
$sql_conditions .= ' utimestamp = 0 )
|
||||
AND tagente_modulo.id_tipo_modulo NOT IN (21,22,23,100)';
|
||||
}
|
||||
|
||||
if ($status_modulo != -1) {
|
||||
$filter['id_agente_modulo IN'] = ' (SELECT id_agente_modulo FROM tagente_estado where estado = '.$status_modulo.') ';
|
||||
$filter['id_agente_modulo IN'] = ' (SELECT id_agente_modulo FROM tagente_estado where ' . $sql_conditions;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0SP4
|
||||
%define release 161119
|
||||
%define release 161129
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0SP4
|
||||
%define release 161119
|
||||
%define release 161129
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -65,7 +65,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
|
|||
INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
|
||||
INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
|
||||
INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.0SP4');
|
||||
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD161119');
|
||||
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD161129');
|
||||
INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
|
||||
INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
|
||||
INSERT INTO tconfig (token, value) VALUES ('style','pandora');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 6.0SP4-161119
|
||||
Version: 6.0SP4-161129
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: admin
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
pandora_version="6.0SP4-161119"
|
||||
pandora_version="6.0SP4-161129"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -503,6 +503,9 @@ console_pass pandora
|
|||
# Passphrase used to generate the key for password encryption (PANDORA FMS ENTERPRISE ONLY).
|
||||
#encryption_passphrase passphrase
|
||||
|
||||
# Enable (1) or disable (0) events related to the unknown module status.
|
||||
unknown_events 1
|
||||
|
||||
# Time interval (as a multiple of the module interval) before a module becomes unknown. Twice the module's interval by default.
|
||||
#unknown_interval 2
|
||||
|
||||
|
|
|
@ -310,6 +310,9 @@ console_pass pandora
|
|||
# Passphrase used to generate the key for password encryption (PANDORA FMS ENTERPRISE ONLY).
|
||||
#encryption_passphrase passphrase
|
||||
|
||||
# Enable (1) or disable (0) events related to the unknown module status.
|
||||
unknown_events 1
|
||||
|
||||
# Time interval (as a multiple of the module interval) before a module becomes unknown. Twice the module's interval by default.
|
||||
#unknown_interval 2
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "6.0SP4";
|
||||
my $pandora_build = "161119";
|
||||
my $pandora_build = "161129";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
@ -416,6 +416,9 @@ sub pandora_load_config {
|
|||
# External .enc files for XML::Parser.
|
||||
$pa_config->{"enc_dir"} = ""; # > 6.0SP4
|
||||
|
||||
# Enable (1) or disable (0) events related to the unknown status.
|
||||
$pa_config->{"unknown_events"} = 1; # > 6.0SP4
|
||||
|
||||
# Check for UID0
|
||||
if ($pa_config->{"quiet"} != 0){
|
||||
if ($> == 0){
|
||||
|
@ -919,6 +922,9 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^enc_dir\s+(.*)/i) {
|
||||
$pa_config->{'enc_dir'} = clean_blank($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^unknown_events\s+([0-1])/i) {
|
||||
$pa_config->{'unknown_events'} = clean_blank($1);
|
||||
}
|
||||
} # end of loop for parameter #
|
||||
|
||||
# Set to RDBMS' standard port
|
||||
|
|
|
@ -3810,6 +3810,11 @@ sub generate_status_event ($$$$$$$$) {
|
|||
pandora_event ($pa_config, "Warmup mode for events ended.", 0, 0, 0, 0, 0, 'system', 0, $dbh);
|
||||
}
|
||||
|
||||
# Disable events related to the unknown status.
|
||||
if ($pa_config->{'unknown_events'} == 0 && ($last_status == 3 || $status == 3)) {
|
||||
return;
|
||||
}
|
||||
|
||||
# disable event just recovering from 'Unknown' without status change
|
||||
if($last_status == 3 && $status == $last_known_status && $module->{'disabled_types_event'} ) {
|
||||
my $disabled_types_event;
|
||||
|
@ -4228,6 +4233,13 @@ sub pandora_process_event_replication ($) {
|
|||
logger($pa_config, "Starting replication events process.", 1);
|
||||
|
||||
while(1) {
|
||||
|
||||
# If we are not the master server sleep and check again.
|
||||
if (pandora_is_master($pa_config) == 0) {
|
||||
sleep ($pa_config->{'server_threshold'});
|
||||
next;
|
||||
}
|
||||
|
||||
# Check the queue each N seconds
|
||||
sleep ($replication_interval);
|
||||
enterprise_hook('pandora_replicate_copy_events',[$pa_config, $dbh, $dbh_metaconsole, $metaconsole_server_id, $replication_mode]);
|
||||
|
@ -4252,6 +4264,13 @@ sub pandora_process_policy_queue ($) {
|
|||
logger($pa_config, "Starting policy queue patrol process.", 1);
|
||||
|
||||
while(1) {
|
||||
|
||||
# If we are not the master server sleep and check again.
|
||||
if (pandora_is_master($pa_config) == 0) {
|
||||
sleep ($pa_config->{'server_threshold'});
|
||||
next;
|
||||
}
|
||||
|
||||
# Check the queue each 5 seconds
|
||||
sleep (5);
|
||||
|
||||
|
@ -4590,8 +4609,11 @@ sub pandora_module_unknown ($$) {
|
|||
load_module_macros ($module->{'module_macros'}, \%macros);
|
||||
$description = subst_alert_macros ($description, \%macros, $pa_config, $dbh, $agent, $module);
|
||||
|
||||
pandora_event ($pa_config, $description, $agent->{'id_grupo'}, $module->{'id_agente'},
|
||||
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, 'Pandora', '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
|
||||
# Are unknown events enabled?
|
||||
if ($pa_config->{'unknown_events'} == 1) {
|
||||
pandora_event ($pa_config, $description, $agent->{'id_grupo'}, $module->{'id_agente'},
|
||||
$severity, 0, $module->{'id_agente_modulo'}, $event_type, 0, $dbh, 'Pandora', '', '', '', '', $module->{'critical_instructions'}, $module->{'warning_instructions'}, $module->{'unknown_instructions'});
|
||||
}
|
||||
}
|
||||
# Regular module
|
||||
else {
|
||||
|
@ -4617,8 +4639,12 @@ sub pandora_module_unknown ($$) {
|
|||
logger($pa_config, "Alerts inhibited for agent '" . $agent->{'nombre'} . "'.", 10);
|
||||
}
|
||||
|
||||
my $do_event = 0;
|
||||
if (!defined($module->{'disabled_types_event'}) || $module->{'disabled_types_event'} eq "") {
|
||||
my $do_event;
|
||||
# Are unknown events enabled?
|
||||
if ($pa_config->{'unknown_events'} == 0) {
|
||||
$do_event = 0;
|
||||
}
|
||||
elsif (!defined($module->{'disabled_types_event'}) || $module->{'disabled_types_event'} eq "") {
|
||||
$do_event = 1;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0SP4
|
||||
%define release 161119
|
||||
%define release 161129
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0SP4
|
||||
%define release 161119
|
||||
%define release 161129
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# **********************************************************************
|
||||
|
||||
PI_VERSION="6.0SP4"
|
||||
PI_BUILD="161119"
|
||||
PI_BUILD="161129"
|
||||
|
||||
MODE=$1
|
||||
if [ $# -gt 1 ]; then
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0SP4 PS161119";
|
||||
my $version = "6.0SP4 PS161129";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
|
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0SP4 PS161119";
|
||||
my $version = "6.0SP4 PS161129";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
|
@ -78,7 +78,7 @@ TENTACLE_USER="pandora"
|
|||
TENTACLE_ADDR="0.0.0.0"
|
||||
TENTACLE_PORT="41121"
|
||||
TENTACLE_EXT_OPTS="-i.*\.conf:conf;.*\.md5:md5;.*\.zip:collections"
|
||||
TENTACLE_LOG_FILE="/var/log/pandora/tentacle_server.log"
|
||||
TENTACLE_LOG_FILE="/dev/null"
|
||||
|
||||
# Set umask to 0002, because group MUST have access to write files to
|
||||
# use remote file management on Pandora FMS Enterprise.
|
||||
|
|
Loading…
Reference in New Issue