This commit is contained in:
cesar991 2016-09-26 11:27:59 +02:00
commit d5e65c427d
30 changed files with 78 additions and 46 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 6.1dev-160922
Version: 6.1dev-160926
Architecture: all
Priority: optional
Section: admin

View File

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

View File

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '6.1dev';
use constant AGENT_BUILD => '160922';
use constant AGENT_BUILD => '160926';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.1dev
%define release 160922
%define release 160926
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 6.1dev
%define release 160922
%define release 160926
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="6.1dev"
PI_BUILD="160922"
PI_BUILD="160926"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{160922}
{160926}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("6.1dev(Build 160922)")
#define PANDORA_VERSION ("6.1dev(Build 160926)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(6.1dev(Build 160922))"
VALUE "ProductVersion", "(6.1dev(Build 160926))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 6.1dev-160922
Version: 6.1dev-160926
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.1dev-160922"
pandora_version="6.1dev-160926"
package_pear=0
package_pandora=1

View File

@ -93,7 +93,7 @@ require_once ($config['homedir'] . "/include/functions_filemanager.php");
check_login ();
if (! check_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
db_pandora_audit("ACL Violation",
"Trying to access Plugin Management");
require ("general/noaccess.php");

View File

@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC160922';
$build_version = 'PC160926';
$pandora_version = 'v6.1dev';
// Do not overwrite default timezone set if defined.

View File

@ -115,6 +115,7 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
$list[$group['id_grupo']]['_monitors_ok_'] = 0;
$list[$group['id_grupo']]['_agents_not_init_'] = 0;
$list[$group['id_grupo']]['_agents_unknown_'] = 0;
$list[$group['id_grupo']]['_agents_critical_'] = 0;
$list[$group['id_grupo']]['_total_agents_'] = 0;
$list[$group['id_grupo']]["_monitor_checks_"] = 0;
$list[$group['id_grupo']]["_monitor_not_normal_"] = 0;
@ -167,14 +168,19 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
FROM tmetaconsole_agent
WHERE id_grupo = " . $group['id_grupo'] );
foreach ($agents as $agent) {
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
if ($agent['unknown_count'] > 0) {
$list[$group['id_grupo']]['_agents_unknown_'] += 1;
}
if ($agent['critical_count'] > 0) {
$list[$group['id_grupo']]['_agents_critical_'] += 1;
}
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
if ($agent['notinit_count'] > 0) {
$list[$group['id_grupo']]['_agents_not_init_'] += 1;
else {
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
if ($agent['unknown_count'] > 0) {
$list[$group['id_grupo']]['_agents_unknown_'] += 1;
}
}
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
if ($agent['notinit_count'] > 0) {
$list[$group['id_grupo']]['_agents_not_init_'] += 1;
}
}
}
}
@ -261,6 +267,12 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
'status' => AGENT_STATUS_UNKNOWN),
array ('COUNT(*) as total'), $access, false);
$list[$group['id_grupo']]['_agents_unknown_'] = isset ($agent_unknown[0]['total']) ? $agent_unknown[0]['total'] : 0;
$agent_critical = agents_get_agents(array (
'disabled' => 0,
'id_grupo' => $group['id_grupo'],
'status' => AGENT_STATUS_CRITICAL),
array ('COUNT(*) as total'), $access, false);
$list[$group['id_grupo']]['_agents_critical_'] = isset ($agent_critical[0]['total']) ? $agent_critical[0]['total'] : 0;
$agent_total = agents_get_agents(array (
'disabled' => 0,
'id_grupo' => $group['id_grupo']),
@ -335,6 +347,7 @@ function groupview_get_all_data ($id_user = false, $user_strict = false, $acltag
$list[$i]['_total_agents_'] = (int) tags_get_total_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_agents_unknown_'] = (int) tags_get_unknown_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_agents_critical_'] = (int) tags_get_critical_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_agents_not_init_'] = (int) tags_get_not_init_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_monitors_ok_'] = (int) tags_get_normal_monitors ($id, $acltags, $agent_filter, $module_filter);
$list[$i]['_monitors_critical_'] = (int) tags_get_critical_monitors ($id, $acltags, $agent_filter, $module_filter);
@ -728,6 +741,7 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
$list[$group['id_grupo']]['_monitors_ok_'] = 0;
$list[$group['id_grupo']]['_agents_not_init_'] = 0;
$list[$group['id_grupo']]['_agents_unknown_'] = 0;
$list[$group['id_grupo']]['_agents_critical_'] = 0;
$list[$group['id_grupo']]['_total_agents_'] = 0;
$list[$group['id_grupo']]["_monitor_checks_"] = 0;
$list[$group['id_grupo']]["_monitor_not_normal_"] = 0;
@ -780,14 +794,19 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
FROM tmetaconsole_agent
WHERE id_grupo = " . $group['id_grupo'] );
foreach ($agents as $agent) {
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
if ($agent['unknown_count'] > 0) {
$list[$group['id_grupo']]['_agents_unknown_'] += 1;
}
if ($agent['critical_count'] > 0) {
$list[$group['id_grupo']]['_agents_critical_'] += 1;
}
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
if ($agent['notinit_count'] > 0) {
$list[$group['id_grupo']]['_agents_not_init_'] += 1;
else {
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0)) {
if ($agent['unknown_count'] > 0) {
$list[$group['id_grupo']]['_agents_unknown_'] += 1;
}
}
if (($agent['critical_count'] == 0) && ($agent['warning_count'] == 0) && ($group_agents['disabled'] == 0) && ($agent['normal_count'] == 0) && ($agent['unknown_count'] == 0)) {
if ($agent['notinit_count'] > 0) {
$list[$group['id_grupo']]['_agents_not_init_'] += 1;
}
}
}
}
@ -874,6 +893,12 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
'status' => AGENT_STATUS_UNKNOWN),
array ('COUNT(*) as total'), $access, false);
$list[$group['id_grupo']]['_agents_unknown_'] = isset ($agent_unknown[0]['total']) ? $agent_unknown[0]['total'] : 0;
$agent_critical = agents_get_agents(array (
'disabled' => 0,
'id_grupo' => $group['id_grupo'],
'status' => AGENT_STATUS_CRITICAL),
array ('COUNT(*) as total'), $access, false);
$list[$group['id_grupo']]['_agents_critical_'] = isset ($agent_critical[0]['total']) ? $agent_critical[0]['total'] : 0;
$agent_total = agents_get_agents(array (
'disabled' => 0,
'id_grupo' => $group['id_grupo']),
@ -952,6 +977,7 @@ function groupview_get_data ($id_user = false, $user_strict = false, $acltags, $
$list[$i]['_total_agents_'] = (int) tags_get_total_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_agents_unknown_'] = (int) tags_get_unknown_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_agents_not_init_'] = (int) tags_get_not_init_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_agents_critical_'] = (int) tags_get_critical_agents ($id, $acltags, $agent_filter, $module_filter, $config["realtimestats"]);
$list[$i]['_monitors_ok_'] = (int) tags_get_normal_monitors ($id, $acltags, $agent_filter, $module_filter);
$list[$i]['_monitors_critical_'] = (int) tags_get_critical_monitors ($id, $acltags, $agent_filter, $module_filter);
$list[$i]['_monitors_warning_'] = (int) tags_get_warning_monitors ($id, $acltags, $agent_filter, $module_filter);

View File

@ -91,12 +91,6 @@ $(document).ready (function () {
);
return false;
});
return false;
});

View File

@ -71,7 +71,7 @@
<div style='height: 10px'>
<?php
$version = '6.1dev';
$build = '160922';
$build = '160926';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -67,6 +67,12 @@ if (!empty ($config["https"]) && empty ($_SERVER['HTTPS'])) {
$system = System::getInstance();
//~ In this moment doesn't work the version mobile when have metaconsole version.
//~ In the future versions of pandora maybe is added a mobile version of PandoraFMS Metaconsole version.
if ($system->getConfig('metaconsole'))
header ("Location: " . $system->getConfig('homeurl') . "enterprise/meta");
require_once($system->getConfig('homedir').'/include/constants.php');
$user = User::getInstance();

View File

@ -79,6 +79,7 @@ $monitor_critical = 0;
$monitor_unknown = 0;
$monitor_not_init = 0;
$agents_unknown = 0;
$agents_critical = 0;
$agents_notinit = 0;
$all_alerts_fired = 0;
@ -92,6 +93,7 @@ foreach ($all_data as $group_all_data) {
$agents_unknown += $group_all_data["_agents_unknown_"];
$agents_notinit += $group_all_data["_agents_not_init_"];
$agents_critical += $group_all_data["_agents_critical_"];
$all_alerts_fired += $group_all_data["_monitors_alerts_fired_"];
}
@ -106,6 +108,7 @@ $total_unknown = format_numeric (($monitor_unknown*100)/$total,2);
$total_monitor_not_init = format_numeric (($monitor_not_init*100)/$total,2);
//Agents
$total_agent_unknown = format_numeric (($agents_unknown*100)/$total_agentes,2);
$total_agent_critical = format_numeric (($agents_critical*100)/$total_agentes,2);
$total_not_init = format_numeric (($agents_notinit*100)/$total_agentes,2);
echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="databox">';
@ -120,6 +123,7 @@ echo '<table cellpadding="0" cellspacing="0" border="0" width="100%" class="data
echo "<td align='center'>";
echo "<span id='sumary' style='background-color:#B2B2B2;'>". $total_agent_unknown ."%</span>";
echo "<span id='sumary' style='background-color:#5bb6e5;'>". $total_not_init ."%</span>";
echo "<span id='sumary' style='background-color:#FC4444;'>". $total_critical ."%</span>";
echo "</td>";
echo "<td align='center'>";
echo "<span id='sumary' style='background-color:#FC4444;'>". $total_critical ."%</span>";

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.1dev
%define release 160922
%define release 160926
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 6.1dev
%define release 160922
%define release 160926
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -66,7 +66,7 @@ INSERT INTO tconfig (token, value) VALUES ('graph_res','5');
INSERT INTO tconfig (token, value) VALUES ('step_compact','1');
INSERT INTO tconfig (token, value) VALUES ('db_scheme_first_version','6.0orc');
INSERT INTO tconfig (token, value) VALUES('db_scheme_version','6.1dev');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160922');
INSERT INTO tconfig (token, value) VALUES('db_scheme_build','PD160926');
INSERT INTO tconfig (token, value) VALUES ('show_unknown','0');
INSERT INTO tconfig (token, value) VALUES ('show_lastalerts','1');
INSERT INTO tconfig (token, value) VALUES ('style','pandora');

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 6.1dev-160922
Version: 6.1dev-160926
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="6.1dev-160922"
pandora_version="6.1dev-160926"
package_cpan=0
package_pandora=1

View File

@ -43,7 +43,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "6.1dev";
my $pandora_build = "160922";
my $pandora_build = "160926";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -126,7 +126,7 @@ use constant FIRED_ALERT => 1;
# Set OS, OS version and /dev/null
our $OS = $^O;
our $OS_VERSION;
our $OS_VERSION = "unknown";
our $DEVNULL = '/dev/null';
if ($OS eq 'linux') {
$OS_VERSION = `lsb_release -sd 2>/dev/null`;
@ -136,6 +136,8 @@ if ($OS eq 'linux') {
$OS = "windows";
$OS_VERSION = `ver`;
$DEVNULL = '/Nul';
} elsif ($OS eq 'freebsd') {
$OS_VERSION = `uname -r`;
}
chomp($OS_VERSION);

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.1dev
%define release 160922
%define release 160926
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 6.1dev
%define release 160922
%define release 160926
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="6.1dev"
PI_BUILD="160922"
PI_BUILD="160926"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB;
# version: define current version
my $version = "6.1dev PS160922";
my $version = "6.1dev PS160926";
# Pandora server configuration
my %conf;

View File

@ -35,7 +35,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "6.1dev PS160922";
my $version = "6.1dev PS160926";
# save program name for logging
my $progname = basename($0);