From 446269e48211fc13425deec59a100ab1aad6cab8 Mon Sep 17 00:00:00 2001 From: Sancho Lerena Date: Mon, 15 Sep 2014 15:46:27 +0200 Subject: [PATCH 1/4] We're approaching to 5.1 SP1 release. --- pandora_console/include/config_process.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 4e69340d84..def5e6d9a0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,8 +22,8 @@ /** * Pandora build version and version */ -$build_version = 'PC140630'; -$pandora_version = 'v5.1'; +$build_version = 'PC140915'; +$pandora_version = 'v5.1SP1'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); From 3018c5d1f389262d1e9cca3c14d4bc8630b85000 Mon Sep 17 00:00:00 2001 From: artica Date: Tue, 16 Sep 2014 09:46:20 +0200 Subject: [PATCH 2/4] Auto-updated build strings. --- pandora_agents/shellscript/aix/pandora_agent.conf | 0 pandora_agents/shellscript/bsd-ipso/pandora_agent.conf | 0 pandora_agents/shellscript/linux/pandora_agent.conf | 0 pandora_agents/shellscript/mac_osx/pandora_agent.conf | 0 pandora_agents/shellscript/openWRT/pandora_agent.conf | 0 pandora_agents/shellscript/solaris/pandora_agent.conf | 0 pandora_agents/unix/AIX/pandora_agent.conf | 0 pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- pandora_agents/unix/FreeBSD/pandora_agent.conf | 0 pandora_agents/unix/HP-UX/pandora_agent.conf | 0 pandora_agents/unix/Linux/pandora_agent.conf | 0 pandora_agents/unix/SunOS/pandora_agent.conf | 0 pandora_agents/unix/pandora_agent | 2 +- pandora_agents/unix/pandora_agent.redhat.spec | 2 +- pandora_agents/unix/pandora_agent.spec | 2 +- pandora_agents/win32/installer/pandora.mpi | 4 ++-- pandora_agents/win32/pandora.cc | 2 +- pandora_agents/win32/versioninfo.rc | 2 +- pandora_console/DEBIAN/control | 2 +- pandora_console/DEBIAN/make_deb_package.sh | 2 +- pandora_console/include/config_process.php | 4 ++-- pandora_console/install.php | 2 +- pandora_console/pandora_console.redhat.spec | 2 +- pandora_console/pandora_console.spec | 2 +- pandora_console/pandoradb_data.sql | 2 +- pandora_server/DEBIAN/control | 2 +- pandora_server/DEBIAN/make_deb_package.sh | 2 +- pandora_server/conf/pandora_server.conf.new | 0 pandora_server/lib/PandoraFMS/Config.pm | 2 +- pandora_server/pandora_server.redhat.spec | 2 +- pandora_server/pandora_server.spec | 2 +- pandora_server/util/pandora_db.pl | 2 +- pandora_server/util/pandora_manage.pl | 2 +- 34 files changed, 24 insertions(+), 24 deletions(-) mode change 100755 => 100644 pandora_agents/shellscript/aix/pandora_agent.conf mode change 100755 => 100644 pandora_agents/shellscript/bsd-ipso/pandora_agent.conf mode change 100755 => 100644 pandora_agents/shellscript/linux/pandora_agent.conf mode change 100755 => 100644 pandora_agents/shellscript/mac_osx/pandora_agent.conf mode change 100755 => 100644 pandora_agents/shellscript/openWRT/pandora_agent.conf mode change 100755 => 100644 pandora_agents/shellscript/solaris/pandora_agent.conf mode change 100755 => 100644 pandora_agents/unix/AIX/pandora_agent.conf mode change 100755 => 100644 pandora_agents/unix/DEBIAN/control mode change 100755 => 100644 pandora_agents/unix/FreeBSD/pandora_agent.conf mode change 100755 => 100644 pandora_agents/unix/HP-UX/pandora_agent.conf mode change 100755 => 100644 pandora_agents/unix/Linux/pandora_agent.conf mode change 100755 => 100644 pandora_agents/unix/SunOS/pandora_agent.conf mode change 100755 => 100644 pandora_agents/unix/pandora_agent mode change 100755 => 100644 pandora_agents/unix/pandora_agent.redhat.spec mode change 100755 => 100644 pandora_agents/unix/pandora_agent.spec mode change 100755 => 100644 pandora_agents/win32/installer/pandora.mpi mode change 100755 => 100644 pandora_console/pandora_console.redhat.spec mode change 100755 => 100644 pandora_console/pandora_console.spec mode change 100755 => 100644 pandora_server/conf/pandora_server.conf.new mode change 100755 => 100644 pandora_server/util/pandora_db.pl mode change 100755 => 100644 pandora_server/util/pandora_manage.pl diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control old mode 100755 new mode 100644 index 683a18ff54..adf78691c4 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1 +Version: 5.1-140916 Architecture: all Priority: optional Section: admin diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh index 7cc400977d..7bb07ccd85 100644 --- a/pandora_agents/unix/DEBIAN/make_deb_package.sh +++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="5.1" +pandora_version="5.1-140916" echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf old mode 100755 new mode 100644 diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent old mode 100755 new mode 100644 index 750dd729d4..1988843a18 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -41,7 +41,7 @@ my $Sem = undef; my $ThreadSem = undef; use constant AGENT_VERSION => '5.1'; -use constant AGENT_BUILD => '140630'; +use constant AGENT_BUILD => '140916'; # Commands to retrieve total memory information in kB use constant TOTALMEMORY_CMDS => { diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec old mode 100755 new mode 100644 index 03389bbfac..0752cb1337 --- a/pandora_agents/unix/pandora_agent.redhat.spec +++ b/pandora_agents/unix/pandora_agent.redhat.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 5.1 -%define release 1 +%define release 140916 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec old mode 100755 new mode 100644 index 07fae8f3e6..25bdf9c1a9 --- a/pandora_agents/unix/pandora_agent.spec +++ b/pandora_agents/unix/pandora_agent.spec @@ -3,7 +3,7 @@ # %define name pandorafms_agent_unix %define version 5.1 -%define release 1 +%define release 140916 Summary: Pandora FMS Linux agent, PERL version Name: %{name} diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi old mode 100755 new mode 100644 index 33ac27eb20..97b1c74594 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{140630} +{140916} ViewReadme {Yes} @@ -2387,7 +2387,7 @@ Windows,BuildSeparateArchives {No} Windows,Executable -{<%AppName%>-Setup<%Ext%>} +{<%AppName%>-<%Version%>-Setup<%Ext%>} Windows,FileDescription {<%AppName%> <%Version%> Setup} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index e1b0050e5d..08d0e57600 100644 --- a/pandora_agents/win32/pandora.cc +++ b/pandora_agents/win32/pandora.cc @@ -30,7 +30,7 @@ using namespace Pandora; using namespace Pandora_Strutils; #define PATH_SIZE _MAX_PATH+1 -#define PANDORA_VERSION ("5.1(Build 140630)") +#define PANDORA_VERSION ("5.1(Build 140916)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index ae8886ffba..a8c90aa7ae 100644 --- a/pandora_agents/win32/versioninfo.rc +++ b/pandora_agents/win32/versioninfo.rc @@ -11,7 +11,7 @@ BEGIN VALUE "LegalCopyright", "Artica ST" VALUE "OriginalFilename", "PandoraAgent.exe" VALUE "ProductName", "Pandora FMS Windows Agent" - VALUE "ProductVersion", "(5.1(Build 140630))" + VALUE "ProductVersion", "(5.1(Build 140916))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 868734af4e..6f582bf12a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1 +Version: 5.1-140916 Architecture: all Priority: optional Section: admin diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh index 70cc3e18f2..4c3605ce2d 100644 --- a/pandora_console/DEBIAN/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -pandora_version="5.1" +pandora_version="5.1-140916" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index def5e6d9a0..f6e669f696 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,8 +22,8 @@ /** * Pandora build version and version */ -$build_version = 'PC140915'; -$pandora_version = 'v5.1SP1'; +$build_version = 'PC140916'; +$pandora_version = 'v5.1'; // Do not overwrite default timezone set if defined. $script_tz = @date_default_timezone_get(); diff --git a/pandora_console/install.php b/pandora_console/install.php index 4075aef242..75e50656e6 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Tue, 16 Sep 2014 12:17:21 +0200 Subject: [PATCH 3/4] Changed UDP server commands to match those of the Windows agent. --- pandora_agents/unix/pandora_agent | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 1988843a18..d14e1ff5b9 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -1790,7 +1790,7 @@ sub udp_server ($$) { log_message ('udp server', 'Received signal from '.$hishost); kill 'SIGINT' , $parent_pid; } - elsif ($newmsg =~ /PROCESS START (.*)/){ + elsif ($newmsg =~ /START PROCESS (.*)/){ my $process_name = $1; $process_name =~ s/^\s*//g; $process_name =~ s/\s*$//g; @@ -1804,7 +1804,7 @@ sub udp_server ($$) { log_message ('udp server', "Attempt to start unknown process $process_name from $hishost"); } } - elsif ($newmsg =~ /PROCESS STOP (.*)/){ + elsif ($newmsg =~ /STOP PROCESS (.*)/){ my $process_name = $1; $process_name =~ s/^\s*//g; $process_name =~ s/\s*$//g; From fa1e9a08d28d10220e311acb050162769c897194 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Tue, 16 Sep 2014 12:18:40 +0200 Subject: [PATCH 4/4] Prevent inc modules from becoming unknown after a count reset. --- pandora_server/lib/PandoraFMS/Core.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index e393b2effe..7a238c91ac 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -3364,11 +3364,12 @@ sub process_inc_data ($$$$$) { # Negative increment, reset inc data if ($data < $data_inc->{'datos'}) { - db_do ($dbh, 'DELETE FROM tagente_datos_inc WHERE id_agente_modulo = ?', $module->{'id_agente_modulo'}); - db_do ($dbh, 'INSERT INTO tagente_datos_inc - (id_agente_modulo, datos, utimestamp) - VALUES (?, ?, ?)', $module->{'id_agente_modulo'}, $data, $utimestamp); + db_do ($dbh, 'UPDATE tagente_datos_inc SET datos = ?, utimestamp = ? WHERE id_agente_modulo = ?', $data, $utimestamp, $module->{'id_agente_modulo'}); logger($pa_config, "Discarding data and resetting counter for incremental module " . $module->{'nombre'} . "(module id " . $module->{'id_agente_modulo'} . ").", 10); + + # Prevent the module from becoming unknown! + db_do ($dbh, 'UPDATE tagente_estado SET utimestamp = ? WHERE id_agente_modulo = ?', time(), $module->{'id_agente_modulo'}); + return undef; }