mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Merge branch 'develop' into feature/#1978-REESCRITURA_DEL_MOTOR_DE_INFORMES
Conflicts: pandora_console/include/functions_reporting.php
This commit is contained in:
commit
f8e544b89e
@ -1,5 +1,5 @@
|
|||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 6.0dev-150326
|
Version: 6.0dev-150329
|
||||||
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="6.0dev-150326"
|
pandora_version="6.0dev-150329"
|
||||||
|
|
||||||
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 => '6.0dev';
|
use constant AGENT_VERSION => '6.0dev';
|
||||||
use constant AGENT_BUILD => '150326';
|
use constant AGENT_BUILD => '150329';
|
||||||
|
|
||||||
# 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 6.0dev
|
%define version 6.0dev
|
||||||
%define release 150326
|
%define release 150329
|
||||||
|
|
||||||
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 6.0dev
|
%define version 6.0dev
|
||||||
%define release 150326
|
%define release 150329
|
||||||
|
|
||||||
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
|
||||||
{150326}
|
{150329}
|
||||||
|
|
||||||
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 ("6.0dev(Build 150326)")
|
#define PANDORA_VERSION ("6.0dev(Build 150329)")
|
||||||
|
|
||||||
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", "(6.0dev(Build 150326))"
|
VALUE "ProductVersion", "(6.0dev(Build 150329))"
|
||||||
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: 6.0dev-150326
|
Version: 6.0dev-150329
|
||||||
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="6.0dev-150326"
|
pandora_version="6.0dev-150329"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
@ -58,50 +58,17 @@ switch($action) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($stats['agents'])) {
|
if (isset($stats['agents'])) {
|
||||||
if ($metaconsole) {
|
// TODO: GET STATUS OF THE AGENTS AND ADD IT TO SUMMARY
|
||||||
include_once ('include/functions_reporting.php');
|
$summary .= count($stats['agents']) .
|
||||||
|
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
|
||||||
$servers = db_get_all_rows_sql ("SELECT *
|
' ' . __('Agents') . "<br>";
|
||||||
FROM tmetaconsole_setup");
|
|
||||||
if ($servers === false)
|
|
||||||
$servers = array();
|
|
||||||
|
|
||||||
$total_agents = 0;
|
|
||||||
|
|
||||||
foreach ($servers as $server) {
|
|
||||||
// If connection was good then retrieve all data server
|
|
||||||
if (metaconsole_load_external_db ($server)) {
|
|
||||||
$connection = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$connection = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($connection)
|
|
||||||
$data = reporting_get_group_stats();
|
|
||||||
|
|
||||||
metaconsole_restore_db();
|
|
||||||
|
|
||||||
$total_agents += $data["total_agents"];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$total_agents = format_numeric($total_agents);
|
|
||||||
|
|
||||||
$summary .= $total_agents .
|
|
||||||
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
|
|
||||||
' ' . __('Agents') . "<br>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$summary .= count($stats['agents']) .
|
|
||||||
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
|
|
||||||
' ' . __('Agents') . "<br>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($stats['modules'])) {
|
if (isset($stats['modules'])) {
|
||||||
// TODO: GET STATUS OF THE MODULES AND ADD IT TO SUMMARY
|
// TODO: GET STATUS OF THE MODULES AND ADD IT TO SUMMARY
|
||||||
$summary .= count($stats['modules'])." x ".html_print_image('images/brick.png',true).' '.__('Modules')."<br>";
|
$summary .= count($stats['modules']) .
|
||||||
|
" x " . html_print_image($hack_metaconsole . 'images/brick.png',true) .
|
||||||
|
' ' . __('Modules') . "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<h3>'.__('Map summary').'</h3><strong>'.$summary.'</strong>';
|
echo '<h3>'.__('Map summary').'</h3><strong>'.$summary.'</strong>';
|
||||||
@ -120,46 +87,9 @@ switch($action) {
|
|||||||
$summary = '<br>';
|
$summary = '<br>';
|
||||||
|
|
||||||
if (isset($stats['agents'])) {
|
if (isset($stats['agents'])) {
|
||||||
if ($metaconsole) {
|
$summary .= count($stats['agents']) .
|
||||||
include_once ('include/functions_reporting.php');
|
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
|
||||||
|
' ' . __('Agents') . "<br>";
|
||||||
$servers = db_get_all_rows_sql ("SELECT *
|
|
||||||
FROM tmetaconsole_setup
|
|
||||||
WHERE id = " . $id_server);
|
|
||||||
if ($servers === false)
|
|
||||||
$servers = array();
|
|
||||||
|
|
||||||
$total_agents = 0;
|
|
||||||
|
|
||||||
foreach ($servers as $server) {
|
|
||||||
// If connection was good then retrieve all data server
|
|
||||||
if (metaconsole_load_external_db ($server)) {
|
|
||||||
$connection = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$connection = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($connection)
|
|
||||||
$data = reporting_get_group_stats();
|
|
||||||
|
|
||||||
metaconsole_restore_db();
|
|
||||||
|
|
||||||
$total_agents += $data["total_agents"];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$total_agents = format_numeric($total_agents);
|
|
||||||
|
|
||||||
$summary .= $total_agents .
|
|
||||||
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
|
|
||||||
' ' . __('Agents') . "<br>";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$summary .= count($stats['agents']) .
|
|
||||||
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
|
|
||||||
' ' . __('Agents') . "<br>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
echo '<h3>'.__('Map summary').'</h3><strong>'.$summary.'</strong>';
|
echo '<h3>'.__('Map summary').'</h3><strong>'.$summary.'</strong>';
|
||||||
break;
|
break;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC150326';
|
$build_version = 'PC150329';
|
||||||
$pandora_version = 'v6.0dev';
|
$pandora_version = 'v6.0dev';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
@ -376,7 +376,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
|
|||||||
|
|
||||||
// Get agent modules data
|
// Get agent modules data
|
||||||
if ($strict_user) {
|
if ($strict_user) {
|
||||||
$modules = tags_get_agent_modules ($agent['id_agente'], $acltags, false, $filter, false);
|
$modules = tags_get_agent_modules ($agent['id_agente'], false, $acltags, false, $filter, false);
|
||||||
} else {
|
} else {
|
||||||
$modules = agents_get_modules($agent['id_agente'], '*', $filter, true, true);
|
$modules = agents_get_modules($agent['id_agente'], '*', $filter, true, true);
|
||||||
}
|
}
|
||||||
@ -792,7 +792,7 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0,
|
|||||||
// Get agent modules data
|
// Get agent modules data
|
||||||
if ($strict_user) {
|
if ($strict_user) {
|
||||||
$filter['disabled'] = 0;
|
$filter['disabled'] = 0;
|
||||||
$modules = tags_get_agent_modules ($agent['id_agente'], $acltags, false, $filter, false);
|
$modules = tags_get_agent_modules ($agent['id_agente'], false, $acltags, false, $filter, false);
|
||||||
} else {
|
} else {
|
||||||
$modules = agents_get_modules ($agent['id_agente'], false, array('disabled' => 0), true, false);
|
$modules = agents_get_modules ($agent['id_agente'], false, array('disabled' => 0), true, false);
|
||||||
}
|
}
|
||||||
|
@ -2136,4 +2136,859 @@ function reporting_get_agentmodule_ttr ($id_agent_module, $period = 0, $date = 0
|
|||||||
|
|
||||||
return $critical_period;
|
return $critical_period;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all the template graphs a user can see.
|
||||||
|
*
|
||||||
|
* @param $id_user User id to check.
|
||||||
|
* @param $only_names Wheter to return only graphs names in an associative array
|
||||||
|
* or all the values.
|
||||||
|
* @param $returnAllGroup Wheter to return graphs of group All or not.
|
||||||
|
* @param $privileges Privileges to check in user group
|
||||||
|
*
|
||||||
|
* @return template graphs of a an user. Empty array if none.
|
||||||
|
*/
|
||||||
|
function reporting_template_graphs_get_user ($id_user = 0, $only_names = false, $returnAllGroup = true, $privileges = 'RR') {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
if (!$id_user) {
|
||||||
|
$id_user = $config['id_user'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$groups = users_get_groups ($id_user, $privileges, $returnAllGroup);
|
||||||
|
|
||||||
|
$all_templates = db_get_all_rows_in_table ('tgraph_template', 'name');
|
||||||
|
if ($all_templates === false)
|
||||||
|
return array ();
|
||||||
|
|
||||||
|
$templates = array ();
|
||||||
|
foreach ($all_templates as $template) {
|
||||||
|
if (!in_array($template['id_group'], array_keys($groups)))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ($template["id_user"] != $id_user && $template['private'])
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ($template["id_group"] > 0)
|
||||||
|
if (!isset($groups[$template["id_group"]])){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($only_names) {
|
||||||
|
$templates[$template['id_graph_template']] = $template['name'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$templates[$template['id_graph_template']] = $template;
|
||||||
|
$templatesCount = db_get_value_sql("SELECT COUNT(id_gs_template) FROM tgraph_source_template WHERE id_template = " . $template['id_graph_template']);
|
||||||
|
$templates[$template['id_graph_template']]['graphs_template_count'] = $templatesCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $templates;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a detailed reporting of groups's events.
|
||||||
|
*
|
||||||
|
* @param unknown_type $id_group Id of the group.
|
||||||
|
* @param unknown_type $period Time period of the report.
|
||||||
|
* @param unknown_type $date Date of the report.
|
||||||
|
* @param unknown_type $return Whether to return or not.
|
||||||
|
* @param unknown_type $html Whether to return HTML code or not.
|
||||||
|
*
|
||||||
|
* @return string Report of groups's events
|
||||||
|
*/
|
||||||
|
function reporting_get_count_events_by_agent ($id_group, $period = 0,
|
||||||
|
$date = 0,
|
||||||
|
$filter_event_validated = false, $filter_event_critical = false,
|
||||||
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
||||||
|
|
||||||
|
if (!is_numeric ($date)) {
|
||||||
|
$date = strtotime ($date);
|
||||||
|
}
|
||||||
|
if (empty ($date)) {
|
||||||
|
$date = get_system_time ();
|
||||||
|
}
|
||||||
|
|
||||||
|
return events_get_count_events_by_agent($id_group, $period, $date,
|
||||||
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
$filter_event_warning, $filter_event_no_validated);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a detailed reporting of groups's events.
|
||||||
|
*
|
||||||
|
* @param unknown_type $filter.
|
||||||
|
* @param unknown_type $period Time period of the report.
|
||||||
|
* @param unknown_type $date Date of the report.
|
||||||
|
* @param unknown_type $return Whether to return or not.
|
||||||
|
* @param unknown_type $html Whether to return HTML code or not.
|
||||||
|
*
|
||||||
|
* @return string Report of groups's events
|
||||||
|
*/
|
||||||
|
function reporting_get_count_events_validated_by_user ($filter, $period = 0,
|
||||||
|
$date = 0,
|
||||||
|
$filter_event_validated = false, $filter_event_critical = false,
|
||||||
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
||||||
|
|
||||||
|
if (!is_numeric ($date)) {
|
||||||
|
$date = strtotime ($date);
|
||||||
|
}
|
||||||
|
if (empty ($date)) {
|
||||||
|
$date = get_system_time ();
|
||||||
|
}
|
||||||
|
|
||||||
|
return events_get_count_events_validated_by_user($filter, $period, $date,
|
||||||
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
$filter_event_warning, $filter_event_no_validated);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a detailed reporting of groups's events.
|
||||||
|
*
|
||||||
|
* @param unknown_type $id_group Id of the group.
|
||||||
|
* @param unknown_type $period Time period of the report.
|
||||||
|
* @param unknown_type $date Date of the report.
|
||||||
|
* @param unknown_type $return Whether to return or not.
|
||||||
|
* @param unknown_type $html Whether to return HTML code or not.
|
||||||
|
*
|
||||||
|
* @return string Report of groups's events
|
||||||
|
*/
|
||||||
|
function reporting_get_count_events_by_criticity ($filter, $period = 0,
|
||||||
|
$date = 0,
|
||||||
|
$filter_event_validated = false, $filter_event_critical = false,
|
||||||
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
||||||
|
|
||||||
|
if (!is_numeric ($date)) {
|
||||||
|
$date = strtotime ($date);
|
||||||
|
}
|
||||||
|
if (empty ($date)) {
|
||||||
|
$date = get_system_time ();
|
||||||
|
}
|
||||||
|
|
||||||
|
return events_get_count_events_by_criticity($filter, $period, $date,
|
||||||
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
$filter_event_warning, $filter_event_no_validated);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a detailed reporting of groups's events.
|
||||||
|
*
|
||||||
|
* @param unknown_type $id_group Id of the group.
|
||||||
|
* @param unknown_type $period Time period of the report.
|
||||||
|
* @param unknown_type $date Date of the report.
|
||||||
|
* @param unknown_type $return Whether to return or not.
|
||||||
|
* @param unknown_type $html Whether to return HTML code or not.
|
||||||
|
*
|
||||||
|
* @return string Report of groups's events
|
||||||
|
*/
|
||||||
|
function reporting_get_count_events_validated ($filter, $period = 0,
|
||||||
|
$date = 0,
|
||||||
|
$filter_event_validated = false, $filter_event_critical = false,
|
||||||
|
$filter_event_warning = false, $filter_event_no_validated = false) {
|
||||||
|
|
||||||
|
if (!is_numeric ($date)) {
|
||||||
|
$date = strtotime ($date);
|
||||||
|
}
|
||||||
|
if (empty ($date)) {
|
||||||
|
$date = get_system_time ();
|
||||||
|
}
|
||||||
|
|
||||||
|
return events_get_count_events_validated($filter, $period, $date,
|
||||||
|
$filter_event_validated, $filter_event_critical,
|
||||||
|
$filter_event_warning, $filter_event_no_validated);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print tiny statistics of the status of one agent, group, etc.
|
||||||
|
*
|
||||||
|
* @param mixed Array with the counts of the total modules, normal modules, critical modules, warning modules, unknown modules and fired alerts
|
||||||
|
* @param bool return or echo flag
|
||||||
|
*
|
||||||
|
* @return string html formatted tiny stats of modules/alerts of an agent
|
||||||
|
*/
|
||||||
|
function reporting_tiny_stats ($counts_info, $return = false, $type = 'agent', $separator = ':', $strict_user = false) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$out = '';
|
||||||
|
|
||||||
|
// Depend the type of object, the stats will refer agents, modules...
|
||||||
|
switch ($type) {
|
||||||
|
case 'modules':
|
||||||
|
$template_title['total_count'] = __('%d Total modules');
|
||||||
|
$template_title['normal_count'] = __('%d Normal modules');
|
||||||
|
$template_title['critical_count'] = __('%d Critical modules');
|
||||||
|
$template_title['warning_count'] = __('%d Warning modules');
|
||||||
|
$template_title['unknown_count'] = __('%d Unknown modules');
|
||||||
|
break;
|
||||||
|
case 'agent':
|
||||||
|
$template_title['total_count'] = __('%d Total modules');
|
||||||
|
$template_title['normal_count'] = __('%d Normal modules');
|
||||||
|
$template_title['critical_count'] = __('%d Critical modules');
|
||||||
|
$template_title['warning_count'] = __('%d Warning modules');
|
||||||
|
$template_title['unknown_count'] = __('%d Unknown modules');
|
||||||
|
$template_title['fired_count'] = __('%d Fired alerts');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$template_title['total_count'] = __('%d Total agents');
|
||||||
|
$template_title['normal_count'] = __('%d Normal agents');
|
||||||
|
$template_title['critical_count'] = __('%d Critical agents');
|
||||||
|
$template_title['warning_count'] = __('%d Warning agents');
|
||||||
|
$template_title['unknown_count'] = __('%d Unknown agents');
|
||||||
|
$template_title['not_init_count'] = __('%d not init agents');
|
||||||
|
$template_title['fired_count'] = __('%d Fired alerts');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($strict_user && $type == 'agent') {
|
||||||
|
|
||||||
|
$acltags = tags_get_user_module_and_tags ($config['id_user'],'AR', $strict_user);
|
||||||
|
$filter['disabled'] = 0;
|
||||||
|
$id_agent = $counts_info['id_agente'];
|
||||||
|
|
||||||
|
$counts_info = array();
|
||||||
|
$counts_info['normal_count'] = count(tags_get_agent_modules ($id_agent, $acltags, false, $filter, false, AGENT_MODULE_STATUS_NORMAL));
|
||||||
|
$counts_info['warning_count'] = count(tags_get_agent_modules ($id_agent, $acltags, false, $filter, false, AGENT_MODULE_STATUS_WARNING));
|
||||||
|
$counts_info['critical_count'] = count(tags_get_agent_modules ($id_agent, $acltags, false, $filter, false, AGENT_MODULE_STATUS_CRITICAL_BAD));
|
||||||
|
$counts_info['notinit_count'] = count(tags_get_agent_modules ($id_agent, $acltags, false, $filter, false, AGENT_MODULE_STATUS_NOT_INIT));
|
||||||
|
$counts_info['unknown_count'] = count(tags_get_agent_modules ($id_agent, $acltags, false, $filter, false, AGENT_MODULE_STATUS_UNKNOWN));
|
||||||
|
$counts_info['total_count'] = $counts_info['normal_count'] + $counts_info['warning_count'] + $counts_info['critical_count'] + $counts_info['unknown_count'] + $counts_info['notinit_count'];
|
||||||
|
|
||||||
|
$all_agent_modules = tags_get_agent_modules ($id_agent, $acltags, false, $filter);
|
||||||
|
if (!empty($all_agent_modules)) {
|
||||||
|
$mod_clause = "(".implode(',', array_keys($all_agent_modules)).")";
|
||||||
|
|
||||||
|
$counts_info['fired_count'] = (int) db_get_sql ("SELECT COUNT(times_fired)
|
||||||
|
FROM talert_template_modules
|
||||||
|
WHERE times_fired != 0 AND id_agent_module IN ".$mod_clause);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$counts_info['fired_count'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the counts in a data structure to print hidden divs with titles
|
||||||
|
$stats = array();
|
||||||
|
|
||||||
|
if (isset($counts_info['total_count'])) {
|
||||||
|
$not_init = isset($counts_info['notinit_count']) ? $counts_info['notinit_count'] : 0;
|
||||||
|
$total_count = $counts_info['total_count'] - $not_init;
|
||||||
|
$stats[] = array('name' => 'total_count', 'count' => $total_count, 'title' => sprintf($template_title['total_count'], $total_count));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($counts_info['normal_count'])) {
|
||||||
|
$normal_count = $counts_info['normal_count'];
|
||||||
|
$stats[] = array('name' => 'normal_count', 'count' => $normal_count, 'title' => sprintf($template_title['normal_count'], $normal_count));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($counts_info['critical_count'])) {
|
||||||
|
$critical_count = $counts_info['critical_count'];
|
||||||
|
$stats[] = array('name' => 'critical_count', 'count' => $critical_count, 'title' => sprintf($template_title['critical_count'], $critical_count));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($counts_info['warning_count'])) {
|
||||||
|
$warning_count = $counts_info['warning_count'];
|
||||||
|
$stats[] = array('name' => 'warning_count', 'count' => $warning_count, 'title' => sprintf($template_title['warning_count'], $warning_count));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($counts_info['unknown_count'])) {
|
||||||
|
$unknown_count = $counts_info['unknown_count'];
|
||||||
|
$stats[] = array('name' => 'unknown_count', 'count' => $unknown_count, 'title' => sprintf($template_title['unknown_count'], $unknown_count));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($counts_info['not_init_count'])) {
|
||||||
|
$not_init_count = $counts_info['not_init_count'];
|
||||||
|
$stats[] = array('name' => 'not_init_count',
|
||||||
|
'count' => $not_init_count,
|
||||||
|
'title' => sprintf($template_title['not_init_count'], $not_init_count));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($template_title['fired_count'])) {
|
||||||
|
if (isset($counts_info['fired_count'])) {
|
||||||
|
$fired_count = $counts_info['fired_count'];
|
||||||
|
$stats[] = array('name' => 'fired_count', 'count' => $fired_count, 'title' => sprintf($template_title['fired_count'], $fired_count));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$uniq_id = uniqid();
|
||||||
|
|
||||||
|
foreach ($stats as $stat) {
|
||||||
|
$params = array('id' => 'forced_title_' . $stat['name'] . '_' . $uniq_id,
|
||||||
|
'class' => 'forced_title_layer',
|
||||||
|
'content' => $stat['title'],
|
||||||
|
'hidden' => true);
|
||||||
|
$out .= html_print_div($params, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// If total count is less than 0, is an error. Never show negative numbers
|
||||||
|
if ($total_count < 0) {
|
||||||
|
$total_count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= '<b>' . '<span id="total_count_' . $uniq_id . '" class="forced_title" style="font-size: 7pt">' . $total_count . '</span>';
|
||||||
|
if (isset($fired_count) && $fired_count > 0)
|
||||||
|
$out .= ' ' . $separator . ' <span class="orange forced_title" id="fired_count_' . $uniq_id . '" style="font-size: 7pt">' . $fired_count . '</span>';
|
||||||
|
if (isset($critical_count) && $critical_count > 0)
|
||||||
|
$out .= ' ' . $separator . ' <span class="red forced_title" id="critical_count_' . $uniq_id . '" style="font-size: 7pt">' . $critical_count . '</span>';
|
||||||
|
if (isset($warning_count) && $warning_count > 0)
|
||||||
|
$out .= ' ' . $separator . ' <span class="yellow forced_title" id="warning_count_' . $uniq_id . '" style="font-size: 7pt">' . $warning_count . '</span>';
|
||||||
|
if (isset($unknown_count) && $unknown_count > 0)
|
||||||
|
$out .= ' ' . $separator . ' <span class="grey forced_title" id="unknown_count_' . $uniq_id . '" style="font-size: 7pt">' . $unknown_count . '</span>';
|
||||||
|
if (isset($not_init_count) && $not_init_count > 0)
|
||||||
|
$out .= ' ' . $separator . ' <span class="blue forced_title" id="not_init_count_' . $uniq_id . '" style="font-size: 7pt">' . $not_init_count . '</span>';
|
||||||
|
if (isset($normal_count) && $normal_count > 0)
|
||||||
|
$out .= ' ' . $separator . ' <span class="green forced_title" id="normal_count_' . $uniq_id . '" style="font-size: 7pt">' . $normal_count . '</span>';
|
||||||
|
|
||||||
|
$out .= '</b>';
|
||||||
|
|
||||||
|
if ($return) {
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo $out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function reporting_network_interfaces_table ($content, $report, $mini, $item_title = "", &$table = null, &$pdf = null) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
include_once($config['homedir'] . "/include/functions_custom_graphs.php");
|
||||||
|
|
||||||
|
if (empty($item_title)) {
|
||||||
|
$group_name = groups_get_name($content['id_group']);
|
||||||
|
$item_title = __('Network interfaces') . " - " . sprintf(__('Group "%s"'), $group_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
$is_html = $table !== null;
|
||||||
|
$is_pdf = $pdf !== null;
|
||||||
|
|
||||||
|
$ttl = $is_pdf ? 2 : 1;
|
||||||
|
|
||||||
|
$graph_width = 900;
|
||||||
|
$graph_height = 200;
|
||||||
|
|
||||||
|
$datetime = $report['datetime'];
|
||||||
|
$period = $content['period'];
|
||||||
|
|
||||||
|
if ($is_pdf) {
|
||||||
|
$graph_width = 800;
|
||||||
|
$graph_height = 200;
|
||||||
|
pdf_header_content($pdf, $content, $report, $item_title, false, $content["description"]);
|
||||||
|
}
|
||||||
|
else if ($is_html) {
|
||||||
|
reporting_header_content($mini, $content, $report, $table, $item_title);
|
||||||
|
|
||||||
|
//RUNNING
|
||||||
|
$table->style[1] = 'text-align: right';
|
||||||
|
|
||||||
|
// Put description at the end of the module (if exists)
|
||||||
|
$table->colspan[0][1] = 2;
|
||||||
|
$next_row = 1;
|
||||||
|
if ($content["description"] != "") {
|
||||||
|
$table->colspan[$next_row][0] = 3;
|
||||||
|
$next_row++;
|
||||||
|
$data_desc = array();
|
||||||
|
$data_desc[0] = $content["description"];
|
||||||
|
array_push ($table->data, $data_desc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$filter = array(
|
||||||
|
'id_grupo' => $content['id_group'],
|
||||||
|
'disabled' => 0
|
||||||
|
);
|
||||||
|
$network_interfaces_by_agents = agents_get_network_interfaces(false, $filter);
|
||||||
|
|
||||||
|
if (empty($network_interfaces_by_agents)) {
|
||||||
|
if ($is_pdf) {
|
||||||
|
$pdf->addHTML(__('The group has no agents or none of the agents has any network interface'));
|
||||||
|
}
|
||||||
|
else if ($is_html) {
|
||||||
|
$data = array();
|
||||||
|
$data[0] = __('The group has no agents or none of the agents has any network interface');
|
||||||
|
$table->colspan[$next_row][0] = 3;
|
||||||
|
array_push ($table->data, $data);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
foreach ($network_interfaces_by_agents as $agent_id => $agent) {
|
||||||
|
|
||||||
|
$table_agent = new StdCLass();
|
||||||
|
$table_agent->width = '100%';
|
||||||
|
$table_agent->data = array();
|
||||||
|
$table_agent->head = array();
|
||||||
|
$table_agent->head[0] = sprintf(__("Agent '%s'"), $agent['name']);
|
||||||
|
$table_agent->headstyle = array();
|
||||||
|
$table_agent->headstyle[0] = 'font-size: 16px;';
|
||||||
|
$table_agent->style[0] = 'text-align: center';
|
||||||
|
|
||||||
|
if ($is_pdf) {
|
||||||
|
$table_agent->class = 'table_sla table_beauty';
|
||||||
|
$table_agent->headstyle[0] = 'background: #373737; color: #FFF; display: table-cell; font-size: 16px; border: 1px solid grey';
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_agent->data['interfaces'] = "";
|
||||||
|
|
||||||
|
foreach ($agent['interfaces'] as $interface_name => $interface) {
|
||||||
|
$table_interface = new StdClass();
|
||||||
|
$table_interface->width = '100%';
|
||||||
|
$table_interface->data = array();
|
||||||
|
$table_interface->rowstyle = array();
|
||||||
|
$table_interface->head = array();
|
||||||
|
$table_interface->cellstyle = array();
|
||||||
|
$table_interface->title = sprintf(__("Interface '%s' throughput graph"), $interface_name);
|
||||||
|
$table_interface->head['ip'] = __('IP');
|
||||||
|
$table_interface->head['mac'] = __('Mac');
|
||||||
|
$table_interface->head['status'] = __('Actual status');
|
||||||
|
$table_interface->style['ip'] = 'text-align: left';
|
||||||
|
$table_interface->style['mac'] = 'text-align: left';
|
||||||
|
$table_interface->style['status'] = 'width: 150px; text-align: center';
|
||||||
|
|
||||||
|
if ($is_pdf) {
|
||||||
|
$table_interface->class = 'table_sla table_beauty';
|
||||||
|
$table_interface->titlestyle = 'background: #373737; color: #FFF; display: table-cell; font-size: 12px; border: 1px solid grey';
|
||||||
|
|
||||||
|
$table_interface->headstyle['ip'] = 'text-align: left; background: #666; color: #FFF; display: table-cell; font-size: 11px; border: 1px solid grey';
|
||||||
|
$table_interface->headstyle['mac'] = 'text-align: left; background: #666; color: #FFF; display: table-cell; font-size: 11px; border: 1px solid grey';
|
||||||
|
$table_interface->headstyle['status'] = 'background: #666; color: #FFF; display: table-cell; font-size: 11px; border: 1px solid grey';
|
||||||
|
|
||||||
|
$table_interface->style['ip'] = 'text-align: left; display: table-cell; font-size: 10px;';
|
||||||
|
$table_interface->style['mac'] = 'text-align: left; display: table-cell; font-size: 10px;';
|
||||||
|
$table_interface->style['status'] = 'text-align: center; display: table-cell; font-size: 10px;';
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$data['ip'] = !empty($interface['ip']) ? $interface['ip'] : "--";
|
||||||
|
$data['mac'] = !empty($interface['mac']) ? $interface['mac'] : "--";
|
||||||
|
$data['status'] = $interface['status_image'];
|
||||||
|
$table_interface->data['data'] = $data;
|
||||||
|
|
||||||
|
if (!empty($interface['traffic'])) {
|
||||||
|
|
||||||
|
$only_image = !(bool)$config['flash_charts'] || $is_pdf ? true : false;
|
||||||
|
|
||||||
|
$graph = custom_graphs_print(0,
|
||||||
|
$graph_height,
|
||||||
|
$graph_width,
|
||||||
|
$period,
|
||||||
|
null,
|
||||||
|
true,
|
||||||
|
$date,
|
||||||
|
$only_image,
|
||||||
|
'white',
|
||||||
|
array_values($interface['traffic']),
|
||||||
|
$config['homeurl'],
|
||||||
|
array_keys($interface['traffic']),
|
||||||
|
array_fill(0, count($interface['traffic']),"bytes/s"),
|
||||||
|
false,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
$ttl);
|
||||||
|
|
||||||
|
$table_interface->data['graph'] = $graph;
|
||||||
|
$table_interface->colspan['graph'][0] = count($table_interface->head);
|
||||||
|
$table_interface->cellstyle['graph'][0] = 'text-align: center;';
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_agent->data['interfaces'] .= html_print_table($table_interface, true);
|
||||||
|
$table_agent->colspan[$interface_name][0] = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($is_html) {
|
||||||
|
$table->data[$agent_id] = html_print_table($table_agent, true);
|
||||||
|
$table->colspan[$agent_id][0] = 3;
|
||||||
|
}
|
||||||
|
else if ($is_pdf) {
|
||||||
|
$html = html_print_table($table_agent, true);
|
||||||
|
$pdf->addHTML($html);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function reporting_get_agents_by_status ($data, $graph_width = 250, $graph_height = 150, $links = false) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
if ($links == false) {
|
||||||
|
$links = array();
|
||||||
|
}
|
||||||
|
|
||||||
|
$table_agent = html_get_predefined_table();
|
||||||
|
|
||||||
|
$agent_data = array();
|
||||||
|
$agent_data[0] = html_print_image('images/agent_critical.png', true, array('title' => __('Agents critical')));
|
||||||
|
$agent_data[1] = "<a style='color: #FC4444;' href='" . $links['agents_critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>";
|
||||||
|
$agent_data[1] .= format_numeric($data["agent_critical"]) <= 0 ? '-' : format_numeric($data['agent_critical']);
|
||||||
|
$agent_data[1] .= "</span></b></a>";
|
||||||
|
|
||||||
|
$agent_data[2] = html_print_image('images/agent_warning.png', true, array('title' => __('Agents warning')));
|
||||||
|
$agent_data[3] = "<a style='color: #FAD403;' href='" . $links['agents_warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>";
|
||||||
|
$agent_data[3] .= $data["agent_warning"] <= 0 ? '-' : format_numeric($data['agent_warning']);
|
||||||
|
$agent_data[3] .= "</span></b></a>";
|
||||||
|
|
||||||
|
$table_agent->data[] = $agent_data;
|
||||||
|
|
||||||
|
$agent_data = array();
|
||||||
|
$agent_data[0] = html_print_image('images/agent_ok.png', true, array('title' => __('Agents ok')));
|
||||||
|
$agent_data[1] = "<a style='color: #80BA27;' href='" . $links['agents_ok'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #80BA27;'>";
|
||||||
|
$agent_data[1] .= $data["agent_ok"] <= 0 ? '-' : format_numeric($data['agent_ok']);
|
||||||
|
$agent_data[1] .= "</span></b></a>";
|
||||||
|
|
||||||
|
$agent_data[2] = html_print_image('images/agent_unknown.png', true, array('title' => __('Agents unknown')));
|
||||||
|
$agent_data[3] = "<a style='color: #B2B2B2;' href='" . $links['agents_unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>";
|
||||||
|
$agent_data[3] .= $data["agent_unknown"] <= 0 ? '-' : format_numeric($data['agent_unknown']);
|
||||||
|
$agent_data[3] .= "</span></b></a>";
|
||||||
|
|
||||||
|
$table_agent->data[] = $agent_data;
|
||||||
|
|
||||||
|
$agent_data = array();
|
||||||
|
$agent_data[0] = html_print_image('images/agent_notinit.png', true, array('title' => __('Agents not init')));
|
||||||
|
$agent_data[1] = "<a style='color: #5BB6E5;' href='" . $links['agents_not_init'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #5BB6E5;'>";
|
||||||
|
$agent_data[1] .= $data["agent_not_init"] <= 0 ? '-' : format_numeric($data['agent_not_init']);
|
||||||
|
$agent_data[1] .= "</span></b></a>";
|
||||||
|
|
||||||
|
$agent_data[2] = "";
|
||||||
|
$agent_data[3] = "";
|
||||||
|
$table_agent->data[] = $agent_data;
|
||||||
|
|
||||||
|
|
||||||
|
if (!defined('METACONSOLE')) {
|
||||||
|
$agents_data = '<fieldset class="databox tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Agents by status') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table_agent, true) . '</fieldset>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$table_agent->style=array();
|
||||||
|
$table_agent->class = "tactical_view";
|
||||||
|
$agents_data = '<fieldset class="tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Agents by status') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table_agent, true) . '</fieldset>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $agents_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function reporting_get_total_agents_and_monitors ($data, $graph_width = 250, $graph_height = 150) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$total_agent = $data['agent_ok'] + $data['agent_warning'] + $data['agent_critical'] + $data['gent_unknown'] + $data['agent_not_init'];
|
||||||
|
$total_module = $data['monitor_ok'] + $data['monitor_warning'] + $data['monitor_critical'] + $data['monitor_unknown'] + $data['monitor_not_init'];
|
||||||
|
|
||||||
|
$table_total = html_get_predefined_table();
|
||||||
|
|
||||||
|
$total_data = array();
|
||||||
|
$total_data[0] = html_print_image('images/agent.png', true, array('title' => __('Total agents')));
|
||||||
|
$total_data[1] = $total_agent <= 0 ? '-' : $total_agent;
|
||||||
|
$total_data[2] = html_print_image('images/module.png', true, array('title' => __('Monitor checks')));
|
||||||
|
$total_data[3] = $total_module <= 0 ? '-' : $total_module;
|
||||||
|
$table_total->data[] = $total_data;
|
||||||
|
$total_agent_module = '<fieldset class="databox tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Total agents and monitors') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table_total, true) . '</fieldset>';
|
||||||
|
|
||||||
|
return $total_agent_module;
|
||||||
|
}
|
||||||
|
|
||||||
|
function reporting_get_total_servers ($num_servers) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$table_node = html_get_predefined_table();
|
||||||
|
|
||||||
|
$node_data = array();
|
||||||
|
$node_data[0] = html_print_image('images/server_export.png', true, array('title' => __('Nodes')));
|
||||||
|
$node_data[1] = "<b><span style='font-size: 12pt; font-weight: bold; color: black;'>";
|
||||||
|
$node_data[1] .= $num_servers <= 0 ? '-' : format_numeric($num_servers);
|
||||||
|
$node_data[1] .= "</span></b>";
|
||||||
|
$table_node->data[] = $node_data;
|
||||||
|
|
||||||
|
if (!defined('METACONSOLE')){
|
||||||
|
$node_overview = '<fieldset class="databox tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Node overview') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table_node, true) . '</fieldset>';
|
||||||
|
}else{
|
||||||
|
$table_node->style = array();
|
||||||
|
$table_node->class = "tactical_view";
|
||||||
|
$node_overview = '<fieldset class="tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Node overview') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table_node, true) . '</fieldset>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $node_overview;
|
||||||
|
}
|
||||||
|
|
||||||
|
function reporting_get_events ($data, $links = false) {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
$table_events->width = "100%";
|
||||||
|
if (defined('METACONSOLE'))
|
||||||
|
$style = " vertical-align:middle;";
|
||||||
|
else
|
||||||
|
$style = "";
|
||||||
|
if (defined('METACONSOLE')){
|
||||||
|
$table_events->style[0] = "background-color:#FC4444";
|
||||||
|
$table_events->data[0][0] = html_print_image('images/module_event_critical.png', true, array('title' => __('Critical events')));
|
||||||
|
$table_events->data[0][0] .= " " .
|
||||||
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['critical'] . "'>";
|
||||||
|
$table_events->data[0][0] .= format_numeric($data['critical']) <= 0 ? ' -' : format_numeric($data['critical']);
|
||||||
|
$table_events->data[0][0] .= "</a>";
|
||||||
|
$table_events->style[1] = "background-color:#FAD403";
|
||||||
|
$table_events->data[0][1] = html_print_image('images/module_event_warning.png', true, array('title' => __('Warning events')));
|
||||||
|
$table_events->data[0][1] .= " " .
|
||||||
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['warning'] . "'>";
|
||||||
|
$table_events->data[0][1] .= format_numeric($data['warning']) <= 0 ? ' -' : format_numeric($data['warning']);
|
||||||
|
$table_events->data[0][1] .= "</a>";
|
||||||
|
$table_events->style[2] = "background-color:#80BA27";
|
||||||
|
$table_events->data[0][2] = html_print_image('images/module_event_ok.png', true, array('title' => __('OK events')));
|
||||||
|
$table_events->data[0][2] .= " " .
|
||||||
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['normal'] . "'>";
|
||||||
|
$table_events->data[0][2] .= format_numeric($data['normal']) <= 0 ? ' -' : format_numeric($data['normal']);
|
||||||
|
$table_events->data[0][2] .= "</a>";
|
||||||
|
$table_events->style[3] = "background-color:#B2B2B2";
|
||||||
|
$table_events->data[0][3] = html_print_image('images/module_event_unknown.png', true, array('title' => __('Unknown events')));
|
||||||
|
$table_events->data[0][3] .= " " .
|
||||||
|
"<a style='color:#FFF; font-size: 12pt; font-weight: bold;" . $style . "' href='" . $links['unknown'] . "'>";
|
||||||
|
$table_events->data[0][3] .=format_numeric($data['unknown']) <= 0 ? ' -' : format_numeric($data['unknown']);
|
||||||
|
$table_events->data[0][3] .="</a>";
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$table_events->data[0][0] = html_print_image('images/module_critical.png', true, array('title' => __('Critical events')));
|
||||||
|
$table_events->data[0][0] .= " " .
|
||||||
|
"<a style='color: #FC4444;" . $style . "' href='" . $links['critical'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FC4444;'>".
|
||||||
|
format_numeric($data['critical'])."</span></b></a>";
|
||||||
|
$table_events->data[0][1] = html_print_image('images/module_warning.png', true, array('title' => __('Warning events')));
|
||||||
|
$table_events->data[0][1] .= " " .
|
||||||
|
"<a style='color: #FAD403;" . $style . "' href='" . $links['warning'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #FAD403;'>".
|
||||||
|
format_numeric($data['warning'])."</span></b></a>";
|
||||||
|
$table_events->data[0][2] = html_print_image('images/module_ok.png', true, array('title' => __('OK events')));
|
||||||
|
$table_events->data[0][2] .= " " .
|
||||||
|
"<a style='color: #80BA27;" . $style . "' href='" . $links['normal'] . "'><b style='font-size: 12pt; font-weight: bold; color: #80BA27;'>".
|
||||||
|
format_numeric($data['normal'])."</b></a>";
|
||||||
|
$table_events->data[0][3] = html_print_image('images/module_unknown.png', true, array('title' => __('Unknown events')));
|
||||||
|
$table_events->data[0][3] .= " " .
|
||||||
|
"<a style='color: #B2B2B2;" . $style . "' href='" . $links['unknown'] . "'><b><span style='font-size: 12pt; font-weight: bold; color: #B2B2B2;'>".
|
||||||
|
format_numeric($data['unknown'])."</span></b></a>";
|
||||||
|
|
||||||
|
}
|
||||||
|
if (!defined('METACONSOLE')) {
|
||||||
|
$event_view = '<fieldset class="databox tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Events by criticity') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table_events, true) . '</fieldset>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$table_events->class="tactical_view";
|
||||||
|
$table_events->styleTable="text-align:center;";
|
||||||
|
$table_events->size[0]="10%";
|
||||||
|
$table_events->size[1]="10%";
|
||||||
|
$table_events->size[2]="10%";
|
||||||
|
$table_events->size[3]="10%";
|
||||||
|
|
||||||
|
$event_view = '<fieldset class="tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Important Events by Criticity') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table_events, true) . '</fieldset>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $event_view;
|
||||||
|
}
|
||||||
|
|
||||||
|
function reporting_get_last_activity() {
|
||||||
|
global $config;
|
||||||
|
|
||||||
|
// Show last activity from this user
|
||||||
|
|
||||||
|
$table->width = '100%';
|
||||||
|
$table->data = array ();
|
||||||
|
$table->size = array ();
|
||||||
|
$table->size[2] = '150px';
|
||||||
|
$table->size[3] = '130px';
|
||||||
|
$table->size[5] = '200px';
|
||||||
|
$table->head = array ();
|
||||||
|
$table->head[0] = __('User');
|
||||||
|
$table->head[1] = '';
|
||||||
|
$table->head[2] = __('Action');
|
||||||
|
$table->head[3] = __('Date');
|
||||||
|
$table->head[4] = __('Source IP');
|
||||||
|
$table->head[5] = __('Comments');
|
||||||
|
$table->title = '<span>' . __('Last activity in Pandora FMS console') . '</span>';
|
||||||
|
|
||||||
|
switch ($config["dbtype"]) {
|
||||||
|
case "mysql":
|
||||||
|
$sql = sprintf ("SELECT id_usuario,accion,fecha,ip_origen,descripcion,utimestamp
|
||||||
|
FROM tsesion
|
||||||
|
WHERE (`utimestamp` > UNIX_TIMESTAMP(NOW()) - " . SECONDS_1WEEK . ")
|
||||||
|
AND `id_usuario` = '%s' ORDER BY `utimestamp` DESC LIMIT 5", $config["id_user"]);
|
||||||
|
break;
|
||||||
|
case "postgresql":
|
||||||
|
$sql = sprintf ("SELECT \"id_usuario\", accion, fecha, \"ip_origen\", descripcion, utimestamp
|
||||||
|
FROM tsesion
|
||||||
|
WHERE (\"utimestamp\" > ceil(date_part('epoch', CURRENT_TIMESTAMP)) - " . SECONDS_1WEEK . ")
|
||||||
|
AND \"id_usuario\" = '%s' ORDER BY \"utimestamp\" DESC LIMIT 5", $config["id_user"]);
|
||||||
|
break;
|
||||||
|
case "oracle":
|
||||||
|
$sql = sprintf ("SELECT id_usuario, accion, fecha, ip_origen, descripcion, utimestamp
|
||||||
|
FROM tsesion
|
||||||
|
WHERE ((utimestamp > ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (" . SECONDS_1DAY . ")) - " . SECONDS_1WEEK . ")
|
||||||
|
AND id_usuario = '%s') AND rownum <= 10 ORDER BY utimestamp DESC", $config["id_user"]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sessions = db_get_all_rows_sql ($sql);
|
||||||
|
|
||||||
|
if ($sessions === false)
|
||||||
|
$sessions = array ();
|
||||||
|
|
||||||
|
foreach ($sessions as $session) {
|
||||||
|
$data = array ();
|
||||||
|
|
||||||
|
switch ($config["dbtype"]) {
|
||||||
|
case "mysql":
|
||||||
|
case "oracle":
|
||||||
|
$session_id_usuario = $session['id_usuario'];
|
||||||
|
$session_ip_origen = $session['ip_origen'];
|
||||||
|
break;
|
||||||
|
case "postgresql":
|
||||||
|
$session_id_usuario = $session['id_usuario'];
|
||||||
|
$session_ip_origen = $session['ip_origen'];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$data[0] = '<strong>' . $session_id_usuario . '</strong>';
|
||||||
|
$data[1] = ui_print_session_action_icon ($session['accion'], true);
|
||||||
|
$data[2] = $session['accion'];
|
||||||
|
$data[3] = ui_print_help_tip($session['fecha'], true) . human_time_comparation($session['utimestamp'], 'tiny');
|
||||||
|
$data[4] = $session_ip_origen;
|
||||||
|
$data[5] = io_safe_output ($session['descripcion']);
|
||||||
|
|
||||||
|
array_push ($table->data, $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(defined("METACONSOLE"))
|
||||||
|
$table->class="databox_tactical";
|
||||||
|
|
||||||
|
return html_print_table ($table, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function reporting_get_event_histogram ($events) {
|
||||||
|
global $config;
|
||||||
|
include_once ('../../include/graphs/functions_gd.php');
|
||||||
|
$max_value = count($events);
|
||||||
|
if (defined("METACONSOLE"))
|
||||||
|
$max_value = SECONDS_1HOUR;
|
||||||
|
|
||||||
|
$ttl = 1;
|
||||||
|
$urlImage = ui_get_full_url(false, true, false, false);
|
||||||
|
|
||||||
|
$colors = array(
|
||||||
|
EVENT_CRIT_MAINTENANCE => COL_MAINTENANCE,
|
||||||
|
EVENT_CRIT_INFORMATIONAL => COL_INFORMATIONAL,
|
||||||
|
EVENT_CRIT_NORMAL => COL_NORMAL,
|
||||||
|
EVENT_CRIT_MINOR => COL_MINOR,
|
||||||
|
EVENT_CRIT_WARNING => COL_WARNING,
|
||||||
|
EVENT_CRIT_MAJOR => COL_MAJOR,
|
||||||
|
EVENT_CRIT_CRITICAL => COL_CRITICAL
|
||||||
|
);
|
||||||
|
if(defined("METACONSOLE")){
|
||||||
|
$full_legend = array();
|
||||||
|
$cont = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($events as $data) {
|
||||||
|
|
||||||
|
switch ($data['criticity']) {
|
||||||
|
case 0:
|
||||||
|
$color = EVENT_CRIT_MAINTENANCE;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$color = EVENT_CRIT_INFORMATIONAL;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$color = EVENT_CRIT_NORMAL;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$color = EVENT_CRIT_WARNING;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$color = EVENT_CRIT_CRITICAL;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
$color = EVENT_CRIT_MINOR;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
$color = EVENT_CRIT_MAJOR;
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
$color = EVENT_CRIT_NOT_NORMAL;
|
||||||
|
break;
|
||||||
|
case 34:
|
||||||
|
$color = EVENT_CRIT_WARNING_OR_CRITICAL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(defined("METACONSOLE")){
|
||||||
|
$full_legend[$cont] = $data['timestamp'];
|
||||||
|
$graph_data[] = array(
|
||||||
|
'data' => $color,
|
||||||
|
'utimestamp' => $data['utimestamp'] - get_system_time ()
|
||||||
|
);
|
||||||
|
$cont++;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$graph_data[] = array(
|
||||||
|
'data' => $color,
|
||||||
|
'utimestamp' => 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$table->width = '100%';
|
||||||
|
$table->data = array ();
|
||||||
|
$table->size = array ();
|
||||||
|
$table->head = array ();
|
||||||
|
$table->title = '<span>' . __('Events info (1hr.)') . '</span>';
|
||||||
|
$table->data[0][0] = "" ;
|
||||||
|
|
||||||
|
if (!empty($graph_data)) {
|
||||||
|
if (defined("METACONSOLE"))
|
||||||
|
$slicebar = flot_slicesbar_graph($graph_data, $max_value, "100%", 35, $full_legend, $colors, $config['fontpath'], $config['round_corner'], $urlImage);
|
||||||
|
else
|
||||||
|
$slicebar = slicesbar_graph($graph_data, $max_value, 700, 25, $colors, $config['fontpath'], $config['round_corner'], $urlImage, $ttl);
|
||||||
|
|
||||||
|
$table->data[0][0] = $slicebar;
|
||||||
|
} else {
|
||||||
|
$table->data[0][0] = __('No events');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!defined('METACONSOLE')){
|
||||||
|
$event_graph = '<fieldset class="databox tactical_set">
|
||||||
|
<legend>' .
|
||||||
|
__('Events info (1hr)') .
|
||||||
|
'</legend>' .
|
||||||
|
html_print_table($table, true) . '</fieldset>';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$table->class='tactical_view';
|
||||||
|
$event_graph = '<fieldset id="event_tactical" class="tactical_set">' .
|
||||||
|
html_print_table($table, true) . '</fieldset>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $event_graph;
|
||||||
|
}
|
||||||
?>
|
?>
|
@ -2242,7 +2242,7 @@ function tags_get_user_module_and_tags ($id_user = false, $access = 'AR', $stric
|
|||||||
$tags_and_groups_aux = array();
|
$tags_and_groups_aux = array();
|
||||||
foreach ($tags_and_groups as $data) {
|
foreach ($tags_and_groups as $data) {
|
||||||
// All group
|
// All group
|
||||||
if ($data['id_grupo'] === 0) {
|
if ((int)$data['id_grupo'] === 0) {
|
||||||
// All group with empty tags. All groups without tags permission!
|
// All group with empty tags. All groups without tags permission!
|
||||||
if (empty($data['tags'])) {
|
if (empty($data['tags'])) {
|
||||||
foreach ($all_group_ids as $group_id) {
|
foreach ($all_group_ids as $group_id) {
|
||||||
@ -2312,7 +2312,7 @@ function tags_get_all_user_agents ($id_tag = false, $id_user = false, $groups_an
|
|||||||
$groups_clause = " AND ".tags_get_acl_tags_module_condition($groups_and_tags, "tagente_modulo");
|
$groups_clause = " AND ".tags_get_acl_tags_module_condition($groups_and_tags, "tagente_modulo");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$groups_clause = " AND tagente.id_grupo IN (".implode(',',$groups_and_tags).")";
|
$groups_clause = " AND tagente.id_grupo IN (".implode(',', array_keys($groups_and_tags)).")";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($filter['id_group'])) {
|
if (!empty($filter['id_group'])) {
|
||||||
@ -2433,7 +2433,7 @@ function tags_get_all_user_agents ($id_tag = false, $id_user = false, $groups_an
|
|||||||
return $user_agents;
|
return $user_agents;
|
||||||
}
|
}
|
||||||
|
|
||||||
function tags_get_agent_modules ($id_agent, $groups_and_tags = array(), $fields = false, $filter = false, $return_all_fields = false, $get_filter_status = -1) {
|
function tags_get_agent_modules ($id_agent, $id_tag = false, $groups_and_tags = array(), $fields = false, $filter = false, $return_all_fields = false, $get_filter_status = -1) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -2441,6 +2441,12 @@ function tags_get_agent_modules ($id_agent, $groups_and_tags = array(), $fields
|
|||||||
if (empty($id_agent))
|
if (empty($id_agent))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (empty($id_tag)) {
|
||||||
|
$tag_filter = "";
|
||||||
|
} else {
|
||||||
|
$tag_filter = " AND tagente_modulo.id_agente_modulo IN (SELECT id_agente_modulo FROM ttag_module WHERE id_tag = $id_tag) ";
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_array ($fields)) {
|
if (!is_array ($fields)) {
|
||||||
$fields = array ();
|
$fields = array ();
|
||||||
$fields[0] = "tagente_modulo.id_agente_modulo";
|
$fields[0] = "tagente_modulo.id_agente_modulo";
|
||||||
@ -2459,12 +2465,11 @@ function tags_get_agent_modules ($id_agent, $groups_and_tags = array(), $fields
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$tag_filter = "";
|
|
||||||
if (!empty($groups_and_tags)) {
|
if (!empty($groups_and_tags)) {
|
||||||
$agent_group = db_get_value('id_grupo', 'tagente', 'id_agente', $id_agent);
|
$agent_group = db_get_value('id_grupo', 'tagente', 'id_agente', $id_agent);
|
||||||
if (isset($groups_and_tags[$agent_group]) && ($groups_and_tags[$agent_group] != '')) {
|
if (isset($groups_and_tags[$agent_group]) && ($groups_and_tags[$agent_group] != '')) {
|
||||||
//~ $tag_filter = " AND ttag_module.id_tag IN (".$groups_and_tags[$agent_group].")";
|
//~ $tag_filter = " AND ttag_module.id_tag IN (".$groups_and_tags[$agent_group].")";
|
||||||
$tag_filter = " AND tagente_modulo.id_agente_modulo IN (SELECT id_agente_modulo FROM ttag_module WHERE id_tag IN (".$groups_and_tags[$agent_group]."))";
|
$tag_filter .= " AND tagente_modulo.id_agente_modulo IN (SELECT id_agente_modulo FROM ttag_module WHERE id_tag IN (".$groups_and_tags[$agent_group]."))";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -721,6 +721,8 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $
|
|||||||
$fontsize = 7;
|
$fontsize = 7;
|
||||||
|
|
||||||
$extra_height = 15;
|
$extra_height = 15;
|
||||||
|
if (defined("METACONSOLE"))
|
||||||
|
$extra_height = 20;
|
||||||
|
|
||||||
$return .= "<div id='extra_$graph_id' style='font-size: ".$fontsize."pt; display:none; position:absolute; overflow: auto; height: ".$extra_height."px; background:#fff; padding: 2px 2px 2px 2px; border: solid #000 1px;'></div>";
|
$return .= "<div id='extra_$graph_id' style='font-size: ".$fontsize."pt; display:none; position:absolute; overflow: auto; height: ".$extra_height."px; background:#fff; padding: 2px 2px 2px 2px; border: solid #000 1px;'></div>";
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '6.0dev';
|
$version = '6.0dev';
|
||||||
$build = '150326';
|
$build = '150329';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
@ -438,6 +438,7 @@ if (is_ajax ()) {
|
|||||||
|
|
||||||
$server = null;
|
$server = null;
|
||||||
if ($metaconsole) {
|
if ($metaconsole) {
|
||||||
|
$strict_user = (bool) db_get_value('strict_acl', 'tusuario', 'id_user', $config['id_user']);
|
||||||
$server = db_get_row('tmetaconsole_setup', 'id', $id_server);
|
$server = db_get_row('tmetaconsole_setup', 'id', $id_server);
|
||||||
|
|
||||||
if (metaconsole_connect($server) != NOERR) {
|
if (metaconsole_connect($server) != NOERR) {
|
||||||
@ -527,7 +528,7 @@ if (is_ajax ()) {
|
|||||||
$size_bad_modules = sizeof ($bad_modules);
|
$size_bad_modules = sizeof ($bad_modules);
|
||||||
|
|
||||||
// Modules down
|
// Modules down
|
||||||
if ($size_bad_modules > 0) {
|
if ($size_bad_modules > 0 && (!$metaconsole || !$strict_user)) {
|
||||||
echo '<strong>'.__('Monitors down').':</strong> '.$size_bad_modules.' / '.$total_modules;
|
echo '<strong>'.__('Monitors down').':</strong> '.$size_bad_modules.' / '.$total_modules;
|
||||||
echo '<ul>';
|
echo '<ul>';
|
||||||
foreach ($bad_modules as $module) {
|
foreach ($bad_modules as $module) {
|
||||||
@ -561,7 +562,7 @@ if (is_ajax ()) {
|
|||||||
$alert_modules = db_get_sql ($sql);
|
$alert_modules = db_get_sql ($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($alert_modules > 0) {
|
if ($alert_modules > 0 && (!$metaconsole || !$strict_user)) {
|
||||||
$sql = sprintf ('SELECT tagente_modulo.nombre, talert_template_modules.last_fired
|
$sql = sprintf ('SELECT tagente_modulo.nombre, talert_template_modules.last_fired
|
||||||
FROM talert_template_modules, tagente_modulo, tagente
|
FROM talert_template_modules, tagente_modulo, tagente
|
||||||
WHERE tagente.id_agente = %d
|
WHERE tagente.id_agente = %d
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 6.0dev
|
%define version 6.0dev
|
||||||
%define release 150326
|
%define release 150329
|
||||||
|
|
||||||
# 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 6.0dev
|
%define version 6.0dev
|
||||||
%define release 150326
|
%define release 150329
|
||||||
%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
|
||||||
|
@ -38,7 +38,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||||||
('graph_res','5'),
|
('graph_res','5'),
|
||||||
('step_compact','1'),
|
('step_compact','1'),
|
||||||
('db_scheme_version','6.0dev'),
|
('db_scheme_version','6.0dev'),
|
||||||
('db_scheme_build','PD150326'),
|
('db_scheme_build','PD150329'),
|
||||||
('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: 6.0dev-150326
|
Version: 6.0dev-150329
|
||||||
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="6.0dev-150326"
|
pandora_version="6.0dev-150329"
|
||||||
|
|
||||||
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 = "6.0dev";
|
my $pandora_version = "6.0dev";
|
||||||
my $pandora_build = "150326";
|
my $pandora_build = "150329";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 6.0dev
|
%define version 6.0dev
|
||||||
%define release 150326
|
%define release 150329
|
||||||
|
|
||||||
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 6.0dev
|
%define version 6.0dev
|
||||||
%define release 150326
|
%define release 150329
|
||||||
|
|
||||||
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 = "6.0dev PS150326";
|
my $version = "6.0dev PS150329";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
2
pandora_server/util/pandora_manage.pl
Executable file → Normal file
2
pandora_server/util/pandora_manage.pl
Executable file → Normal file
@ -35,7 +35,7 @@ use Encode::Locale;
|
|||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "6.0dev PS150326";
|
my $version = "6.0dev PS150329";
|
||||||
|
|
||||||
# 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