mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Merge branch 'pandora_5.1' into feature/ticket#2179-recontask-view-acl
This commit is contained in:
commit
d3bb628ea2
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 5.1SP3-150720
|
Version: 5.1SP3-150723
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="5.1SP3-150720"
|
pandora_version="5.1SP3-150723"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
@ -41,7 +41,7 @@ my $Sem = undef;
|
|||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '5.1SP3';
|
use constant AGENT_VERSION => '5.1SP3';
|
||||||
use constant AGENT_BUILD => '150720';
|
use constant AGENT_BUILD => '150723';
|
||||||
|
|
||||||
# Commands to retrieve total memory information in kB
|
# Commands to retrieve total memory information in kB
|
||||||
use constant TOTALMEMORY_CMDS => {
|
use constant TOTALMEMORY_CMDS => {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 5.1SP3
|
%define version 5.1SP3
|
||||||
%define release 150720
|
%define release 150723
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 5.1SP3
|
%define version 5.1SP3
|
||||||
%define release 150720
|
%define release 150723
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{150720}
|
{150723}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
|||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("5.1SP3(Build 150720)")
|
#define PANDORA_VERSION ("5.1SP3(Build 150723)")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
@ -11,7 +11,7 @@ BEGIN
|
|||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(5.1SP3(Build 150720))"
|
VALUE "ProductVersion", "(5.1SP3(Build 150723))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 5.1SP3-150720
|
Version: 5.1SP3-150723
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="5.1SP3-150720"
|
pandora_version="5.1SP3-150723"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -123,7 +123,10 @@ switch ($config["dbtype"]) {
|
|||||||
case "mysql":
|
case "mysql":
|
||||||
render_info_data ("SELECT `value`
|
render_info_data ("SELECT `value`
|
||||||
FROM tconfig
|
FROM tconfig
|
||||||
WHERE `token` = 'db_scheme_version'", "DB Schema Version");
|
WHERE `token` = 'db_scheme_first_version'", "DB Schema Version (first installed)");
|
||||||
|
render_info_data ("SELECT `value`
|
||||||
|
FROM tconfig
|
||||||
|
WHERE `token` = 'db_scheme_version'", "DB Schema Version (actual)");
|
||||||
render_info_data ("SELECT `value`
|
render_info_data ("SELECT `value`
|
||||||
FROM tconfig
|
FROM tconfig
|
||||||
WHERE `token` = 'db_scheme_build'", "DB Schema Build");
|
WHERE `token` = 'db_scheme_build'", "DB Schema Build");
|
||||||
|
@ -31,7 +31,8 @@ $create = (string)get_parameter('create', 0);
|
|||||||
|
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$permission = events_check_event_filter_group ($id);
|
$permission = events_check_event_filter_group ($id);
|
||||||
if (!$permission) { // User doesn't have permissions to see this filter
|
if (!$permission) {
|
||||||
|
// User doesn't have permissions to see this filter
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -303,7 +304,8 @@ $table->data[18][1] = html_print_button(__('Remove'), 'remove_whithout', $remove
|
|||||||
|
|
||||||
$table->data[19][0] = '<b>' . __('Alert events') . '</b>';
|
$table->data[19][0] = '<b>' . __('Alert events') . '</b>';
|
||||||
$table->data[19][1] = html_print_select(
|
$table->data[19][1] = html_print_select(
|
||||||
array('-1' => __('All'),
|
array(
|
||||||
|
'-1' => __('All'),
|
||||||
'0' => __('Filter alert events'),
|
'0' => __('Filter alert events'),
|
||||||
'1' => __('Only alert events')),
|
'1' => __('Only alert events')),
|
||||||
"filter_only_alert", $filter_only_alert, '', '', '', true);
|
"filter_only_alert", $filter_only_alert, '', '', '', true);
|
||||||
|
@ -492,7 +492,7 @@ $table->data[$row][1] = html_print_input_text ('custom_graph_widht',
|
|||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
|
||||||
$table->data[$row][0] = __('Display proc modules in binary format (OK/FAIL)');
|
$table->data[$row][0] = __('Display data of proc modules in other format');
|
||||||
$table->data[$row][1] = __('Yes') . ' ' .
|
$table->data[$row][1] = __('Yes') . ' ' .
|
||||||
html_print_radio_button ('render_proc', 1, '',
|
html_print_radio_button ('render_proc', 1, '',
|
||||||
$config["render_proc"], true) .
|
$config["render_proc"], true) .
|
||||||
@ -502,6 +502,13 @@ $table->data[$row][1] .= __('No') . ' ' .
|
|||||||
$config["render_proc"], true);
|
$config["render_proc"], true);
|
||||||
|
|
||||||
$row++;
|
$row++;
|
||||||
|
$table->data[$row][0] = __('Display text proc modules have state is ok');
|
||||||
|
$table->data[$row][1] = html_print_input_text ('render_proc_ok', $config["render_proc_ok"], '', 25, 25, true);
|
||||||
|
$row++;
|
||||||
|
|
||||||
|
$table->data[$row][0] = __('Display text when proc modules have state critical');
|
||||||
|
$table->data[$row][1] = html_print_input_text ('render_proc_fail', $config["render_proc_fail"], '', 25, 25, true);
|
||||||
|
$row++;
|
||||||
|
|
||||||
echo '<form id="form_setup" method="post">';
|
echo '<form id="form_setup" method="post">';
|
||||||
html_print_input_hidden ('update_config', 1);
|
html_print_input_hidden ('update_config', 1);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC150720';
|
$build_version = 'PC150723';
|
||||||
$pandora_version = 'v5.1SP3';
|
$pandora_version = 'v5.1SP3';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -269,6 +269,7 @@ define ('EVENT_CRIT_MAJOR', 6);
|
|||||||
define ('EVENT_CRIT_CRITICAL', 4);
|
define ('EVENT_CRIT_CRITICAL', 4);
|
||||||
define ('EVENT_CRIT_WARNING_OR_CRITICAL', 34);
|
define ('EVENT_CRIT_WARNING_OR_CRITICAL', 34);
|
||||||
define ('EVENT_CRIT_NOT_NORMAL', 20);
|
define ('EVENT_CRIT_NOT_NORMAL', 20);
|
||||||
|
define ('EVENT_CRIT_OR_NORMAL', 21);
|
||||||
|
|
||||||
/* Id Module (more use in component)*/
|
/* Id Module (more use in component)*/
|
||||||
define ('MODULE_DATA', 1);
|
define ('MODULE_DATA', 1);
|
||||||
@ -286,6 +287,7 @@ define ('MODULE_PREDICTION_NETFLOW', 4);
|
|||||||
|
|
||||||
/* SNMP CONSTANTS */
|
/* SNMP CONSTANTS */
|
||||||
define('SNMP_DIR_MIBS', "attachment/mibs");
|
define('SNMP_DIR_MIBS', "attachment/mibs");
|
||||||
|
|
||||||
define('SNMP_TRAP_TYPE_NONE', -1);
|
define('SNMP_TRAP_TYPE_NONE', -1);
|
||||||
define('SNMP_TRAP_TYPE_COLD_START', 0);
|
define('SNMP_TRAP_TYPE_COLD_START', 0);
|
||||||
define('SNMP_TRAP_TYPE_WARM_START', 1);
|
define('SNMP_TRAP_TYPE_WARM_START', 1);
|
||||||
@ -383,7 +385,6 @@ define("COLLECTION_CORRECT", 1);
|
|||||||
define("COLLECTION_ERROR_LOST_DIRECTORY", 2);
|
define("COLLECTION_ERROR_LOST_DIRECTORY", 2);
|
||||||
define("COLLECTION_UNSAVED", 3);
|
define("COLLECTION_UNSAVED", 3);
|
||||||
|
|
||||||
|
|
||||||
/* PAGINATION */
|
/* PAGINATION */
|
||||||
define("PAGINATION_BLOCKS_LIMIT", 15);
|
define("PAGINATION_BLOCKS_LIMIT", 15);
|
||||||
?>
|
?>
|
||||||
|
@ -1057,6 +1057,7 @@ function get_priorities ($priority_param = false) {
|
|||||||
$priorities[EVENT_CRIT_CRITICAL] = __('Critical');
|
$priorities[EVENT_CRIT_CRITICAL] = __('Critical');
|
||||||
$priorities[EVENT_CRIT_WARNING_OR_CRITICAL] = __('Warning').'/'.__('Critical');
|
$priorities[EVENT_CRIT_WARNING_OR_CRITICAL] = __('Warning').'/'.__('Critical');
|
||||||
$priorities[EVENT_CRIT_NOT_NORMAL] = __('Not normal');
|
$priorities[EVENT_CRIT_NOT_NORMAL] = __('Not normal');
|
||||||
|
$priorities[EVENT_CRIT_OR_NORMAL] = __('Critical') . '/' . __('Normal');
|
||||||
|
|
||||||
foreach ($priorities as $key => $priority) {
|
foreach ($priorities as $key => $priority) {
|
||||||
$priorities[$key] = ui_print_truncate_text($priority, GENERIC_SIZE_TEXT, false, true, false);
|
$priorities[$key] = ui_print_truncate_text($priority, GENERIC_SIZE_TEXT, false, true, false);
|
||||||
|
@ -454,8 +454,12 @@ function config_update_config () {
|
|||||||
$error_update[] = __('Show the group name instead the group icon.');
|
$error_update[] = __('Show the group name instead the group icon.');
|
||||||
if (!config_update_value ('custom_graph_widht', get_parameter('custom_graph_widht')))
|
if (!config_update_value ('custom_graph_widht', get_parameter('custom_graph_widht')))
|
||||||
$error_update[] = __('Default line thickness for the Custom Graph.');
|
$error_update[] = __('Default line thickness for the Custom Graph.');
|
||||||
if (!config_update_value ('render_proc', (int) get_parameter('render_proc', 0)))
|
if (!config_update_value ('render_proc', (bool) get_parameter('render_proc', false)))
|
||||||
$error_update[] = __('Display proc modules in binary format (OK/FAIL)');
|
$error_update[] = __('Display data of proc modules in other format');
|
||||||
|
if (!config_update_value ('render_proc_ok', (string) get_parameter('render_proc_ok', __('Ok') )))
|
||||||
|
$error_update[] = __('Display text proc modules have state is ok');
|
||||||
|
if (!config_update_value ('render_proc_fail', (string) get_parameter('render_proc_fail', __('Fail') )))
|
||||||
|
$error_update[] = __('Display text when proc modules have state critical');
|
||||||
|
|
||||||
$interval_values = get_parameter ('interval_values');
|
$interval_values = get_parameter ('interval_values');
|
||||||
|
|
||||||
@ -1208,6 +1212,13 @@ function config_process_config () {
|
|||||||
config_update_value ('render_proc', 0);
|
config_update_value ('render_proc', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($config["render_proc_ok"])) {
|
||||||
|
config_update_value ('render_proc_ok', __('Ok') );
|
||||||
|
}
|
||||||
|
if (!isset($config["render_proc_fail"])) {
|
||||||
|
config_update_value ('render_proc_fail', __('Fail') );
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($config['command_snapshot'])) {
|
if (!isset($config['command_snapshot'])) {
|
||||||
config_update_value ('command_snapshot', 1);
|
config_update_value ('command_snapshot', 1);
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,15 @@ include_once($config['homedir'] . "/include/functions_agents.php");
|
|||||||
include_once($config['homedir'] . '/include/functions_users.php');
|
include_once($config['homedir'] . '/include/functions_users.php');
|
||||||
include_once($config['homedir'] . '/include/functions_tags.php');
|
include_once($config['homedir'] . '/include/functions_tags.php');
|
||||||
|
|
||||||
|
function modules_is_not_init($id_agent_module) {
|
||||||
|
$row = db_get_row('tagente_estado', 'id_agente_modulo', $id_agent_module);
|
||||||
|
|
||||||
|
if ($row['estado'] == AGENT_MODULE_STATUS_NO_DATA)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function modules_is_disable_agent($id_agent_module) {
|
function modules_is_disable_agent($id_agent_module) {
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT disabled
|
SELECT disabled
|
||||||
@ -1715,7 +1724,8 @@ function modules_get_agentmodule_data ($id_agent_module, $period,
|
|||||||
case 21:
|
case 21:
|
||||||
case 31:
|
case 31:
|
||||||
if ( $config["render_proc"] ) {
|
if ( $config["render_proc"] ) {
|
||||||
$sql = sprintf ("SELECT IF(datos >= 1, 'OK', 'FAIL') as data, utimestamp
|
$sql = sprintf ("SELECT IF(datos >= 1, '" . $config["render_proc_ok"] .
|
||||||
|
"', '" . $config["render_proc_fail"] . "') as data, utimestamp
|
||||||
FROM tagente_datos
|
FROM tagente_datos
|
||||||
WHERE id_agente_modulo = %d
|
WHERE id_agente_modulo = %d
|
||||||
AND utimestamp > %d AND utimestamp <= %d
|
AND utimestamp > %d AND utimestamp <= %d
|
||||||
|
@ -598,6 +598,8 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0,
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (empty($id_agent_module))
|
if (empty($id_agent_module))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -616,8 +618,11 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Calculate the SLA for large time without hours
|
// Calculate the SLA for large time without hours
|
||||||
if ($timeFrom == $timeTo) {
|
if ($timeFrom == $timeTo) {
|
||||||
|
|
||||||
// Get interval data
|
// Get interval data
|
||||||
$sql = sprintf ('SELECT *
|
$sql = sprintf ('SELECT *
|
||||||
FROM tagente_datos
|
FROM tagente_datos
|
||||||
@ -669,7 +674,8 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate planned downtime dates
|
// Calculate planned downtime dates
|
||||||
$downtime_dates = reporting_get_planned_downtimes_intervals($id_agent_module, $datelimit, $date);
|
$downtime_dates = reporting_get_planned_downtimes_intervals(
|
||||||
|
$id_agent_module, $datelimit, $date);
|
||||||
|
|
||||||
// Get previous data
|
// Get previous data
|
||||||
$previous_data = modules_get_previous_data ($id_agent_module, $datelimit);
|
$previous_data = modules_get_previous_data ($id_agent_module, $datelimit);
|
||||||
@ -707,12 +713,27 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
$previous_utimestamp = $first_data['utimestamp'];
|
$previous_utimestamp = $first_data['utimestamp'];
|
||||||
if ((($max_value > $min_value AND ($first_data['datos'] > $max_value OR $first_data['datos'] < $min_value))) OR
|
if (
|
||||||
($max_value <= $min_value AND $first_data['datos'] < $min_value)) {
|
(
|
||||||
|
(
|
||||||
|
$max_value > $min_value AND (
|
||||||
|
$first_data['datos'] > $max_value OR
|
||||||
|
$first_data['datos'] < $min_value
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) OR
|
||||||
|
(
|
||||||
|
$max_value <= $min_value AND
|
||||||
|
$first_data['datos'] < $min_value
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
|
||||||
$previous_status = 1;
|
$previous_status = 1;
|
||||||
foreach ($downtime_dates as $date_dt) {
|
foreach ($downtime_dates as $date_dt) {
|
||||||
if (($date_dt['date_from'] <= $previous_utimestamp) AND ($date_dt['date_to'] >= $previous_utimestamp)) {
|
|
||||||
|
if (($date_dt['date_from'] <= $previous_utimestamp) AND
|
||||||
|
($date_dt['date_to'] >= $previous_utimestamp)) {
|
||||||
|
|
||||||
$previous_status = 0;
|
$previous_status = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -768,13 +789,14 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0,
|
|||||||
$timeTo);
|
$timeTo);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
// Extract the data each day
|
// Extract the data each day
|
||||||
|
|
||||||
$sla = 0;
|
$sla = 0;
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
for ($interval = 0; $interval <= $period; $interval = $interval + SECONDS_1DAY) {
|
for ($interval = SECONDS_1DAY; $interval <= $period; $interval = $interval + SECONDS_1DAY) {
|
||||||
$datelimit = $date - $interval;
|
|
||||||
|
|
||||||
$sla_day = reporting_get_agentmodule_sla(
|
$sla_day = reporting_get_agentmodule_sla(
|
||||||
$id_agent_module,
|
$id_agent_module,
|
||||||
@ -786,9 +808,13 @@ function reporting_get_agentmodule_sla ($id_agent_module, $period = 0,
|
|||||||
$timeFrom, $timeTo);
|
$timeFrom, $timeTo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Avoid to add the period of module not init
|
||||||
|
if ($sla_day !== false) {
|
||||||
$sla += $sla_day;
|
$sla += $sla_day;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sla = $sla / $i;
|
$sla = $sla / $i;
|
||||||
|
|
||||||
@ -4369,7 +4395,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modules_is_disable_agent($sla['id_agent_module'])) {
|
if (modules_is_disable_agent($sla['id_agent_module']) ||
|
||||||
|
modules_is_not_init($item['id_agent_module'])) {
|
||||||
|
|
||||||
if (($config ['metaconsole'] == 1) && defined('METACONSOLE')) {
|
if (($config ['metaconsole'] == 1) && defined('METACONSOLE')) {
|
||||||
//Restore db connection
|
//Restore db connection
|
||||||
@ -5671,7 +5698,6 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5682,67 +5708,79 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
// HACK it is saved in show_graph field.
|
// HACK it is saved in show_graph field.
|
||||||
// Show interfaces instead the modules
|
// Show interfaces instead the modules
|
||||||
if ($content['show_graph']) {
|
if ($content['show_graph']) {
|
||||||
$text = $row['ip_address'] = agents_get_address(
|
$text = $row['availability_item'] = agents_get_address(
|
||||||
modules_get_agentmodule_agent($item['id_agent_module']));
|
modules_get_agentmodule_agent($item['id_agent_module']));
|
||||||
|
|
||||||
|
if (empty($text)) {
|
||||||
|
$text = $row['availability_item'] = __('No Address');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$text = $row['module'] = modules_get_agentmodule_name(
|
$text = $row['availability_item'] = modules_get_agentmodule_name(
|
||||||
$item['id_agent_module']);
|
$item['id_agent_module']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$row['agent'] = modules_get_agentmodule_agent_name(
|
$row['agent'] = modules_get_agentmodule_agent_name(
|
||||||
$item['id_agent_module']);
|
$item['id_agent_module']);
|
||||||
|
|
||||||
$text = $row['agent'] . " (" . $text . ")";
|
$text = $row['agent'] . " (" . $text . ")";
|
||||||
|
|
||||||
|
$sla_value = reporting_get_agentmodule_sla(
|
||||||
$monitor_value = reporting_get_agentmodule_sla(
|
|
||||||
$item['id_agent_module'],
|
$item['id_agent_module'],
|
||||||
$content['period'],
|
$content['period'],
|
||||||
1,
|
0.50,
|
||||||
false,
|
1.50,
|
||||||
|
$report["datetime"],
|
||||||
|
null,
|
||||||
|
$content['time_from'],
|
||||||
|
$content['time_to']);
|
||||||
|
|
||||||
|
$count_checks = modules_get_count_datas(
|
||||||
|
$item['id_agent_module'],
|
||||||
|
$report["datetime"] - $content['period'],
|
||||||
$report["datetime"]);
|
$report["datetime"]);
|
||||||
|
|
||||||
if ($monitor_value === false) {
|
|
||||||
|
if ($sla_value === false) {
|
||||||
$row['checks'] = __('Unknown');
|
$row['checks'] = __('Unknown');
|
||||||
$row['failed'] = __('Unknown');
|
$row['failed'] = __('Unknown');
|
||||||
$row['fail'] = __('Unknown');
|
$row['fail'] = __('Unknown');
|
||||||
$row['poling_time'] = __('Unknown');
|
$row['poling_time'] = __('Unknown');
|
||||||
$row['time_unavaliable'] = __('Unknown');
|
$row['time_unavaliable'] = __('Unknown');
|
||||||
$row['ok'] = __('Unknown');
|
$row['ok'] = __('Unknown');
|
||||||
|
|
||||||
|
$percent_ok = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$count_checks = modules_get_count_datas(
|
$percent_ok = format_numeric($sla_value, 2);
|
||||||
$item['id_agent_module'],
|
$percent_fail = (100 - $percent_ok);
|
||||||
$report["datetime"] - $content['period'],
|
|
||||||
$report["datetime"]);
|
|
||||||
$count_fails = modules_get_count_data_with_value(
|
|
||||||
$item['id_agent_module'],
|
|
||||||
$report["datetime"] - $content['period'],
|
|
||||||
$report["datetime"],
|
|
||||||
0);
|
|
||||||
|
|
||||||
$percent_ok = (($count_checks - $count_fails) * 100) / $count_checks;
|
$row['checks'] = format_numeric($count_checks, 0);
|
||||||
$percent_fail = 100 - $percent_ok;
|
$row['ok'] = $percent_ok . " %";
|
||||||
|
$row['fail'] = $percent_fail . " %";
|
||||||
|
$row['failed'] =
|
||||||
|
format_numeric($percent_fail * $count_checks / 100, 0);
|
||||||
|
|
||||||
$row['ok'] = format_numeric($percent_ok, 2) . " %";
|
|
||||||
$row['fail'] = format_numeric($percent_fail, 2) . " %";
|
$row['poling_time'] =
|
||||||
$row['checks'] = format_numeric($count_checks, 2);
|
human_time_description_raw(
|
||||||
$row['failed'] = format_numeric($count_fails ,2);
|
($percent_ok * $count_checks / 100) * modules_get_interval($item['id_agent_module']),
|
||||||
$row['poling_time'] = human_time_description_raw(
|
|
||||||
($count_checks - $count_fails) * modules_get_interval($item['id_agent_module']),
|
|
||||||
true);
|
true);
|
||||||
|
|
||||||
$row['time_unavaliable'] = "-";
|
$row['time_unavaliable'] = "-";
|
||||||
if ($count_fails > 0) {
|
if ($percent_fail > 0) {
|
||||||
$row['time_unavaliable'] = human_time_description_raw(
|
$row['time_unavaliable'] =
|
||||||
$count_fails * modules_get_interval($item['id_agent_module']),
|
human_time_description_raw(
|
||||||
|
($percent_fail * $count_checks / 100) * modules_get_interval($item['id_agent_module']),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$data[] = $row;
|
$data[] = $row;
|
||||||
|
|
||||||
|
|
||||||
$avg = (($avg * $count) + $monitor_value) / ($count + 1);
|
$avg = (($avg * $count) + $percent_ok) / ($count + 1);
|
||||||
if (is_null($min)) {
|
if (is_null($min)) {
|
||||||
$min = $percent_ok;
|
$min = $percent_ok;
|
||||||
$min_text = $text;
|
$min_text = $text;
|
||||||
@ -5764,6 +5802,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Restore dbconnection
|
//Restore dbconnection
|
||||||
if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) {
|
if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) {
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
@ -5992,7 +6031,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modules_is_disable_agent($row['id_agent_module'])) {
|
if (modules_is_disable_agent($row['id_agent_module'])
|
||||||
|
|| modules_is_not_init($item['id_agent_module'])) {
|
||||||
|
|
||||||
//Restore dbconnection
|
//Restore dbconnection
|
||||||
if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) {
|
if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) {
|
||||||
@ -6193,7 +6233,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modules_is_disable_agent($g['id_agent_module'])) {
|
if (modules_is_disable_agent($g['id_agent_module'])
|
||||||
|
|| modules_is_not_init($item['id_agent_module'])) {
|
||||||
//Restore dbconnection
|
//Restore dbconnection
|
||||||
if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) {
|
if (($config ['metaconsole'] == 1) && $server_name != '' && defined('METACONSOLE')) {
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '5.1SP3';
|
$version = '5.1SP3';
|
||||||
$build = '150720';
|
$build = '150723';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -106,7 +106,8 @@ class Visualmap {
|
|||||||
$ui->contentAddHtml($rendered_map);
|
$ui->contentAddHtml($rendered_map);
|
||||||
$ui->contentAddHtml("<script type=\"text/javascript\">
|
$ui->contentAddHtml("<script type=\"text/javascript\">
|
||||||
function ajax_load_map() {
|
function ajax_load_map() {
|
||||||
$('#rendered_visual_map').html('<div style=\"text-align: center\"> " . __('Loading...') . "<br /><img src=\"images/ajax-loader.gif\" /></div>');
|
$('#rendered_visual_map').html('<div style=\"text-align: center\"> " .
|
||||||
|
__('Loading...') . "<br /><img src=\"images/ajax-loader.gif\" /></div>');
|
||||||
|
|
||||||
var map_max_width = window.innerWidth * 0.90;
|
var map_max_width = window.innerWidth * 0.90;
|
||||||
var map_max_height = (window.innerHeight - 47) * 0.90;
|
var map_max_height = (window.innerHeight - 47) * 0.90;
|
||||||
|
@ -607,9 +607,9 @@ foreach ($modules as $module) {
|
|||||||
case 21:
|
case 21:
|
||||||
case 31:
|
case 31:
|
||||||
if ($module["datos"]>=1)
|
if ($module["datos"]>=1)
|
||||||
$salida ='OK';
|
$salida = $config["render_proc_ok"];
|
||||||
else
|
else
|
||||||
$salida = 'FAIL';
|
$salida = $config["render_proc_fail"];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$salida = format_numeric($module["datos"]);
|
$salida = format_numeric($module["datos"]);
|
||||||
|
@ -1211,9 +1211,9 @@ foreach ($result as $row) {
|
|||||||
case 21:
|
case 21:
|
||||||
case 31:
|
case 31:
|
||||||
if ( $row["datos"] >= 1 )
|
if ( $row["datos"] >= 1 )
|
||||||
$salida ='OK';
|
$salida = $config["render_proc_ok"];
|
||||||
else
|
else
|
||||||
$salida = 'FAIL';
|
$salida = $config["render_proc_fail"];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$salida = format_numeric($row["datos"]);
|
$salida = format_numeric($row["datos"]);
|
||||||
|
@ -92,6 +92,11 @@ if ($severity != -1) {
|
|||||||
AND (criticity = " . EVENT_CRIT_WARNING . " OR
|
AND (criticity = " . EVENT_CRIT_WARNING . " OR
|
||||||
criticity = " . EVENT_CRIT_CRITICAL . ")";
|
criticity = " . EVENT_CRIT_CRITICAL . ")";
|
||||||
break;
|
break;
|
||||||
|
case EVENT_CRIT_OR_NORMAL:
|
||||||
|
$sql_post .= "
|
||||||
|
AND (criticity = " . EVENT_CRIT_NORMAL . " OR
|
||||||
|
criticity = " . EVENT_CRIT_CRITICAL . ")";
|
||||||
|
break;
|
||||||
case EVENT_CRIT_NOT_NORMAL:
|
case EVENT_CRIT_NOT_NORMAL:
|
||||||
$sql_post .= " AND criticity != " . EVENT_CRIT_NORMAL;
|
$sql_post .= " AND criticity != " . EVENT_CRIT_NORMAL;
|
||||||
break;
|
break;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 5.1SP3
|
%define version 5.1SP3
|
||||||
%define release 150720
|
%define release 150723
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 5.1SP3
|
%define version 5.1SP3
|
||||||
%define release 150720
|
%define release 150723
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
@ -37,8 +37,9 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||||||
('days_compact','0'),
|
('days_compact','0'),
|
||||||
('graph_res','5'),
|
('graph_res','5'),
|
||||||
('step_compact','1'),
|
('step_compact','1'),
|
||||||
|
('db_scheme_first_version', '5.1dev'),
|
||||||
('db_scheme_version','5.1SP3'),
|
('db_scheme_version','5.1SP3'),
|
||||||
('db_scheme_build','PD150720'),
|
('db_scheme_build','PD150723'),
|
||||||
('show_unknown','0'),
|
('show_unknown','0'),
|
||||||
('show_lastalerts','1'),
|
('show_lastalerts','1'),
|
||||||
('style','pandora'),
|
('style','pandora'),
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 5.1SP3-150720
|
Version: 5.1SP3-150723
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="5.1SP3-150720"
|
pandora_version="5.1SP3-150723"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -43,7 +43,7 @@ our @EXPORT = qw(
|
|||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "5.1SP3";
|
my $pandora_version = "5.1SP3";
|
||||||
my $pandora_build = "150720";
|
my $pandora_build = "150723";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -162,6 +162,7 @@ sub data_consumer ($$) {
|
|||||||
$AgentSem->down ();
|
$AgentSem->down ();
|
||||||
delete ($Agents{$agent_name});
|
delete ($Agents{$agent_name});
|
||||||
$AgentSem->up ();
|
$AgentSem->up ();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Try to parse the XML 2 times, with a delay between tries of 2 seconds
|
# Try to parse the XML 2 times, with a delay between tries of 2 seconds
|
||||||
@ -192,6 +193,7 @@ sub data_consumer ($$) {
|
|||||||
$AgentSem->down ();
|
$AgentSem->down ();
|
||||||
delete ($Agents{$agent_name});
|
delete ($Agents{$agent_name});
|
||||||
$AgentSem->up ();
|
$AgentSem->up ();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink ($file_name);
|
unlink ($file_name);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 5.1SP3
|
%define version 5.1SP3
|
||||||
%define release 150720
|
%define release 150723
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 5.1SP3
|
%define version 5.1SP3
|
||||||
%define release 150720
|
%define release 150723
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
@ -33,7 +33,7 @@ use PandoraFMS::Tools;
|
|||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "5.1SP3 PS150720";
|
my $version = "5.1SP3 PS150723";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
@ -34,7 +34,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "5.1SP3 PS150720";
|
my $version = "5.1SP3 PS150723";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user