2011-03-14 Raul Mateos <raulolfpandora@gmail.com>
* lib/PandoraFMS/Config.pm, lib/PandoraFMS/Core.pm, lib/PandoraFMS/DataServer.pm, lib/PandoraFMS/DB.pm, lib/PandoraFMS/Tools.pm, lib/PandoraFMS/WMIServer.pm: Cleared code and updated year. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4089 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d023256912
commit
a274b8cdd0
|
@ -1,3 +1,10 @@
|
|||
2011-03-14 Raúl Mateos <raulolfpandora@gmail.com>
|
||||
|
||||
* lib/PandoraFMS/Config.pm, lib/PandoraFMS/Core.pm,
|
||||
lib/PandoraFMS/DataServer.pm, lib/PandoraFMS/DB.pm,
|
||||
lib/PandoraFMS/Tools.pm, lib/PandoraFMS/WMIServer.pm: Cleared code and
|
||||
updated year.
|
||||
|
||||
2011-03-09 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* conf/pandora_server.conf
|
||||
|
|
|
@ -3,7 +3,7 @@ package PandoraFMS::Config;
|
|||
# Configuration Package
|
||||
# Pandora FMS. the Flexible Monitoring System. http://www.pandorafms.org
|
||||
##########################################################################
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
|
|
|
@ -3,7 +3,7 @@ package PandoraFMS::Core;
|
|||
# Core Pandora FMS functions.
|
||||
# Pandora FMS. the Flexible Monitoring System. http://www.pandorafms.org
|
||||
##########################################################################
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -973,8 +973,8 @@ sub pandora_update_agent ($$$$$$$;$$$$$$) {
|
|||
if (defined($parent_agent_id)) {
|
||||
# Update the table tagente with all the new data and set the new parent
|
||||
db_do ($dbh, 'UPDATE tagente SET intervalo = ?, agent_version = ?, ultimo_contacto_remoto = ?, ultimo_contacto = ?, os_version = ?,
|
||||
timezone_offset = ?, id_parent = ? WHERE id_agente = ?', $agent_interval, $agent_version, $agent_timestamp, $timestamp, $os_version,
|
||||
$timezone_offset, $parent_agent_id, $agent_id);
|
||||
timezone_offset = ?, id_parent = ? WHERE id_agente = ?', $agent_interval, $agent_version, $agent_timestamp,
|
||||
$timestamp, $os_version, $timezone_offset, $parent_agent_id, $agent_id);
|
||||
}
|
||||
else {
|
||||
# Update the table tagente with all the new data
|
||||
|
@ -1929,7 +1929,8 @@ sub pandora_server_statistics ($$) {
|
|||
$server->{"modules_total"} = get_db_value ($dbh,"SELECT count(tagente_estado.id_agente_modulo) FROM tserver, tagente_estado, tagente_modulo, tagente WHERE tagente.disabled=0 AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND tagente_estado.running_by = tserver.id_server AND tserver.server_type = ".$server->{"server_type"});
|
||||
|
||||
if ($server->{"server_type"} != 0){
|
||||
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo
|
||||
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag
|
||||
FROM tagente_estado, tagente_modulo
|
||||
WHERE utimestamp > 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||
|
@ -1939,7 +1940,8 @@ sub pandora_server_statistics ($$) {
|
|||
AND (UNIX_TIMESTAMP() - utimestamp) > current_interval");
|
||||
} else {
|
||||
# Local/Dataserver server LAG calculation:
|
||||
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo
|
||||
$lag_row = get_db_single_row ($dbh, "SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag
|
||||
FROM tagente_estado, tagente_modulo
|
||||
WHERE utimestamp > 0
|
||||
AND tagente_modulo.disabled = 0
|
||||
AND tagente_modulo.id_tipo_modulo < 5
|
||||
|
@ -2216,6 +2218,6 @@ L<DBI>, L<XML::Simple>, L<HTML::Entities>, L<Time::Local>, L<POSIX>, L<PandoraFM
|
|||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||
|
||||
=cut
|
||||
|
|
|
@ -3,7 +3,7 @@ package PandoraFMS::DB;
|
|||
# Database Package
|
||||
# Pandora FMS. the Flexible Monitoring System. http://www.pandorafms.org
|
||||
##########################################################################
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
|
|
|
@ -3,7 +3,7 @@ package PandoraFMS::DataServer;
|
|||
# Pandora FMS Data Server.
|
||||
# Pandora FMS. the Flexible Monitoring System. http://www.pandorafms.org
|
||||
##########################################################################
|
||||
# Copyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
|
|
|
@ -3,7 +3,7 @@ package PandoraFMS::Tools;
|
|||
# Tools Package
|
||||
# Pandora FMS. the Flexible Monitoring System. http://www.pandorafms.org
|
||||
##########################################################################
|
||||
# Copyright (c) 2005-2009 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -827,7 +827,6 @@ Ping the given host. Returns the average round-trip time.
|
|||
sub pandora_ping_latency ($$) {
|
||||
my ($pa_config, $host) = @_;
|
||||
|
||||
|
||||
my $output = 0;
|
||||
|
||||
# See codes on http://perldoc.perl.org/perlport.html#PLATFORMS
|
||||
|
|
|
@ -3,7 +3,7 @@ package PandoraFMS::WMIServer;
|
|||
# Pandora FMS WMI Server.
|
||||
# Pandora FMS. the Flexible Monitoring System. http://www.pandorafms.org
|
||||
##########################################################################
|
||||
# Copyright (c) 2005-2009 Artica Soluciones Tecnologicas S.L
|
||||
# Copyright (c) 2005-2011 Artica Soluciones Tecnologicas S.L
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
|
|
Loading…
Reference in New Issue