From 45f4d30d7970c000de55a9ec3786162441a60cb6 Mon Sep 17 00:00:00 2001 From: artica Date: Sat, 27 Sep 2014 00:01:10 +0200 Subject: [PATCH 1/9] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- 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 | 2 +- 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/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 +- 22 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index e6a3e13697..62ce074b35 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP1 +Version: 5.1SP1-140927 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 b49d57a208..2b924575ed 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.1SP1" +pandora_version="5.1SP1-140927" 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/pandora_agent b/pandora_agents/unix/pandora_agent index a7ce487093..0a9d6ac9b5 100644 --- 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.1SP1'; -use constant AGENT_BUILD => '140926'; +use constant AGENT_BUILD => '140927'; # 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 index 0812c58460..ca3015f3bc 100644 --- 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.1SP1 -%define release 1 +%define release 140927 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 index 2e516db1c9..aa01347516 100644 --- 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.1SP1 -%define release 1 +%define release 140927 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 index 86682c25fe..b8ecc7b0cf 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{140926} +{140927} 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 d078593287..a5f829ee1c 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.1SP1(Build 140926)") +#define PANDORA_VERSION ("5.1SP1(Build 140927)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 17b20c108d..c41b63af42 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.1SP1(Build 140926))" + VALUE "ProductVersion", "(5.1SP1(Build 140927))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index feee97b159..447962e32a 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP1 +Version: 5.1SP1-140927 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 b1165d21f2..ffd0dc1305 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.1SP1" +pandora_version="5.1SP1-140927" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0dab2433b3..ea59b813be 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC140926'; +$build_version = 'PC140927'; $pandora_version = 'v5.1SP1'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 2e99cb67bb..0636ce67c4 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Sun, 28 Sep 2014 00:01:08 +0200 Subject: [PATCH 2/9] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- 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 | 2 +- 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 | 2 +- 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/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 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index 62ce074b35..ef21d9bbd0 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP1-140927 +Version: 5.1SP1-140928 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 2b924575ed..e2f9ff866c 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.1SP1-140927" +pandora_version="5.1SP1-140928" 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/pandora_agent b/pandora_agents/unix/pandora_agent index 0a9d6ac9b5..ba6aaa125f 100644 --- 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.1SP1'; -use constant AGENT_BUILD => '140927'; +use constant AGENT_BUILD => '140928'; # 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 index ca3015f3bc..0b91b74acf 100644 --- 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.1SP1 -%define release 140927 +%define release 140928 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 index aa01347516..3a8fb2d9ea 100644 --- 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.1SP1 -%define release 140927 +%define release 140928 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 index b8ecc7b0cf..2f8c7aa97f 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{140927} +{140928} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index a5f829ee1c..726c288cdc 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.1SP1(Build 140927)") +#define PANDORA_VERSION ("5.1SP1(Build 140928)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index c41b63af42..0237897c5b 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.1SP1(Build 140927))" + VALUE "ProductVersion", "(5.1SP1(Build 140928))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index 447962e32a..b861ca4f2c 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP1-140927 +Version: 5.1SP1-140928 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 ffd0dc1305..be5d65b076 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.1SP1-140927" +pandora_version="5.1SP1-140928" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index ea59b813be..807d6e6217 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC140927'; +$build_version = 'PC140928'; $pandora_version = 'v5.1SP1'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index 0636ce67c4..f3ac4fee14 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 29 Sep 2014 00:01:07 +0200 Subject: [PATCH 3/9] Auto-updated build strings. --- pandora_agents/unix/DEBIAN/control | 2 +- pandora_agents/unix/DEBIAN/make_deb_package.sh | 2 +- 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 | 2 +- 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 | 2 +- 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/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 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control index ef21d9bbd0..73e9480b52 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 5.1SP1-140928 +Version: 5.1SP1-140929 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 e2f9ff866c..bd843c5293 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.1SP1-140928" +pandora_version="5.1SP1-140929" 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/pandora_agent b/pandora_agents/unix/pandora_agent index ba6aaa125f..c6dbeb3fb0 100644 --- 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.1SP1'; -use constant AGENT_BUILD => '140928'; +use constant AGENT_BUILD => '140929'; # 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 index 0b91b74acf..df65b18242 100644 --- 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.1SP1 -%define release 140928 +%define release 140929 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 index 3a8fb2d9ea..5a4a3d57d9 100644 --- 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.1SP1 -%define release 140928 +%define release 140929 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 index 2f8c7aa97f..10c8680147 100644 --- a/pandora_agents/win32/installer/pandora.mpi +++ b/pandora_agents/win32/installer/pandora.mpi @@ -186,7 +186,7 @@ UpgradeApplicationID {} Version -{140928} +{140929} ViewReadme {Yes} diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc index 726c288cdc..bd63534900 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.1SP1(Build 140928)") +#define PANDORA_VERSION ("5.1SP1(Build 140929)") string pandora_path; string pandora_dir; diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc index 0237897c5b..8dd648f13c 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.1SP1(Build 140928))" + VALUE "ProductVersion", "(5.1SP1(Build 140929))" VALUE "FileVersion", "1.0.0.0" END END diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control index b861ca4f2c..7389572e2f 100644 --- a/pandora_console/DEBIAN/control +++ b/pandora_console/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-console -Version: 5.1SP1-140928 +Version: 5.1SP1-140929 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 be5d65b076..fa2d1d8540 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.1SP1-140928" +pandora_version="5.1SP1-140929" package_pear=0 package_pandora=1 diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 807d6e6217..f817e745e0 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,7 +22,7 @@ /** * Pandora build version and version */ -$build_version = 'PC140928'; +$build_version = 'PC140929'; $pandora_version = 'v5.1SP1'; // Do not overwrite default timezone set if defined. diff --git a/pandora_console/install.php b/pandora_console/install.php index f3ac4fee14..194f2734c0 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -63,7 +63,7 @@
Date: Mon, 29 Sep 2014 10:14:41 +0200 Subject: [PATCH 4/9] Included the max value in the inverse interval. Included the max value in the inverse interval to make it the complementary of the original interval. --- pandora_server/lib/PandoraFMS/Core.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 7405274f9e..c8cb3605a4 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -3452,9 +3452,9 @@ sub get_module_status ($$$) { return 1 if ($data >= $critical_min && $data < $critical_max); return 1 if ($data >= $critical_min && $critical_max < $critical_min); } - # (-inf, critical_min), (critical_max, +inf) + # (-inf, critical_min), [critical_max, +inf) else { - return 1 if ($data < $critical_min || $data > $critical_max); + return 1 if ($data < $critical_min || $data >= $critical_max); return 1 if ($data <= $critical_max && $critical_max < $critical_min); } } @@ -3466,9 +3466,9 @@ sub get_module_status ($$$) { return 2 if ($data >= $warning_min && $data < $warning_max); return 2 if ($data >= $warning_min && $warning_max < $warning_min); } - # (-inf, warning_min), (warning_max, +inf) + # (-inf, warning_min), [warning_max, +inf) else { - return 2 if ($data < $warning_min || $data > $warning_max); + return 2 if ($data < $warning_min || $data >= $warning_max); return 2 if ($data <= $warning_max && $warning_max < $warning_min); } } From 25823d40b90c565086f14821e336c98b4e73e74e Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Mon, 29 Sep 2014 11:17:56 +0200 Subject: [PATCH 5/9] Moved the configuration of the UDP server up. --- pandora_agents/win32/bin/pandora_agent.conf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index a8ef9ad563..f75fd15368 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -97,6 +97,15 @@ xml_buffer 1 #secondary_server_ssl no #secondary_server_opts +# Example UDP server to be able to execute remote actions such +# as starting or stopping process. +#udp_server 1 +#udp_server_port 4321 +#udp_server_auth_address 192.168.1.23 +#process_firefox_start firefox +#process_firefox_stop killall firefox +#service_messenger 1 + # Module Definition # Check online documentation and module library at http://pandorafms.org # ================= @@ -268,15 +277,6 @@ module_end #module_watchdog yes #module_end -# Example UDP server to be able to execute remote actions such -# as starting or stopping process. -#udp_server 1 -#udp_server_port 4321 -#udp_server_auth_address 192.168.1.23 -#process_firefox_start firefox -#process_firefox_stop killall firefox -#service_messenger 1 - # Example of preconditions #module_begin #module_name Test Precondicion From 9a8818b6a45c6807f1ebc869849a9bc0ebef0df1 Mon Sep 17 00:00:00 2001 From: Vanessa Gil Date: Mon, 29 Sep 2014 11:19:51 +0200 Subject: [PATCH 6/9] Fixed graph of tactical view in metaconsole. --- pandora_console/include/functions_graph.php | 9 +++++++-- pandora_console/include/functions_reporting.php | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 7d54e946cf..5d9c09275a 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1512,7 +1512,7 @@ function truncate_negatives(&$element) { * @param bool return or echo flag * @param bool show_not_init flag */ -function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $return = false, $show_not_init = false) { +function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $return = false, $show_not_init = false, $data_agents=false) { global $config; @@ -1531,8 +1531,13 @@ function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $re if ($show_not_init) { $fields[] = 'SUM(notinit_count) "Not init"'; } + + if ($data_agents == false) { + $data = db_get_row_filter('tagente', $filter, $fields); + } else { + $data = $data_agents; + } - $data = db_get_row_filter('tagente', $filter, $fields); if (empty($data)) { $data = array(); } diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 5d3259d057..23be23bf01 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -1350,7 +1350,7 @@ function reporting_get_stats_servers($tiny = true) { return $output; } -function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_height = 150, $links = false) { +function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_height = 150, $links = false, $data_agents=false) { global $config; // Link URLS @@ -1414,14 +1414,14 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he $tdata[2] = $tdata[3] = ''; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; - + if ($data["monitor_checks"] > 0) { $tdata = array(); $table_mbs->colspan[count($table_mbs->data)][0] = 4; $table_mbs->cellstyle[count($table_mbs->data)][0] = 'text-align: center;'; $tdata[0] = '
' . '
' . - graph_agent_status(false, $graph_width, $graph_height, true, true) . + graph_agent_status(false, $graph_width, $graph_height, true, true, $data_agents) . '
'; $table_mbs->rowclass[] = ''; $table_mbs->data[] = $tdata; From be31c5e400445a1b03d92806a4d6fb2c6d74438e Mon Sep 17 00:00:00 2001 From: Vanessa Gil Date: Mon, 29 Sep 2014 11:27:10 +0200 Subject: [PATCH 7/9] Fixed bug in event filter. --- .../operation/events/events.build_query.php | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index 912336e437..2c1e5c9c88 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -48,9 +48,29 @@ else { $sql_post = ""; } else { - //Otherwise select all groups the user has rights to. - $sql_post = " AND id_grupo IN (" . - implode (",", array_keys ($groups)) . ")"; + if ($meta) { + // In metaconsole the group search is performed by name + + $sql_post = " AND group_name IN ( "; + $i = 0; + foreach ($groups as $group_id=>$group_name) { + if ($group_id == 0) { + continue; + } + if ($i==0) { + $sql_post .= "'$group_name'"; + } else { + $sql_post .= ",'$group_name'"; + } + $i++; + } + $sql_post.= ")"; + + } else { + //Otherwise select all groups the user has rights to. + $sql_post = " AND id_grupo IN (" . + implode (",", array_keys ($groups)) . ")"; + } } } From 844b5b93a2dae0dc952df2971c296955ae897f50 Mon Sep 17 00:00:00 2001 From: Hirofumi Kosaka Date: Mon, 29 Sep 2014 19:31:24 +0900 Subject: [PATCH 8/9] Moved log rotation from inside of logger() to pandora_server's periodic tasks, preventing warnings below at pandora_server.error; > Use of uninitialized value in numeric gt (>) at /usr/lib/perl5/PandoraFMS/Tools.pm line 415. MERGED FROM pandora_5.0. --- pandora_server/bin/pandora_server | 3 +++ pandora_server/lib/PandoraFMS/Tools.pm | 32 ++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 5c296b35f8..31068a1a34 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -270,6 +270,9 @@ sub pandora_server_tasks ($) { # Update forced alerts pandora_exec_forced_alerts ($pa_config, $dbh); + + # Rotate Log File + pandora_rotate_logfile($pa_config); } # TASKS EXECUTED EVERY 30 SECONDS (Mid latency tasks) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 708a874ca7..8534af25c6 100644 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -62,6 +62,7 @@ our @EXPORT = qw( cron_next_execution_date pandora_daemonize logger + pandora_rotate_logfile limpia_cadena md5check float_equal @@ -441,7 +442,7 @@ sub logger ($$;$) { $level = 1 unless defined ($level); return if ($level > $pa_config->{'verbosity'}); - + if (!defined($pa_config->{'logfile'})) { print strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " [V". $level ."] " . $message . "\n"; return; @@ -465,20 +466,33 @@ sub logger ($$;$) { syslog($security_level, $message); closelog(); } else { - # Log rotation - if (-e $file && (stat($file))[7] > $pa_config->{'max_log_size'}) { - foreach my $i (reverse 1..$pa_config->{'max_log_generation'}) { - rename ($file . "." . ($i - 1), $file . "." . $i); - } - rename ($file, "$file.0"); - } - open (FILE, ">> $file") or die "[FATAL] Could not open logfile '$file'"; + # Get an exclusive lock on the file (LOCK_EX) + flock (FILE, 2); print FILE strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " " . $pa_config->{'servername'} . $pa_config->{'servermode'} . " [V". $level ."] " . $message . "\n"; close (FILE); } } +######################################################################## +# SUB pandora_rotate_log (pa_config) +# Log to file +######################################################################## +sub pandora_rotate_logfile ($) { + my ($pa_config) = @_; + + my $file = $pa_config->{'logfile'}; + + # Log File Rotation + if ($file ne 'syslog' && -e $file && (stat($file))[7] > $pa_config->{'max_log_size'}) { + foreach my $i (reverse 1..$pa_config->{'max_log_generation'}) { + rename ($file . "." . ($i - 1), $file . "." . $i); + } + rename ($file, "$file.0"); + + } +} + ######################################################################## # limpia_cadena (string) - Purge a string for any forbidden characters (esc, etc) ######################################################################## From 7d6ff047446d02dc31c15a8e161c2f77ac1ec349 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 29 Sep 2014 13:15:26 +0200 Subject: [PATCH 9/9] Now the report type 'serialized data' gets the data from the default and the historical database --- pandora_console/include/functions_reporting.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 23be23bf01..f8f8d5a2df 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4778,19 +4778,21 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $datelimit = $report["datetime"] - $content['period']; + // This query gets information from the default and the historic database $result = db_get_all_rows_sql('SELECT * FROM tagente_datos WHERE id_agente_modulo = ' . $content['id_agent_module'] . ' AND utimestamp > ' . $datelimit . ' - AND utimestamp <= ' . $report["datetime"]); + AND utimestamp <= ' . $report["datetime"], true); // Adds string data if there is no numeric data - if ((count($result) < 0) or (!$result)){ + if ((count($result) < 0) or (!$result)) { + // This query gets information from the default and the historic database $result = db_get_all_rows_sql('SELECT * FROM tagente_datos_string WHERE id_agente_modulo = ' . $content['id_agent_module'] . ' AND utimestamp > ' . $datelimit . ' - AND utimestamp <= ' . $report["datetime"]); + AND utimestamp <= ' . $report["datetime"], true); } if ($result === false) { $result = array();