Merge remote-tracking branch 'origin/develop' into features/oracle
Conflicts resolved: pandora_console/extensions/module_groups.php pandora_console/godmode/reporting/graph_builder.graph_editor.php pandora_console/operation/events/events_list.php
This commit is contained in:
commit
d7801c2933
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-agent-unix
|
||||
Version: 6.0dev-150519
|
||||
Version: 6.0dev-150526
|
||||
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.0dev-150519"
|
||||
pandora_version="6.0dev-150526"
|
||||
|
||||
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.0dev';
|
||||
use constant AGENT_BUILD => '150519';
|
||||
use constant AGENT_BUILD => '150526';
|
||||
|
||||
# Commands to retrieve total memory information in kB
|
||||
use constant TOTALMEMORY_CMDS => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150519
|
||||
%define release 150526
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_agent_unix
|
||||
%define version 6.0dev
|
||||
%define release 150519
|
||||
%define release 150526
|
||||
|
||||
Summary: Pandora FMS Linux agent, PERL version
|
||||
Name: %{name}
|
||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||
{}
|
||||
|
||||
Version
|
||||
{150519}
|
||||
{150526}
|
||||
|
||||
ViewReadme
|
||||
{Yes}
|
||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||
using namespace Pandora_Strutils;
|
||||
|
||||
#define PATH_SIZE _MAX_PATH+1
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150519)")
|
||||
#define PANDORA_VERSION ("6.0dev(Build 150526)")
|
||||
|
||||
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.0dev(Build 150519))"
|
||||
VALUE "ProductVersion", "(6.0dev(Build 150526))"
|
||||
VALUE "FileVersion", "1.0.0.0"
|
||||
END
|
||||
END
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-console
|
||||
Version: 6.0dev-150519
|
||||
Version: 6.0dev-150526
|
||||
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.0dev-150519"
|
||||
pandora_version="6.0dev-150526"
|
||||
|
||||
package_pear=0
|
||||
package_pandora=1
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -47,6 +47,7 @@ config_check();
|
|||
</td>
|
||||
<td style="min-width:200px;">
|
||||
<?php
|
||||
$table = new stdClass();
|
||||
$table->id = "header_table";
|
||||
$table->class = "none";
|
||||
$table->cellpadding = 0;
|
||||
|
|
|
@ -49,6 +49,7 @@ if (tags_has_user_acl_tags()) {
|
|||
// Overview Table
|
||||
///////////////
|
||||
|
||||
$table = new stdClass();
|
||||
$table->class = "databox";
|
||||
$table->cellpadding = 4;
|
||||
$table->cellspacing = 4;
|
||||
|
@ -154,6 +155,7 @@ if (tags_has_user_acl_tags()) {
|
|||
// Show last activity from this user
|
||||
echo '<div id="activity">';
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%'; //Don't specify px
|
||||
$table->data = array ();
|
||||
$table->size = array ();
|
||||
|
|
|
@ -46,7 +46,7 @@ if ($editGraph) {
|
|||
WHERE t2.id_agente_modulo = t1.id_agent_module))
|
||||
AS agent_name
|
||||
FROM tgraph_source t1
|
||||
WHERE t1.id_graph = " . $id);
|
||||
WHERE t1.id_graph = " . $id_graph);
|
||||
$module_array = array();
|
||||
$weight_array = array();
|
||||
$agent_array = array();
|
||||
|
@ -62,7 +62,7 @@ if ($editGraph) {
|
|||
$agent_array[] = $graphRow['agent_name'];
|
||||
}
|
||||
|
||||
$graphInTgraph = db_get_row_sql("SELECT * FROM tgraph WHERE id_graph = " . $id);
|
||||
$graphInTgraph = db_get_row_sql("SELECT * FROM tgraph WHERE id_graph = " . $id_graph);
|
||||
$stacked = $graphInTgraph['stacked'];
|
||||
$period = $graphInTgraph['period'];
|
||||
$width = $graphInTgraph['width'];
|
||||
|
@ -98,7 +98,7 @@ if(count($module_array) > 0){
|
|||
echo "<td class='$tdcolor' align='center'>";
|
||||
echo "<table><tr>";
|
||||
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&id=". $id ."&graph=" . $idgs_array[$a] . "'>";
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&change_weight=1&id=". $id_graph ."&graph=" . $idgs_array[$a] . "'>";
|
||||
html_print_input_text ('weight', $weight_array[$a], '', 20, 10, false, false);
|
||||
html_print_submit_button ('Ok', 'btn', false, '', false);
|
||||
echo "</form>";
|
||||
|
@ -106,7 +106,7 @@ if(count($module_array) > 0){
|
|||
echo "</tr></table>";
|
||||
echo "</td>";
|
||||
echo "<td class='$tdcolor' align='center'>";
|
||||
echo "<a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=". $id ."&delete=" . $idgs_array[$a] . "'>".html_print_image('images/cross.png', true, array ('title' => __('Delete')))."</a>";
|
||||
echo "<a href='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&tab=graph_editor&delete_module=1&id=". $id_graph ."&delete=" . $idgs_array[$a] . "'>".html_print_image('images/cross.png', true, array ('title' => __('Delete')))."</a>";
|
||||
|
||||
echo "</td></tr>";
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ if(count($module_array) > 0){
|
|||
//Configuration form
|
||||
|
||||
echo '<span id ="none_text" style="display: none;">' . __('None') . '</span>';
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=" . $id . "'>";
|
||||
echo "<form method='post' action='index.php?sec=reporting&sec2=godmode/reporting/graph_builder&tab=graph_editor&add_module=1&edit_graph=1&id=" . $id_graph . "'>";
|
||||
|
||||
echo "<table width='98%' cellpadding='4' cellpadding='4' class='databox_color'>";
|
||||
echo "<tr>";
|
||||
|
|
|
@ -134,8 +134,9 @@ if ($multiple_delete) {
|
|||
$graphs = custom_graphs_get_user ($config['id_user'], false, true, "RR");
|
||||
|
||||
if (!empty ($graphs)) {
|
||||
$table = new stdClass();
|
||||
$table->width = '98%';
|
||||
$tale->class = 'databox_frame';
|
||||
$table->class = 'databox_frame';
|
||||
$table->align = array ();
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Graph name');
|
||||
|
|
28
pandora_console/godmode/reporting/reporting_builder.item_editor.php
Normal file → Executable file
28
pandora_console/godmode/reporting/reporting_builder.item_editor.php
Normal file → Executable file
|
@ -550,7 +550,7 @@ else
|
|||
html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', '');
|
||||
}
|
||||
else {
|
||||
$report_type = reports_get_report_types($type);
|
||||
$report_type = reports_get_report_types();
|
||||
if (!empty($report_type) and isset($report_type[$type]['name']))
|
||||
echo $report_type[$type]['name'];
|
||||
else
|
||||
|
@ -2312,6 +2312,7 @@ function chooseType() {
|
|||
$("#row_period").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_group").show();
|
||||
$("#row_servers").show();
|
||||
break;
|
||||
case 'alert_report_agent':
|
||||
$("#row_description").show();
|
||||
|
@ -2424,11 +2425,11 @@ function chooseType() {
|
|||
$("#row_module_multi").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
$("#row_servers").show();
|
||||
$("#id_agents").change(agent_changed_by_multiple_agents_inventory);
|
||||
$("#id_agents").change(event_change_id_agent_inventory);
|
||||
$("#id_agents").trigger('change');
|
||||
|
||||
$("#combo_group").change(function() {
|
||||
updateAgents($(this).val());
|
||||
updateAgents($(this).val(), <?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
|
||||
break;
|
||||
|
@ -2440,27 +2441,27 @@ function chooseType() {
|
|||
$("#row_date").show();
|
||||
$("#row_show_in_two_columns").show();
|
||||
|
||||
$("#id_agents").change(agent_changed_by_multiple_agents_inventory);
|
||||
$("#id_agents").change(event_change_id_agent_inventory);
|
||||
$("#id_agents").trigger('change');
|
||||
|
||||
$("#row_servers").show();
|
||||
|
||||
$("#combo_group").change(function() {
|
||||
$('#hidden-date_selected').val('');
|
||||
updateInventoryDates();
|
||||
updateAgents($(this).val());
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
updateAgents($(this).val(), <?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
$("#id_agents").change(function() {
|
||||
$('#hidden-date_selected').val('');
|
||||
updateInventoryDates();
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
$("#inventory_modules").change(function() {
|
||||
$('#hidden-date_selected').val('');
|
||||
updateInventoryDates();
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
});
|
||||
|
||||
if (!$("#hidden-date_selected").val())
|
||||
updateInventoryDates();
|
||||
updateInventoryDates(<?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>);
|
||||
break;
|
||||
case 'inventory_changes':
|
||||
break;
|
||||
|
@ -2469,6 +2470,7 @@ function chooseType() {
|
|||
break;
|
||||
case 'group_configuration':
|
||||
$("#row_group").show();
|
||||
$("#row_servers").show();
|
||||
break;
|
||||
case 'netflow_area':
|
||||
$("#row_netflow_filter").show();
|
||||
|
@ -2512,6 +2514,14 @@ function chooseType() {
|
|||
}
|
||||
}
|
||||
|
||||
function event_change_id_agent_inventory() {
|
||||
agent_changed_by_multiple_agents_inventory(
|
||||
{"data" : {"homedir" : <?php echo '"' . ui_get_full_url(false, false, false, false) . '"'; ?>}},
|
||||
null,
|
||||
null,
|
||||
$("#combo_server").val());
|
||||
}
|
||||
|
||||
function set_last_value_period() {
|
||||
var checked = $("input[name='last_value']").prop("checked");
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ if (!defined("METACONSOLE"))
|
|||
"id" => 'image_form_filter')) . '</a>';
|
||||
|
||||
if (!defined("METACONSOLE")){
|
||||
$table = null;
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->data[0][0] = __('Agents');
|
||||
$table->data[0][1] = html_print_select($agents, 'agent_filter', $agentFilter, '', __('All'), 0, true);
|
||||
|
@ -460,7 +460,7 @@ if (defined("METACONSOLE")){
|
|||
echo "</div>";
|
||||
echo "</form>";
|
||||
}
|
||||
$table = null;
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->colspan[0][0] = 3;
|
||||
$table->size = array();
|
||||
|
@ -491,7 +491,7 @@ echo "<form action='index.php?sec=reporting&sec2=godmode/reporting/reporting_bui
|
|||
html_print_table($table);
|
||||
echo "</form>";
|
||||
|
||||
$table = null;
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->colspan[0][0] = 3;
|
||||
$table->size = array();
|
||||
|
|
|
@ -41,6 +41,7 @@ switch ($action) {
|
|||
break;
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '98%';
|
||||
$table->id = 'add_alert_table';
|
||||
$table->class = 'databox';
|
||||
|
|
|
@ -369,6 +369,7 @@ switch ($action) {
|
|||
$search_name = "%$search%' OR description LIKE '%$search%";
|
||||
}
|
||||
|
||||
$table_aux = new stdClass();
|
||||
$table_aux->width = '100%';
|
||||
$table_aux->class = 'databox filters';
|
||||
$table_aux->cellpadding = 0;
|
||||
|
@ -462,6 +463,7 @@ switch ($action) {
|
|||
'id_group',
|
||||
'non_interactive'), $return_all_group, 'RR', $group, $strict_user);
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '0px';
|
||||
if (sizeof ($reports)) {
|
||||
$table->id = 'report_list';
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC150519';
|
||||
$build_version = 'PC150526';
|
||||
$pandora_version = 'v6.0dev';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -1458,7 +1458,7 @@ function config_check () {
|
|||
}
|
||||
if ($_SESSION['new_update'] == 'new') {
|
||||
set_pandora_error_for_header(
|
||||
__('There is a new update please go to menu Administration and into extensions <a style="font-weight:bold;" href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">go to Update Manager</a> for more details.'),
|
||||
__('There is a new update available. Please<a style="font-weight:bold;" href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online"> go to Administration:Setup:Update Manager</a> for more details.'),
|
||||
__("New update of Pandora Console"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -481,9 +481,10 @@ function events_change_owner ($id_event, $new_owner = false, $force = false, $me
|
|||
}
|
||||
|
||||
// If no new_owner is provided, the current user will be the owner
|
||||
if (empty($new_owner)) {
|
||||
$new_owner = $config['id_user'];
|
||||
}
|
||||
// ** Comment this lines because if possible selected None owner in owner event. TIQUET: #2250***
|
||||
//if (empty($new_owner)) {
|
||||
// $new_owner = $config['id_user'];
|
||||
//}
|
||||
|
||||
// Only generate comment when is forced (sometimes is changed the owner when comment)
|
||||
if ($force) {
|
||||
|
@ -849,10 +850,11 @@ function events_print_event_table ($filter = "", $limit = 10, $width = 440, $ret
|
|||
$returned = ui_print_info_message ( __('No events'),'',true );
|
||||
return $returned;
|
||||
}
|
||||
else
|
||||
else
|
||||
echo ui_print_info_message ( __('No events') );
|
||||
}
|
||||
else {
|
||||
$table = new stdClass();
|
||||
$table->id = 'latest_events_table';
|
||||
$table->cellpadding = 0;
|
||||
$table->cellspacing = 0;
|
||||
|
@ -1182,7 +1184,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) {
|
||||
$filter_event_search = false, $meta = false) {
|
||||
|
||||
global $config;
|
||||
|
||||
|
@ -1224,7 +1226,7 @@ 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);
|
||||
return events_get_events_grouped($sql_where, 0, 1000, $meta);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1565,7 +1567,8 @@ function events_check_event_filter_group ($id_filter) {
|
|||
function events_get_macros() {
|
||||
return array('_agent_address_' => __('Agent address'),
|
||||
'_agent_id_' => __('Agent id'),
|
||||
'_event_id_' => __('Event id'));
|
||||
'_event_id_' => __('Event id'),
|
||||
'_module_address_' => __('Module Agent address'),);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1843,7 +1846,7 @@ function events_get_response_target($event_id, $response_id, $server_id, $histor
|
|||
$subst = '';
|
||||
switch($macro) {
|
||||
case '_agent_address_':
|
||||
if($meta) {
|
||||
if ($meta) {
|
||||
$server = metaconsole_get_connection_by_id ($server_id);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
@ -1860,6 +1863,20 @@ function events_get_response_target($event_id, $response_id, $server_id, $histor
|
|||
case '_event_id_':
|
||||
$subst = $event['id_evento'];
|
||||
break;
|
||||
case '_module_address_':
|
||||
if($meta) {
|
||||
$server = metaconsole_get_connection_by_id ($server_id);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$module = db_get_row("tagente_modulo",'id_agente_modulo', $event['id_agentmodule']);
|
||||
if ($module['ip_target'] != false)
|
||||
$subst = $module['ip_target'];
|
||||
|
||||
if($meta) {
|
||||
metaconsole_restore_db_force();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$target = str_replace($macro,$subst,$target);
|
||||
|
|
|
@ -1684,7 +1684,7 @@ function networkmap_get_types ($strict_user = false) {
|
|||
|
||||
$networkmap_types['topology'] = __('Create a new topology map');
|
||||
$networkmap_types['groups'] = __('Create a new group map');
|
||||
$networkmap_types['dinamic'] = __('Create a new dynamic map');
|
||||
$networkmap_types['dynamic'] = __('Create a new dynamic map');
|
||||
if (!$strict_user) {
|
||||
$networkmap_types['radial_dynamic'] = __('Create a new radial dynamic map');
|
||||
}
|
||||
|
@ -1710,7 +1710,7 @@ function networkmap_get_filter_types ($strict_user = false) {
|
|||
|
||||
$networkmap_types['topology'] = __('Topology');
|
||||
$networkmap_types['groups'] = __('Group');
|
||||
$networkmap_types['dinamic'] = __('Dynamic');
|
||||
$networkmap_types['dynamic'] = __('Dynamic');
|
||||
if (!$strict_user) {
|
||||
$networkmap_types['radial_dynamic'] = __('Radial dynamic');
|
||||
}
|
||||
|
|
|
@ -1226,6 +1226,14 @@ function reporting_event_report_group($report, $content,
|
|||
$content['name'] = __('Event Report Group');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = groups_get_name($content['id_group'], true);
|
||||
if (!empty($content['style']['event_filter_search'])) {
|
||||
|
@ -1378,6 +1386,10 @@ function reporting_event_report_group($report, $content,
|
|||
$ttl);
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -1390,6 +1402,14 @@ function reporting_event_report_module($report, $content) {
|
|||
$content['name'] = __('Event Report Module');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = agents_get_name($content['id_agent']) .
|
||||
" - " .
|
||||
|
@ -1409,6 +1429,10 @@ function reporting_event_report_module($report, $content) {
|
|||
$return['data'] = $data;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -1421,6 +1445,14 @@ function reporting_inventory_changes($report, $content) {
|
|||
$content['name'] = __('Inventory Changes');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = agents_get_name($content['id_agent']);
|
||||
$return["description"] = $content["description"];
|
||||
|
@ -1447,6 +1479,10 @@ function reporting_inventory_changes($report, $content) {
|
|||
$return['data'] = $inventory_changes;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -1461,6 +1497,14 @@ function reporting_inventory($report, $content) {
|
|||
$content['name'] = __('Inventory');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return["description"] = $content["description"];
|
||||
$return["date"] = reporting_get_date_text($report, $content);
|
||||
|
@ -1486,6 +1530,10 @@ function reporting_inventory($report, $content) {
|
|||
$return['data'] = $inventory_data;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -1582,6 +1630,10 @@ function reporting_agent_module($report, $content) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -1987,6 +2039,8 @@ function reporting_exception($report, $content, $type = 'dinamic',
|
|||
function reporting_group_report($report, $content) {
|
||||
global $config;
|
||||
|
||||
$metaconsole_on = ($config['metaconsole'] == 1) && defined('METACONSOLE');
|
||||
|
||||
$return['type'] = 'group_report';
|
||||
|
||||
|
||||
|
@ -1994,6 +2048,14 @@ function reporting_group_report($report, $content) {
|
|||
$content['name'] = __('Group Report');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = groups_get_name($content['id_group'], true);
|
||||
$return["description"] = $content["description"];
|
||||
|
@ -2004,7 +2066,14 @@ function reporting_group_report($report, $content) {
|
|||
$events = events_get_group_events(
|
||||
$content['id_group'],
|
||||
$content['period'],
|
||||
$report['datetime']);
|
||||
$report['datetime'],
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
$metaconsole_on);
|
||||
|
||||
if (empty($events)) {
|
||||
$events = array();
|
||||
}
|
||||
|
@ -2012,6 +2081,10 @@ function reporting_group_report($report, $content) {
|
|||
|
||||
$return["data"]["group_stats"] = reporting_get_group_stats($content['id_group']);
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2027,6 +2100,14 @@ function reporting_event_report_agent($report, $content,
|
|||
$content['name'] = __('Event Report Agent');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = agents_get_name($content['id_agent']);
|
||||
$return["description"] = $content["description"];
|
||||
|
@ -2145,6 +2226,10 @@ function reporting_event_report_agent($report, $content,
|
|||
$ttl);
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2260,6 +2345,14 @@ function reporting_group_configuration($report, $content) {
|
|||
$content['name'] = __('Group configuration');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$group_name = groups_get_name($content['id_group'], true);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
|
@ -2289,6 +2382,10 @@ function reporting_group_configuration($report, $content) {
|
|||
$return['data'][] = $agent_report['data'];
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2401,6 +2498,14 @@ function reporting_alert_report_group($report, $content) {
|
|||
$content['name'] = __('Alert Report Group');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$group_name = groups_get_name($content['id_group'], true);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
|
@ -2503,6 +2608,10 @@ function reporting_alert_report_group($report, $content) {
|
|||
|
||||
$return['data'] = $data;
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2516,6 +2625,15 @@ function reporting_alert_report_agent($report, $content) {
|
|||
$content['name'] = __('Alert Report Agent');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$agent_name = agents_get_name($content['id_agent']);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
|
@ -2598,6 +2716,10 @@ function reporting_alert_report_agent($report, $content) {
|
|||
|
||||
$return['data'] = $data;
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2611,6 +2733,14 @@ function reporting_alert_report_module($report, $content) {
|
|||
$content['name'] = __('Alert Report Module');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$module_name = io_safe_output(
|
||||
modules_get_agentmodule_name($content['id_agent_module']));
|
||||
$agent_name = io_safe_output(
|
||||
|
@ -2691,6 +2821,10 @@ function reporting_alert_report_module($report, $content) {
|
|||
|
||||
$return['data'] = $data;
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2774,6 +2908,14 @@ function reporting_monitor_report($report, $content) {
|
|||
$return["description"] = $content["description"];
|
||||
$return["date"] = reporting_get_date_text($report, $content);
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$value = reporting_get_agentmodule_sla(
|
||||
$content['id_agent_module'],
|
||||
$content['period'],
|
||||
|
@ -2794,6 +2936,10 @@ function reporting_monitor_report($report, $content) {
|
|||
$return["data"]["fail"]["formated_value"] = (100 - $return["data"]["ok"]["formated_value"]);
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2887,6 +3033,14 @@ function reporting_simple_baseline_graph($report, $content,
|
|||
|
||||
global $config;
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['type'] = 'simple_baseline_graph';
|
||||
|
||||
if (empty($content['name'])) {
|
||||
|
@ -2928,13 +3082,18 @@ function reporting_simple_baseline_graph($report, $content,
|
|||
true,
|
||||
0,
|
||||
true,
|
||||
false,
|
||||
ui_get_full_url(false, false, false, false));
|
||||
$only_image,
|
||||
ui_get_full_url(false, false, false, false),
|
||||
$ttl);
|
||||
break;
|
||||
case 'data':
|
||||
break;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -2975,6 +3134,14 @@ function reporting_projection_graph($report, $content,
|
|||
|
||||
global $config;
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['type'] = 'projection_graph';
|
||||
|
||||
if (empty($content['name'])) {
|
||||
|
@ -3023,9 +3190,9 @@ function reporting_projection_graph($report, $content,
|
|||
0,
|
||||
0,
|
||||
$report["datetime"],
|
||||
true,
|
||||
$only_image,
|
||||
ui_get_full_url(false, false, false, false) . '/',
|
||||
1,
|
||||
$ttl,
|
||||
// Important parameter, this tell to graphic_combined_module function that is a projection graph
|
||||
$output_projection,
|
||||
$content['top_n_value']
|
||||
|
@ -3035,6 +3202,10 @@ function reporting_projection_graph($report, $content,
|
|||
break;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -3051,6 +3222,13 @@ function reporting_agent_configuration($report, $content) {
|
|||
$return["description"] = $content["description"];
|
||||
$return["date"] = reporting_get_date_text($report, $content);
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$sql = "
|
||||
SELECT *
|
||||
|
@ -3143,6 +3321,10 @@ function reporting_agent_configuration($report, $content) {
|
|||
|
||||
$return['data'] = $agent_configuration;
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -3207,6 +3389,14 @@ function reporting_value($report, $content, $type) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$module_name = io_safe_output(
|
||||
modules_get_agentmodule_name($content['id_agent_module']));
|
||||
$agent_name = io_safe_output(
|
||||
|
@ -3276,6 +3466,10 @@ function reporting_value($report, $content, $type) {
|
|||
'value' => $value,
|
||||
'formated_value' => $formated_value);
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -3348,6 +3542,14 @@ function reporting_sql($report, $content) {
|
|||
$return["description"] = $content["description"];
|
||||
$return["date"] = reporting_get_date_text();
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
if ($content['treport_custom_sql_id'] != 0) {
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
|
@ -3406,6 +3608,10 @@ function reporting_sql($report, $content) {
|
|||
$return['error'] = __('Illegal query: Due security restrictions, there are some tokens or words you cannot use: *, delete, drop, alter, modify, union, password, pass, insert or update.');
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -3888,6 +4094,14 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
|||
|
||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$graph = db_get_row ("tgraph", "id_graph", $content['id_gs']);
|
||||
|
||||
$return = array();
|
||||
|
@ -3939,12 +4153,17 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
|||
$graph["stacked"],
|
||||
$report["datetime"],
|
||||
$only_image,
|
||||
ui_get_full_url(false, false, false, false));
|
||||
ui_get_full_url(false, false, false, false),
|
||||
$ttl);
|
||||
break;
|
||||
case 'data':
|
||||
break;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -3953,6 +4172,16 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
|||
|
||||
global $config;
|
||||
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||
|
||||
|
||||
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
|
||||
$return = array();
|
||||
$return['type'] = 'simple_graph';
|
||||
|
||||
|
@ -3960,12 +4189,16 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
|||
$content['name'] = __('Simple graph');
|
||||
}
|
||||
|
||||
|
||||
|
||||
$module_name = io_safe_output(
|
||||
modules_get_agentmodule_name($content['id_agent_module']));
|
||||
$agent_name = io_safe_output(
|
||||
modules_get_agentmodule_agent_name ($content['id_agent_module']));
|
||||
|
||||
|
||||
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['subtitle'] = $agent_name . " - " . $module_name;
|
||||
$return["description"] = $content["description"];
|
||||
|
@ -4060,6 +4293,10 @@ function reporting_simple_graph($report, $content, $type = 'dinamic',
|
|||
break;
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
||||
return reporting_check_structure_content($return);
|
||||
}
|
||||
|
||||
|
@ -4698,7 +4935,7 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
|
|||
// -----------------------------------------------------------------
|
||||
if ($config["realtimestats"] == 0) {
|
||||
|
||||
if (!is_array($id_group)){
|
||||
if (!is_array($id_group)) {
|
||||
$my_group = $id_group;
|
||||
$id_group = array();
|
||||
$id_group[0] = $my_group;
|
||||
|
@ -7403,4 +7640,163 @@ function reporting_get_agentmodule_sla_array ($id_agent_module, $period = 0, $mi
|
|||
|
||||
return $data_colors;
|
||||
}
|
||||
|
||||
function reporting_get_stats_servers($tiny = true) {
|
||||
global $config;
|
||||
|
||||
$server_performance = servers_get_performance();
|
||||
|
||||
// Alerts table
|
||||
$table_srv = html_get_predefined_table();
|
||||
|
||||
$table_srv->style[0] = $table_srv->style[2] = 'text-align: right; padding: 5px;';
|
||||
$table_srv->style[1] = $table_srv->style[3] = 'text-align: left; padding: 5px;';
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["total_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = '<hr style="border: 0; height: 1px; background: #DDD">';
|
||||
$table_srv->colspan[count($table_srv->data)][0] = 4;
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/database.png', true, array('title' => __('Local modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_local_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
format_numeric($server_performance ["local_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
if ($tiny) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Remote modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_remote_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["remote_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
else {
|
||||
if (isset($server_performance ["total_network_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Network modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_network_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
format_numeric($server_performance["network_modules_rate"], 2) .
|
||||
'</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_plugin_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/plugin.png', true, array('title' => __('Plugin modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_plugin_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["plugin_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_prediction_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/chart_bar.png', true, array('title' => __('Prediction modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_prediction_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["prediction_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_wmi_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/wmi.png', true, array('title' => __('WMI modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_wmi_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["wmi_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_web_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/world.png', true, array('title' => __('Web modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' .
|
||||
format_numeric($server_performance ["total_web_modules"]) .
|
||||
'</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
format_numeric($server_performance ["web_modules_rate"], 2) .
|
||||
'</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = '<hr style="border: 0; height: 1px; background: #DDD">';
|
||||
$table_srv->colspan[count($table_srv->data)][0] = 4;
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$system_events = db_get_value_sql(
|
||||
'SELECT SQL_NO_CACHE COUNT(id_evento)
|
||||
FROM tevento');
|
||||
break;
|
||||
case "postgresql":
|
||||
case "oracle":
|
||||
$system_events = db_get_value_sql(
|
||||
'SELECT COUNT(id_evento)
|
||||
FROM tevento');
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/lightning_go.png', true,
|
||||
array('title' => __('Total events'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' .
|
||||
format_numeric($system_events) . '</span>';
|
||||
|
||||
$table_srv->colspan[count($table_srv->data)][1] = 3;
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
$output = '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Server performance') .
|
||||
'</legend>' .
|
||||
html_print_table($table_srv, true) . '</fieldset>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
?>
|
|
@ -101,6 +101,7 @@ function reporting_html_print_report($report, $mini = false) {
|
|||
|
||||
|
||||
foreach ($report['contents'] as $key => $item) {
|
||||
$table = new stdClass();
|
||||
$table->size = array ();
|
||||
$table->style = array ();
|
||||
$table->width = '98%';
|
||||
|
@ -987,6 +988,7 @@ function reporting_html_exception($table, $item) {
|
|||
function reporting_html_group_report($table, $item) {
|
||||
global $config;
|
||||
|
||||
|
||||
$table->colspan['group_report']['cell'] = 3;
|
||||
$table->cellstyle['group_report']['cell'] = 'text-align: center;';
|
||||
$table->data['group_report']['cell'] = "<table width='100%'>
|
||||
|
@ -1526,19 +1528,19 @@ function reporting_html_agent_configuration(&$table, $item) {
|
|||
}
|
||||
|
||||
function reporting_html_TTRT_value(&$table, $item, $mini, $only_value = false, $check_empty = false) {
|
||||
reporting_html_value($table, $item, $mini);
|
||||
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
|
||||
}
|
||||
|
||||
function reporting_html_TTO_value(&$table, $item, $mini, $only_value = false, $check_empty = false) {
|
||||
reporting_html_value($table, $item, $mini);
|
||||
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
|
||||
}
|
||||
|
||||
function reporting_html_MTBF_value(&$table, $item, $mini, $only_value = false, $check_empty = false) {
|
||||
reporting_html_value($table, $item, $mini);
|
||||
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
|
||||
}
|
||||
|
||||
function reporting_html_MTTR_value(&$table, $item, $mini, $only_value = false, $check_empty = false) {
|
||||
reporting_html_value($table, $item, $mini);
|
||||
reporting_html_value($table, $item, $mini, $only_value, $check_empty);
|
||||
}
|
||||
|
||||
function reporting_html_sum_value(&$table, $item, $mini) {
|
||||
|
@ -1837,164 +1839,7 @@ function reporting_html_sql(&$table, $item) {
|
|||
|
||||
|
||||
|
||||
function reporting_get_stats_servers($tiny = true) {
|
||||
global $config;
|
||||
|
||||
$server_performance = servers_get_performance();
|
||||
|
||||
// Alerts table
|
||||
$table_srv = html_get_predefined_table();
|
||||
|
||||
$table_srv->style[0] = $table_srv->style[2] = 'text-align: right; padding: 5px;';
|
||||
$table_srv->style[1] = $table_srv->style[3] = 'text-align: left; padding: 5px;';
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["total_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = '<hr style="border: 0; height: 1px; background: #DDD">';
|
||||
$table_srv->colspan[count($table_srv->data)][0] = 4;
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/database.png', true, array('title' => __('Local modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_local_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
format_numeric($server_performance ["local_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
if ($tiny) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Remote modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_remote_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["remote_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
else {
|
||||
if (isset($server_performance ["total_network_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/network.png', true, array('title' => __('Network modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_network_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
format_numeric($server_performance["network_modules_rate"], 2) .
|
||||
'</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_plugin_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/plugin.png', true, array('title' => __('Plugin modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_plugin_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["plugin_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_prediction_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/chart_bar.png', true, array('title' => __('Prediction modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_prediction_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["prediction_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_wmi_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/wmi.png', true, array('title' => __('WMI modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_wmi_modules"]) . '</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["wmi_modules_rate"], 2) . '</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
if (isset($server_performance ["total_web_modules"])) {
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/world.png', true, array('title' => __('Web modules'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' .
|
||||
format_numeric($server_performance ["total_web_modules"]) .
|
||||
'</span>';
|
||||
|
||||
$tdata[2] = '<span class="med_data">' .
|
||||
format_numeric($server_performance ["web_modules_rate"], 2) .
|
||||
'</span>';
|
||||
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
|
||||
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = '<hr style="border: 0; height: 1px; background: #DDD">';
|
||||
$table_srv->colspan[count($table_srv->data)][0] = 4;
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
|
||||
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$system_events = db_get_value_sql(
|
||||
'SELECT SQL_NO_CACHE COUNT(id_evento)
|
||||
FROM tevento');
|
||||
break;
|
||||
case "postgresql":
|
||||
case "oracle":
|
||||
$system_events = db_get_value_sql(
|
||||
'SELECT COUNT(id_evento)
|
||||
FROM tevento');
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$tdata = array();
|
||||
$tdata[0] = html_print_image('images/lightning_go.png', true,
|
||||
array('title' => __('Total events'), 'width' => '25px'));
|
||||
$tdata[1] = '<span class="big_data">' .
|
||||
format_numeric($system_events) . '</span>';
|
||||
|
||||
$table_srv->colspan[count($table_srv->data)][1] = 3;
|
||||
$table_srv->rowclass[] = '';
|
||||
$table_srv->data[] = $tdata;
|
||||
}
|
||||
|
||||
$output = '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Server performance') .
|
||||
'</legend>' .
|
||||
html_print_table($table_srv, true) . '</fieldset>';
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function reporting_get_stats_summary($data, $graph_width, $graph_height) {
|
||||
|
|
|
@ -536,8 +536,11 @@ function reports_get_report_types ($template = false, $not_editor = false) {
|
|||
if (!$template && $config['enterprise_installed']) {
|
||||
$types['SLA_monthly'] = array('optgroup' => __('SLA'),
|
||||
'name' => __('Monthly S.L.A.'));
|
||||
$types['SLA_services'] = array('optgroup' => __('SLA'),
|
||||
'name' => __('Services S.L.A.'));
|
||||
|
||||
if (!$config['metaconsole']) {
|
||||
$types['SLA_services'] = array('optgroup' => __('SLA'),
|
||||
'name' => __('Services S.L.A.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -125,7 +125,8 @@ function users_get_groups_for_select($id_user, $privilege = "AR", $returnAllGro
|
|||
}
|
||||
else {
|
||||
// First group it's needed to retrieve its parent group
|
||||
$first_group = reset(array_slice($user_groups, 0, 1));
|
||||
$first_group = array_slice($user_groups, 0, 1);
|
||||
$first_group = reset($first_group);
|
||||
$parent_group = $first_group['parent'];
|
||||
|
||||
$user_groups_tree = groups_get_groups_tree_recursive($user_groups, $parent_group);
|
||||
|
|
|
@ -338,7 +338,7 @@ function visual_map_print_item($mode = "read", $layoutData,
|
|||
$url = $config['homeurl'] . "index.php?sec=reporting&sec2=operation/visual_console/render_view&pure=" . $config["pure"] . "&id=" . $layoutData["id_layout_linked"];
|
||||
}
|
||||
else {
|
||||
$url = "index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=1&id_visualmap=" . $layoutData["id_layout_linked"] . "&refr=0";
|
||||
$url = "index.php?sec=screen&sec2=screens/screens&action=visualmap&pure=0&id_visualmap=" . $layoutData["id_layout_linked"] . "&refr=0";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '6.0dev';
|
||||
$build = '150519';
|
||||
$build = '150526';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
|
@ -381,6 +381,7 @@ if ($print_agent) {
|
|||
}
|
||||
}
|
||||
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
$table->class = "databox data";
|
||||
$table->cellpadding = '0';
|
||||
|
|
|
@ -59,6 +59,7 @@ if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR") && !$is_extra) {
|
|||
}
|
||||
|
||||
// START: TABLE AGENT BUILD
|
||||
$table_agent = new stdClass();
|
||||
$table_agent->id = 'agent_details_main';
|
||||
$table_agent->width = '82%';
|
||||
$table_agent->cellspacing = 0;
|
||||
|
@ -182,6 +183,7 @@ $table_agent->rowclass[] = '';
|
|||
// END: TABLE AGENT BUILD
|
||||
|
||||
// START: TABLE CONTACT BUILD
|
||||
$table_contact = new stdClass();
|
||||
$table_contact->id = 'agent_contact_main';
|
||||
$table_contact->width = '100%';
|
||||
$table_contact->cellspacing = 0;
|
||||
|
@ -225,6 +227,7 @@ $table_contact->data[] = $data;
|
|||
// END: TABLE CONTACT BUILD
|
||||
|
||||
// START: TABLE DATA BUILD
|
||||
$table_data = new stdClass();
|
||||
$table_data->id = 'agent_data_main';
|
||||
$table_data->width = '100%';
|
||||
$table_data->cellspacing = 0;
|
||||
|
@ -481,7 +484,7 @@ if (!empty($network_interfaces)) {
|
|||
|
||||
// END: TABLE INTERFACES
|
||||
|
||||
$table = null;
|
||||
$table = new stdClass();
|
||||
$table->id = 'agent_details';
|
||||
$table->width = '100%';
|
||||
$table->cellspacing = 0;
|
||||
|
|
|
@ -417,6 +417,7 @@ function print_form_filter_monitors($id_agent, $status_filter_monitor = -1,
|
|||
$status_text_monitor = '', $status_module_group=-1) {
|
||||
|
||||
$form_text = '';
|
||||
$table = new stdClass();
|
||||
$table->class = "databox filters";
|
||||
$table->width = "100%";
|
||||
$table->style[0] = 'font-weight: bold;';
|
||||
|
|
|
@ -82,6 +82,7 @@ $total_agentes = 0;
|
|||
$monitor_ok = 0;
|
||||
$monitor_warning = 0;
|
||||
$monitor_critical = 0;
|
||||
$monitor_unknown = 0;
|
||||
$agents_unknown = 0;
|
||||
foreach ($result_groups as $data) {
|
||||
$total_agentes += $data["_total_agents_"];
|
||||
|
|
|
@ -178,7 +178,7 @@ $interface_traffic_modules = array(
|
|||
array_values($interface_traffic_modules),
|
||||
$config['homeurl'],
|
||||
array_keys($interface_traffic_modules),
|
||||
array("bytes"),
|
||||
array_fill(0, count($interface_traffic_modules),"bytes"),
|
||||
false);
|
||||
|
||||
echo '</div>';
|
||||
|
|
|
@ -393,7 +393,7 @@ switch ($activeTab) {
|
|||
$title = __('Policies view');
|
||||
$icon = "images/policies_mc.png";
|
||||
break;
|
||||
case 'dinamic':
|
||||
case 'dynamic':
|
||||
$title = __('Dynamic view');
|
||||
$icon = "images/dynamic_network_icon.png";
|
||||
break;
|
||||
|
@ -463,7 +463,7 @@ if ($activeTab == 'groups' || $activeTab == 'policies' || $activeTab == 'radial_
|
|||
}
|
||||
|
||||
// Layout
|
||||
if ($activeTab != 'dinamic' && $activeTab != 'radial_dynamic') {
|
||||
if ($activeTab != 'dynamic' && $activeTab != 'radial_dynamic') {
|
||||
$form_elems[] = __('Layout') . ' ' .
|
||||
html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ if ($activeTab == 'topology') {
|
|||
}
|
||||
|
||||
// No overlap
|
||||
if ($activeTab != 'dinamic' && $activeTab != 'radial_dynamic') {
|
||||
if ($activeTab != 'dynamic' && $activeTab != 'radial_dynamic') {
|
||||
$form_elems[] = __('No Overlap') . ' ' .
|
||||
html_print_checkbox ('nooverlap', '1', $nooverlap, true);
|
||||
}
|
||||
|
@ -505,13 +505,13 @@ if ($activeTab == 'groups') {
|
|||
}
|
||||
|
||||
// Simple
|
||||
if ($activeTab != 'dinamic' && $activeTab != 'radial_dynamic') {
|
||||
if ($activeTab != 'dynamic' && $activeTab != 'radial_dynamic') {
|
||||
$form_elems[] = __('Simple') . ' ' .
|
||||
html_print_checkbox ('simple', '1', $simple, true);
|
||||
}
|
||||
|
||||
// Regenerate
|
||||
if ($activeTab != 'dinamic' && $activeTab != 'radial_dynamic') {
|
||||
if ($activeTab != 'dynamic' && $activeTab != 'radial_dynamic') {
|
||||
$form_elems[] = __('Regenerate') . ' ' .
|
||||
html_print_checkbox ('regen', '1', $regen, true);
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ if ($pure == "1") {
|
|||
}
|
||||
|
||||
// Font
|
||||
if ($activeTab != 'dinamic' && $activeTab != 'radial_dynamic') {
|
||||
if ($activeTab != 'dynamic' && $activeTab != 'radial_dynamic') {
|
||||
$form_elems[] = __('Font') . ' ' .
|
||||
html_print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, true);
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ switch ($activeTab) {
|
|||
case 'policies':
|
||||
require_once(ENTERPRISE_DIR . '/operation/policies/networkmap.policies.php');
|
||||
break;
|
||||
case 'dinamic':
|
||||
case 'dynamic':
|
||||
require_once('operation/agentes/networkmap.dinamic.php');
|
||||
break;
|
||||
case 'radial_dynamic':
|
||||
|
|
|
@ -163,6 +163,7 @@ echo '<td style="vertical-align: top; min-width: 180px; width:25%; padding-right
|
|||
// ---------------------------------------------------------------------
|
||||
// The status horizontal bars (Global health, Monitor sanity...
|
||||
// ---------------------------------------------------------------------
|
||||
$table = new stdClass();
|
||||
$table->width = "100%";
|
||||
$table->class = "";
|
||||
$table->cellpadding = 2;
|
||||
|
@ -195,8 +196,8 @@ $data_agents = array(
|
|||
);
|
||||
|
||||
$table->data[1][0] = reporting_get_stats_alerts($data);
|
||||
$table->data[2][0] .= reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
|
||||
$table->data[3][0] .= reporting_get_stats_agents_monitors($data);
|
||||
$table->data[2][0] = reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
|
||||
$table->data[3][0] = reporting_get_stats_agents_monitors($data);
|
||||
$table->rowclass[] = '';
|
||||
|
||||
|
||||
|
@ -227,7 +228,7 @@ $acltags = tags_get_user_module_and_tags ($config['id_user'], $access = 'ER', $u
|
|||
|
||||
if (!empty($acltags)) {
|
||||
$tags_condition = tags_get_acl_tags_event_condition($acltags, false, $user_strict);
|
||||
|
||||
|
||||
if (!empty($tags_condition)) {
|
||||
$events = events_print_event_table ("estado<>1 AND ($tags_condition)", 10, "100%",true,false,true);
|
||||
ui_toggle($events, __('Latest events'));
|
||||
|
@ -242,7 +243,7 @@ if ($is_admin) {
|
|||
require($config['homedir'] . '/godmode/servers/servers.build_table.php');
|
||||
|
||||
}
|
||||
$out .= '<table cellpadding=0 cellspacing=0 class="databox pies" style="margin-top:15px;" width=100%><tr><td>';
|
||||
$out = '<table cellpadding=0 cellspacing=0 class="databox pies" style="margin-top:15px;" width=100%><tr><td>';
|
||||
$out .= '<fieldset class="databox tactical_set">
|
||||
<legend>' .
|
||||
__('Event graph') .
|
||||
|
|
|
@ -122,6 +122,8 @@ else {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($meta) {
|
||||
//There is another filter.
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// GNU General Public License for more details.
|
||||
|
||||
if(!isset($table->width)) {
|
||||
$table = new stdClass();
|
||||
$table->width = '100%';
|
||||
}
|
||||
|
||||
|
@ -500,7 +501,7 @@ foreach ($result as $event) {
|
|||
if (!empty($event_user_comments)) {
|
||||
$last_key = key(array_slice($event_user_comments, -1, 1, true));
|
||||
$date_format = $config['date_format'];
|
||||
|
||||
|
||||
foreach ($event_user_comments as $key => $event_user_comment) {
|
||||
$event_user_comment_str .= sprintf('%s: %s<br>%s: %s<br>%s: %s<br>',
|
||||
__('Date'), date($date_format, $event_user_comment['utimestamp']),
|
||||
|
@ -591,7 +592,7 @@ foreach ($result as $event) {
|
|||
array ("title" => __('Validate event')));
|
||||
$data[$i] .= '</a>';
|
||||
}
|
||||
|
||||
|
||||
// Delete event
|
||||
if ((tags_checks_event_acl($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags'],$childrens_ids) == 1)) {
|
||||
if($event['estado'] != 2) {
|
||||
|
@ -677,7 +678,7 @@ if (!empty ($table->data)) {
|
|||
});
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
//~ if (!$readonly && tags_check_acl ($config["id_user"], 0,"EM", $event['clean_tags']) == 1) {
|
||||
if (!$readonly && ($show_delete_button)) {
|
||||
|
|
|
@ -25,6 +25,8 @@ require_once ($config['homedir'].'/include/functions_ui.php');
|
|||
|
||||
check_login ();
|
||||
|
||||
|
||||
|
||||
if (! check_acl ($config["id_user"], 0, "ER")) {
|
||||
db_pandora_audit("ACL Violation",
|
||||
"Trying to access event viewer");
|
||||
|
@ -46,10 +48,7 @@ if (!$meta) {
|
|||
if (isset($config['event_replication']) &&
|
||||
$config['event_replication'] == 1) {
|
||||
|
||||
if ($config['show_events_in_local'] == 0) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if ((bool)$config['show_events_in_local']) {
|
||||
$readonly = true;
|
||||
}
|
||||
}
|
||||
|
@ -223,12 +222,16 @@ $date_from = (string)get_parameter('date_from', '');
|
|||
$date_to = (string)get_parameter('date_to', '');
|
||||
$server_id = (int)get_parameter('server_id', 0);
|
||||
|
||||
$text_agent = (string) get_parameter("text_agent");
|
||||
|
||||
|
||||
$text_agent = (string) get_parameter("text_agent", __('All'));
|
||||
|
||||
$id_agent = get_parameter('id_agent', 0);
|
||||
if ($id_agent != 0) {
|
||||
$text_agent = db_get_value('nombre', 'tagente', 'id_agente', $id_agent);
|
||||
if ($text_agent == false) {
|
||||
$text_agent = '';
|
||||
$text_agent = __('All');
|
||||
$id_agent = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,6 +246,7 @@ if ($id_agent_module != 0) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
$tag_with_json = base64_decode(get_parameter("tag_with", '')) ;
|
||||
$tag_with_json_clean = io_safe_output($tag_with_json);
|
||||
$tag_with_base64 = base64_encode($tag_with_json_clean);
|
||||
|
@ -263,6 +267,8 @@ users_get_groups ($config["id_user"], "ER");
|
|||
|
||||
$ids = (array) get_parameter ("eventid", -1);
|
||||
|
||||
|
||||
|
||||
$params = "search=" . rawurlencode(io_safe_input($search)) .
|
||||
"&event_type=" . $event_type .
|
||||
"&severity=" . $severity .
|
||||
|
@ -295,6 +301,8 @@ if ($meta) {
|
|||
|
||||
$url = "index.php?sec=eventos&sec2=operation/events/events&" . $params;
|
||||
|
||||
|
||||
|
||||
// Header
|
||||
if ($config["pure"] == 0 || $meta) {
|
||||
$pss = get_user_info($config['id_user']);
|
||||
|
|
|
@ -35,12 +35,13 @@ if (! check_acl ($config["id_user"], 0, "ER")) {
|
|||
return;
|
||||
}
|
||||
|
||||
if(defined('METACONSOLE')){
|
||||
if (defined('METACONSOLE')) {
|
||||
$jump = ' ';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$jump = "<br>";
|
||||
}
|
||||
|
||||
if (is_ajax()) {
|
||||
$get_filter_values = get_parameter('get_filter_values', 0);
|
||||
$save_event_filter = get_parameter('save_event_filter', 0);
|
||||
|
@ -419,6 +420,7 @@ else {
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
//- INI ADVANCE FILTER -------------------------------------------------
|
||||
$table_advanced = new stdClass();
|
||||
$table_advanced->id = 'events_filter_form_advanced';
|
||||
$table_advanced->width = '98%';
|
||||
$table_advanced->cellspacing = 4;
|
||||
|
@ -542,6 +544,7 @@ $table_advanced->rowclass[] = '';
|
|||
//- END ADVANCE FILTER -------------------------------------------------
|
||||
|
||||
|
||||
$table = new stdClass();
|
||||
$table->id = 'events_filter_form';
|
||||
$table->width = '100%';
|
||||
$table->cellspacing = 4;
|
||||
|
|
|
@ -141,6 +141,7 @@ else {
|
|||
|
||||
|
||||
//------------------------ INIT FORM -----------------------------------
|
||||
$table = new stdClass();
|
||||
$table->id = 'controls_table';
|
||||
$table->width = '99%';
|
||||
$table->class = 'databox';
|
||||
|
|
|
@ -29,6 +29,7 @@ echo '<br><div style="margin:auto; width:90%; padding: 10px; background: #fff">'
|
|||
|
||||
$anyfound = false;
|
||||
|
||||
$table = new stdClass();
|
||||
$table->id = 'summary';
|
||||
$table->width = '98%';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150519
|
||||
%define release 150526
|
||||
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name httpd
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_console
|
||||
%define version 6.0dev
|
||||
%define release 150519
|
||||
%define release 150526
|
||||
%define httpd_name httpd
|
||||
# User and Group under which Apache is running
|
||||
%define httpd_name apache2
|
||||
|
|
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('graph_res','5'),
|
||||
('step_compact','1'),
|
||||
('db_scheme_version','6.0dev'),
|
||||
('db_scheme_build','PD150519'),
|
||||
('db_scheme_build','PD150526'),
|
||||
('show_unknown','0'),
|
||||
('show_lastalerts','1'),
|
||||
('style','pandora'),
|
||||
|
@ -1033,6 +1033,6 @@ INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0),(2,'Departm
|
|||
|
||||
INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es','',''),(2,'critical','Critical modules','','',''),(3,'dmz','DMZ Network Zone','','',''),(4,'performance','Performance anda capacity modules','','',''),(5,'configuration','','','','');
|
||||
|
||||
INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,''),(2,'SSH to host','Connect via SSH to the agent','http://localhost:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User'),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,''),(4,'Create Integria IMS incident from event','Create a incident from the event with integria incidents system of Pandora FMS. 

Is necessary to enable and configure the Integria incidents in Pandora FMS setup.','index.php?sec=workspace&sec2=operation/integria_incidents/incident&tab=editor&from_event=_event_id_','url',0,0,0,1,''),(5,'Restart agent','Restart the agent with using UDP protocol.

To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'');
|
||||
INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,''),(2,'SSH to host','Connect via SSH to the agent','http://localhost:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User'),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,''),(4,'Create Integria IMS incident from event','Create a incident from the event with integria incidents system of Pandora FMS. 

Is necessary to enable and configure the Integria incidents in Pandora FMS setup.','index.php?sec=workspace&sec2=operation/integria_incidents/incident&tab=editor&from_event=_event_id_','url',0,0,0,1,''),(5,'Restart agent','Restart the agent with using UDP protocol.

To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,''),(6,'Ping to module agent host','Ping to the module agent host','ping -c 5 _module_address_','command',0,620,500,0,'');
|
||||
|
||||
INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package: pandorafms-server
|
||||
Version: 6.0dev-150519
|
||||
Version: 6.0dev-150526
|
||||
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.0dev-150519"
|
||||
pandora_version="6.0dev-150526"
|
||||
|
||||
package_cpan=0
|
||||
package_pandora=1
|
||||
|
|
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||
|
||||
# version: Defines actual version of Pandora Server for this module only
|
||||
my $pandora_version = "6.0dev";
|
||||
my $pandora_build = "150519";
|
||||
my $pandora_build = "150526";
|
||||
our $VERSION = $pandora_version." ".$pandora_build;
|
||||
|
||||
# Setup hash
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150519
|
||||
%define release 150526
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
%define name pandorafms_server
|
||||
%define version 6.0dev
|
||||
%define release 150519
|
||||
%define release 150526
|
||||
|
||||
Summary: Pandora FMS Server
|
||||
Name: %{name}
|
||||
|
|
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||
use PandoraFMS::DB;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150519";
|
||||
my $version = "6.0dev PS150526";
|
||||
|
||||
# Pandora server configuration
|
||||
my %conf;
|
||||
|
@ -217,19 +217,22 @@ sub pandora_purgedb ($$) {
|
|||
}
|
||||
log_message ('', "\n");
|
||||
|
||||
log_message ('PURGE', "Deleting validated events from tmetaconsole_event_history.", '');
|
||||
$events_to_delete = get_db_value ($dbh, "SELECT COUNT(*) FROM tmetaconsole_event_history WHERE estado = 1");
|
||||
while($events_to_delete > 0) {
|
||||
db_do($dbh, "DELETE FROM tmetaconsole_event_history WHERE estado = 1 LIMIT ?", $BIG_OPERATION_STEP);
|
||||
$events_to_delete = $events_to_delete - $BIG_OPERATION_STEP;
|
||||
if (defined($conf->{'_enterprise_installed'}) && $conf->{'_enterprise_installed'} eq '1' &&
|
||||
defined($conf->{'_metaconsole'}) && $conf->{'_metaconsole'} eq '1'){
|
||||
log_message ('PURGE', "Deleting validated events from tmetaconsole_event_history.", '');
|
||||
$events_to_delete = get_db_value ($dbh, "SELECT COUNT(*) FROM tmetaconsole_event_history WHERE estado = 1");
|
||||
while($events_to_delete > 0) {
|
||||
db_do($dbh, "DELETE FROM tmetaconsole_event_history WHERE estado = 1 LIMIT ?", $BIG_OPERATION_STEP);
|
||||
$events_to_delete = $events_to_delete - $BIG_OPERATION_STEP;
|
||||
|
||||
# Mark the progress
|
||||
log_message ('', ".");
|
||||
# Mark the progress
|
||||
log_message ('', ".");
|
||||
|
||||
# Do not overload the MySQL server
|
||||
usleep (10000);
|
||||
# Do not overload the MySQL server
|
||||
usleep (10000);
|
||||
}
|
||||
log_message ('', "\n");
|
||||
}
|
||||
log_message ('', "\n");
|
||||
}
|
||||
else {
|
||||
log_message ('PURGE', 'event_purge is set to 0. Old events will not be deleted.');
|
||||
|
|
|
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||
Encode::Locale::decode_argv;
|
||||
|
||||
# version: define current version
|
||||
my $version = "6.0dev PS150519";
|
||||
my $version = "6.0dev PS150526";
|
||||
|
||||
# save program name for logging
|
||||
my $progname = basename($0);
|
||||
|
|
Loading…
Reference in New Issue