Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop

This commit is contained in:
Sancho Lerena 2014-09-19 06:03:46 +02:00
commit 3362ce8616
31 changed files with 116 additions and 54 deletions

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix package: pandorafms-agent-unix
Version: 5.1-140917 Version: 5.1-140919
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.1-140917" pandora_version="5.1-140919"
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

View File

@ -41,7 +41,7 @@ my $Sem = undef;
my $ThreadSem = undef; my $ThreadSem = undef;
use constant AGENT_VERSION => '5.1'; use constant AGENT_VERSION => '5.1';
use constant AGENT_BUILD => '140917'; use constant AGENT_BUILD => '140919';
# Commands to retrieve total memory information in kB # Commands to retrieve total memory information in kB
use constant TOTALMEMORY_CMDS => { use constant TOTALMEMORY_CMDS => {

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 5.1 %define version 5.1
%define release 140917 %define release 140919
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_agent_unix %define name pandorafms_agent_unix
%define version 5.1 %define version 5.1
%define release 140917 %define release 140919
Summary: Pandora FMS Linux agent, PERL version Summary: Pandora FMS Linux agent, PERL version
Name: %{name} Name: %{name}

View File

@ -191,7 +191,7 @@ uninstall () {
fi fi
rm -Rf $PANDORA_BASE$PANDORA_HOME 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_HOME 2> /dev/null
rm -Rf $PANDORA_BASE$PANDORA_LOG_DIR 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_LOG_DIR/$PANDORA_LOG 2> /dev/null
rm -Rf $PANDORA_BASE$TENTACLE 2> /dev/null rm -Rf $PANDORA_BASE$TENTACLE 2> /dev/null
rm -Rf $PANDORA_BASE$PANDORA_MAN/{man1,cat1}/tentacle_client.1.gz 2> /dev/null rm -Rf $PANDORA_BASE$PANDORA_MAN/{man1,cat1}/tentacle_client.1.gz 2> /dev/null

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{} {}
Version Version
{140917} {140919}
ViewReadme ViewReadme
{Yes} {Yes}

View File

@ -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.1(Build 140917)") #define PANDORA_VERSION ("5.1(Build 140919)")
string pandora_path; string pandora_path;
string pandora_dir; string pandora_dir;

View File

@ -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.1(Build 140917))" VALUE "ProductVersion", "(5.1(Build 140919))"
VALUE "FileVersion", "1.0.0.0" VALUE "FileVersion", "1.0.0.0"
END END
END END

View File

@ -1,5 +1,5 @@
package: pandorafms-console package: pandorafms-console
Version: 5.1-140917 Version: 5.1-140919
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.1-140917" pandora_version="5.1-140919"
package_pear=0 package_pear=0
package_pandora=1 package_pandora=1

View File

@ -250,3 +250,15 @@ INSERT INTO `talert_actions` (`name`, `id_alert_command`, `field1`, `field2`, `f
-- Table `tconfig` -- Table `tconfig`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
DELETE FROM `tconfig` WHERE `token`='sla_period'; DELETE FROM `tconfig` WHERE `token`='sla_period';
-- ---------------------------------------------------------------------
-- Table `network_component`
-- ---------------------------------------------------------------------
UPDATE FROM `network_component` SET `module_inteval`= 3600 WHERE `id_nc`=53;
UPDATE FROM `network_component` SET `post_process`= 0.000000115740741 WHERE `id_nc`=53;
UPDATE FROM `network_component` SET `unit`= 'day' WHERE `id_nc`=53;
-- ---------------------------------------------------------------------
-- Table `network_component`
-- ---------------------------------------------------------------------
ALTER TABLE `tnetwork_component` MODIFY COLUMN `post_process` DOUBLE(18,15) DEFAULT 0;

View File

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

View File

@ -1921,9 +1921,15 @@ function html_print_autocomplete_modules($name = 'module',
$groups = users_get_groups($config['id_user'], "AW", false); $groups = users_get_groups($config['id_user'], "AW", false);
$groups = array_keys($groups); $groups = array_keys($groups);
if (empty($groups)) {
$id_groups = 0;
} else {
$id_groups = implode(',', $groups);
}
$agents = db_get_all_rows_sql('SELECT id_agente $agents = db_get_all_rows_sql('SELECT id_agente
FROM tagente FROM tagente
WHERE id_grupo IN (' . implode(',', $groups) . ')'); WHERE id_grupo IN (' . $id_groups . ')');
} }
else { else {
$agents = db_get_all_rows_sql('SELECT id_agente $agents = db_get_all_rows_sql('SELECT id_agente

View File

@ -1449,11 +1449,11 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
ORDER BY nombre"); ORDER BY nombre");
$data["monitor_checks"] += $group_stat[0]["modules"]; $data["monitor_checks"] += $group_stat[0]["modules"];
$data["monitor_not_init"] += $group_stat[0]["non-init"]; $data["agent_not_init"] += $group_stat[0]["non-init"];
$data["monitor_unknown"] += $group_stat[0]["unknown"]; $data["agent_unknown"] += $group_stat[0]["unknown"];
$data["monitor_ok"] += $group_stat[0]["normal"]; $data["agent_ok"] += $group_stat[0]["normal"];
$data["monitor_warning"] += $group_stat[0]["warning"]; $data["agent_warning"] += $group_stat[0]["warning"];
$data["monitor_critical"] += $group_stat[0]["critical"]; $data["agent_critical"] += $group_stat[0]["critical"];
$data["monitor_alerts"] += $group_stat[0]["alerts"]; $data["monitor_alerts"] += $group_stat[0]["alerts"];
$data["monitor_alerts_fired"] += $group_stat[0]["alerts_fired"]; $data["monitor_alerts_fired"] += $group_stat[0]["alerts_fired"];
$data["monitor_alerts_fire_count"] += $group_stat[0]["alerts_fired"]; $data["monitor_alerts_fire_count"] += $group_stat[0]["alerts_fired"];
@ -1464,17 +1464,11 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
$data["utimestamp"] = $group_stat[0]["utimestamp"]; $data["utimestamp"] = $group_stat[0]["utimestamp"];
// This fields are not in database // This fields are not in database
// Get Agents OK $data["monitor_ok"] += groups_monitor_ok($group);
$data["agent_ok"] += groups_agent_ok($group); $data["monitor_warning"] += groups_monitor_warning($group);
// Get Agents Warning $data["monitor_critical"] += groups_monitor_critical($group);
$data["agent_warning"] += groups_agent_warning($group); $data["monitor_unknown"] += groups_monitor_unknown($group);
// Get Agents Critical $data["monitor_not_init"] += groups_monitor_not_init($group);
$data["agent_critical"] += groups_agent_critical($group);
// Get Agents Unknown
$data["agent_unknown"] += groups_agent_unknown($group);
// Get Agents Not init
$data["agent_not_init"] += groups_agent_not_init($group);
} }
// ------------------------------------------------------------------- // -------------------------------------------------------------------

View File

@ -63,7 +63,7 @@
<div style='height: 10px'> <div style='height: 10px'>
<?php <?php
$version = '5.1'; $version = '5.1';
$build = '140917'; $build = '140919';
$banner = "v$version Build $build"; $banner = "v$version Build $build";
error_reporting(0); error_reporting(0);

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 5.1 %define version 5.1
%define release 140917 %define release 140919
# User and Group under which Apache is running # User and Group under which Apache is running
%define httpd_name httpd %define httpd_name httpd

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_console %define name pandorafms_console
%define version 5.1 %define version 5.1
%define release 140917 %define release 140919
%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

View File

@ -707,7 +707,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` (
`custom_string_3` text, `custom_string_3` text,
`custom_integer_1` int(10) default 0, `custom_integer_1` int(10) default 0,
`custom_integer_2` int(10) default 0, `custom_integer_2` int(10) default 0,
`post_process` double(18,5) default 0, `post_process` double(18,15) default 0,
`unit` text, `unit` text,
`wizard_level` enum('basic','advanced','nowizard') default 'nowizard', `wizard_level` enum('basic','advanced','nowizard') default 'nowizard',
`macros` text, `macros` text,

View File

@ -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','5.1'), ('db_scheme_version','5.1'),
('db_scheme_build','PD140917'), ('db_scheme_build','PD140919'),
('show_unknown','0'), ('show_unknown','0'),
('show_lastalerts','1'), ('show_lastalerts','1'),
('style','pandora'), ('style','pandora'),
@ -325,7 +325,7 @@ INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `t
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (50,'System&#x20;Description','Get&#x20;system&#x20;description&#x20;(all&#x20;mibs).',1,17,0,0,9000,0,'','','public','SNMPv2-MIB::sysDescr.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','',''); INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (50,'System&#x20;Description','Get&#x20;system&#x20;description&#x20;(all&#x20;mibs).',1,17,0,0,9000,0,'','','public','SNMPv2-MIB::sysDescr.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (51,'OS&#x20;Raw&#x20;Interrupts','Get&#x20;system&#x20;raw&#x20;interrupts&#x20;from&#x20;SO',13,16,0,0,180,0,'','','public','UCD-SNMP-MIB::ssRawInterrupts.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','',''); INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (51,'OS&#x20;Raw&#x20;Interrupts','Get&#x20;system&#x20;raw&#x20;interrupts&#x20;from&#x20;SO',13,16,0,0,180,0,'','','public','UCD-SNMP-MIB::ssRawInterrupts.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (52,'OS&#x20;IO&#x20;Signals&#x20;sent','IO&#x20;Signals&#x20;sent&#x20;by&#x20;Kernel',13,16,0,0,180,0,'','','public','UCD-SNMP-MIB::ssIOSent.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','',''); INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (52,'OS&#x20;IO&#x20;Signals&#x20;sent','IO&#x20;Signals&#x20;sent&#x20;by&#x20;Kernel',13,16,0,0,180,0,'','','public','UCD-SNMP-MIB::ssIOSent.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (53,'System&#x20;Uptime','Sistem&#x20;uptime&#x20;in&#x20;timeticks',1,15,0,0,180,0,'','','public','HOST-RESOURCES-MIB::hrSystemUptime.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','',''); INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `unit`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (53,'System&#x20;Uptime','Sistem&#x20;uptime&#x20;in&#x20;timeticks',1,15,0,0,3600,0,'','','public','HOST-RESOURCES-MIB::hrSystemUptime.0',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.000000115740741,'day','basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (176,'Catalyst&#x20;Free&#x20;Mem','Taken&#x20;from&#x20;ftp://ftp.cisco.com/pub/mibs/oid/OLD-CISCO-MEMORY-MIB.oid',2,15,0,0,180,0,'','','public','1.3.6.1.4.1.9.2.1.8',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','',''); INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (176,'Catalyst&#x20;Free&#x20;Mem','Taken&#x20;from&#x20;ftp://ftp.cisco.com/pub/mibs/oid/OLD-CISCO-MEMORY-MIB.oid',2,15,0,0,180,0,'','','public','1.3.6.1.4.1.9.2.1.8',4,2,0,NULL,NULL,NULL,0,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (200,'CPU&#x20;load','CPU0&#x20;load&#x20;average',16,1,100,0,300,1,'','','','SELECT&#x20;LoadPercentage&#x20;from&#x20;Win32_Processor&#x20;WHERE&#x20;DeviceID&#x20;=&#x20;&quot;CPU0&quot;',1,6,0,'Administrator','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','',''); INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (200,'CPU&#x20;load','CPU0&#x20;load&#x20;average',16,1,100,0,300,1,'','','','SELECT&#x20;LoadPercentage&#x20;from&#x20;Win32_Processor&#x20;WHERE&#x20;DeviceID&#x20;=&#x20;&quot;CPU0&quot;',1,6,0,'Administrator','','',0,1,0.00,0.00,'',0.00,0.00,'',0,'','','',0,0,0.0000000000000,'basic','','','','','','');
INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (201,'Free&#x20;RAM','Available&#x20;RAM&#x20;memory&#x20;in&#x20;bytes',16,1,0,0,300,0,'','','','SELECT&#x20;AvailableBytes&#x20;from&#x20;Win32_PerfRawData_PerfOS_Memory',1,6,0,'Administrator',NULL,NULL,10,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','',''); INSERT INTO `tnetwork_component` (`id_nc`, `name`, `description`, `id_group`, `type`, `max`, `min`, `module_interval`, `tcp_port`, `tcp_send`, `tcp_rcv`, `snmp_community`, `snmp_oid`, `id_module_group`, `id_modulo`, `id_plugin`, `plugin_user`, `plugin_pass`, `plugin_parameter`, `max_timeout`, `history_data`, `min_warning`, `max_warning`, `str_warning`, `min_critical`, `max_critical`, `str_critical`, `min_ff_event`, `custom_string_1`, `custom_string_2`, `custom_string_3`, `custom_integer_1`, `custom_integer_2`, `post_process`, `wizard_level`, `critical_instructions`, `warning_instructions`, `unknown_instructions`, `tags`, `disabled_types_event`, `module_macros`) VALUES (201,'Free&#x20;RAM','Available&#x20;RAM&#x20;memory&#x20;in&#x20;bytes',16,1,0,0,300,0,'','','','SELECT&#x20;AvailableBytes&#x20;from&#x20;Win32_PerfRawData_PerfOS_Memory',1,6,0,'Administrator',NULL,NULL,10,1,0.00,0.00,NULL,0.00,0.00,NULL,0,NULL,NULL,NULL,0,0,0.0000000000000,'basic','','','','','','');

View File

@ -1,5 +1,5 @@
package: pandorafms-server package: pandorafms-server
Version: 5.1-140917 Version: 5.1-140919
Architecture: all Architecture: all
Priority: optional Priority: optional
Section: admin Section: admin

View File

@ -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.1-140917" pandora_version="5.1-140919"
package_cpan=0 package_cpan=0
package_pandora=1 package_pandora=1

View File

@ -308,9 +308,7 @@ sub pandora_server_tasks ($) {
# Realtime stats (Only master server!) - ( VERY HEAVY !) # Realtime stats (Only master server!) - ( VERY HEAVY !)
# Realtimestats == 1, generated by WEB Console, not by server! # Realtimestats == 1, generated by WEB Console, not by server!
if ($pa_config->{"pandora_master"} == 1 if (defined($pa_config->{"realtimestats"}) && $pa_config->{"realtimestats"} == 0){
&& defined($pa_config->{"realtimestats"})
&& $pa_config->{"realtimestats"} == 0){
# Check if I need to refresh stats # Check if I need to refresh stats
my $last_execution_stats = get_db_value ($dbh, "SELECT MAX(utimestamp) FROM tgroup_stat"); my $last_execution_stats = get_db_value ($dbh, "SELECT MAX(utimestamp) FROM tgroup_stat");
@ -514,8 +512,8 @@ sub main() {
# Start the servers # Start the servers
pandora_startup (); pandora_startup ();
# Start thread to execute server tasks # Start thread to execute server tasks on the master server
threads->create('pandora_server_tasks', (\%Config))->detach(); threads->create('pandora_server_tasks', (\%Config))->detach() if ($pa_config->{"pandora_master"} == 1);
# Generate 'going up' events # Generate 'going up' events
foreach my $server (@Servers) { foreach my $server (@Servers) {

View File

@ -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.1"; my $pandora_version = "5.1";
my $pandora_build = "140917"; my $pandora_build = "140919";
our $VERSION = $pandora_version." ".$pandora_build; our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash # Setup hash

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 5.1 %define version 5.1
%define release 140917 %define release 140919
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -3,7 +3,7 @@
# #
%define name pandorafms_server %define name pandorafms_server
%define version 5.1 %define version 5.1
%define release 140917 %define release 140919
Summary: Pandora FMS Server Summary: Pandora FMS Server
Name: %{name} Name: %{name}

View File

@ -10,7 +10,9 @@
MODE=$1 MODE=$1
shift if [ $# -gt 1 ]; then
shift
fi
# Defaults # Defaults
PREFIX=/usr PREFIX=/usr
@ -397,7 +399,7 @@ perl-TimeDate perl-XML-Simple perl-XML-Twig perl-libwww-perl mysql-client"
uninstall () { uninstall () {
set_global_vars set_global_vars
if [ "$LINUX" != NO ] || [ "$DISTRO" != "FreeBSD" ] || [ "$DISTRO" != "NetBSD" ] if [ "$LINUX" != "YES" ] && [ "$DISTRO" != "FreeBSD" ] && [ "$DISTRO" != "NetBSD" ]
then then
echo "This is not a Linux-based distro. Uninstaller is currently not working for your OS" echo "This is not a Linux-based distro. Uninstaller is currently not working for your OS"
exit 1 exit 1

View File

@ -33,7 +33,7 @@ use PandoraFMS::Tools;
use PandoraFMS::DB; use PandoraFMS::DB;
# version: define current version # version: define current version
my $version = "5.1 PS140917"; my $version = "5.1 PS140919";
# Pandora server configuration # Pandora server configuration
my %conf; my %conf;

View File

@ -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.1 PS140917"; my $version = "5.1 PS140919";
# save program name for logging # save program name for logging
my $progname = basename($0); my $progname = basename($0);

View File

@ -0,0 +1,24 @@
#!/bin/bash
# (c) 2014 Sancho Lerena
# (c) Artica Soluciones Tecnologicas
# Packet loss ICMP measurement remote plugin
# Remote plugin to measure remote packet loss using ping
# It requires root access, because use flood mode to send many pings.
# It's limited to 50 pings and 10 seconds, so it should not be nasty
# for your network :-)
if [ $# -eq 0 ] || [ $# -eq 1 ]
then
echo "Syntax: <max_timeout_insecs> <target_ip>"
exit -1
fi
TIMEOUT=$1
DESTINATION=$2
echo `ping -W $1 -q -f -c 50 $2 | grep -o "[0-9\.]*. packet loss" | grep -o "[0-9.]*"`

View File

@ -37,7 +37,7 @@ if ($OSNAME eq "freebsd") {
'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf', 'pandora_path' => '/usr/local/etc/pandora/pandora_server.conf',
'icmp_checks' => 1, 'icmp_checks' => 1,
'networktimeout' => 2, 'networktimeout' => 2,
'nmap_timing_template' => 2, 'recon_timing_template' => 3,
'PID' => '', 'PID' => '',
'quiet' => 1, 'quiet' => 1,
); );
@ -47,7 +47,7 @@ if ($OSNAME eq "freebsd") {
'pandora_path' => '/etc/pandora/pandora_server.conf', 'pandora_path' => '/etc/pandora/pandora_server.conf',
'icmp_checks' => 1, 'icmp_checks' => 1,
'networktimeout' => 2, 'networktimeout' => 2,
'nmap_timing_template' => 2, 'recon_timing_template' => 3,
'PID' => '', 'PID' => '',
'quiet' => 1, 'quiet' => 1,
); );
@ -101,7 +101,9 @@ my $DOT1DTPFDBADDRESS = ".1.3.6.1.2.1.17.4.3.1.1";
my $DOT1DTPFDBPORT = ".1.3.6.1.2.1.17.4.3.1.2"; my $DOT1DTPFDBPORT = ".1.3.6.1.2.1.17.4.3.1.2";
my $IFDESC = ".1.3.6.1.2.1.2.2.1.2"; my $IFDESC = ".1.3.6.1.2.1.2.2.1.2";
my $IFINDEX = ".1.3.6.1.2.1.2.2.1.1"; my $IFINDEX = ".1.3.6.1.2.1.2.2.1.1";
my $IFINOCTECTS = ".1.3.6.1.2.1.2.2.1.10";
my $IFOPERSTATUS = ".1.3.6.1.2.1.2.2.1.8"; my $IFOPERSTATUS = ".1.3.6.1.2.1.2.2.1.8";
my $IFOUTOCTECTS = ".1.3.6.1.2.1.2.2.1.16";
my $IPENTADDR = ".1.3.6.1.2.1.4.20.1.1"; my $IPENTADDR = ".1.3.6.1.2.1.4.20.1.1";
my $IFNAME = ".1.3.6.1.2.1.31.1.1.1.1"; my $IFNAME = ".1.3.6.1.2.1.31.1.1.1.1";
my $IPNETTOMEDIAPHYSADDRESS = ".1.3.6.1.2.1.4.22.1.2"; my $IPNETTOMEDIAPHYSADDRESS = ".1.3.6.1.2.1.4.22.1.2";
@ -731,7 +733,7 @@ sub create_pandora_agent($) {
$if_name = safe_input($if_name); $if_name = safe_input($if_name);
$if_desc = safe_input($if_desc); $if_desc = safe_input($if_desc);
# Create the module. # Interface status module.
my %module = ('id_tipo_modulo' => 18, my %module = ('id_tipo_modulo' => 18,
'id_modulo' => 2, 'id_modulo' => 2,
'nombre' => "if_${if_name}", 'nombre' => "if_${if_name}",
@ -742,6 +744,30 @@ sub create_pandora_agent($) {
'snmp_community' => $COMMUNITIES{$device}, 'snmp_community' => $COMMUNITIES{$device},
'snmp_oid' => "$IFOPERSTATUS.$if_index"); 'snmp_oid' => "$IFOPERSTATUS.$if_index");
pandora_create_module_from_hash (\%CONF, \%module, $DBH); pandora_create_module_from_hash (\%CONF, \%module, $DBH);
# Incoming traffic module.
%module = ('id_tipo_modulo' => 16,
'id_modulo' => 2,
'nombre' => "if_${if_name}_in",
'descripcion' => 'The total number of octets received on the interface, including framing characters.',
'id_agente' => $agent_id,
'ip_target' => $device,
'tcp_send' => 1,
'snmp_community' => $COMMUNITIES{$device},
'snmp_oid' => "$IFINOCTECTS.$if_index");
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
# Outgoing traffic module.
%module = ('id_tipo_modulo' => 16,
'id_modulo' => 2,
'nombre' => "if_${if_name}_out",
'descripcion' => 'The total number of octets received on the interface, including framing characters.',
'id_agente' => $agent_id,
'ip_target' => $device,
'tcp_send' => 1,
'snmp_community' => $COMMUNITIES{$device},
'snmp_oid' => "$IFOUTOCTECTS.$if_index");
pandora_create_module_from_hash (\%CONF, \%module, $DBH);
} }
return $agent_id; return $agent_id;
@ -864,7 +890,7 @@ sub traceroute_connectivity($) {
# Perform a traceroute. # Perform a traceroute.
my $timeout = $CONF{'networktimeout'}*1000; my $timeout = $CONF{'networktimeout'}*1000;
my $nmap_args = '-nsP -PE --traceroute --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'nmap_timing_template'}; my $nmap_args = '-nsP -PE --traceroute --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'recon_timing_template'};
my $np = new PandoraFMS::NmapParser; my $np = new PandoraFMS::NmapParser;
eval { eval {
$np->parsescan($CONF{'nmap'}, $nmap_args, ($host)); $np->parsescan($CONF{'nmap'}, $nmap_args, ($host));
@ -935,7 +961,7 @@ update_recon_task($DBH, $TASK_ID, 1);
# Populate ARP caches. # Populate ARP caches.
message("Populating ARP caches..."); message("Populating ARP caches...");
my $timeout = $CONF{'networktimeout'} * 1000; # Convert the timeout from s to ms. my $timeout = $CONF{'networktimeout'} * 1000; # Convert the timeout from s to ms.
my $nmap_args = '-nsP --send-ip --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'nmap_timing_template'}; my $nmap_args = '-nsP --send-ip --max-retries '.$CONF{'icmp_checks'}.' --host-timeout '.$timeout.' -T'.$CONF{'recon_timing_template'};
my $np = new PandoraFMS::NmapParser; my $np = new PandoraFMS::NmapParser;
if ($#SUBNETS >= 0) { if ($#SUBNETS >= 0) {
$np->parsescan($CONF{'nmap'}, $nmap_args, @SUBNETS); $np->parsescan($CONF{'nmap'}, $nmap_args, @SUBNETS);