diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index a92a79704f..81808209d5 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.773.3-231009
+Version: 7.0NG.773.3-231010
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 620851f5ec..7c985eda83 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="7.0NG.773.3-231009"
+pandora_version="7.0NG.773.3-231010"
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 2d47136f63..c19a2cec78 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -1031,7 +1031,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.773.3';
-use constant AGENT_BUILD => '231009';
+use constant AGENT_BUILD => '231010';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 08b764f51b..06c801ffd1 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.773.3
-%define release 231009
+%define release 231010
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.redhat_bin.spec b/pandora_agents/unix/pandora_agent.redhat_bin.spec
index e4d91ef456..991cbe0877 100644
--- a/pandora_agents/unix/pandora_agent.redhat_bin.spec
+++ b/pandora_agents/unix/pandora_agent.redhat_bin.spec
@@ -5,7 +5,7 @@
%define name pandorafms_agent_linux_bin
%define source_name pandorafms_agent_linux
%define version 7.0NG.773.3
-%define release 231009
+%define release 231010
Summary: Pandora FMS Linux agent, binary version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index efa33579b4..777b6fc28c 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_agent_linux
%define version 7.0NG.773.3
-%define release 231009
+%define release 231010
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index c94bb52d1e..9a2d9ad307 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.773.3"
-PI_BUILD="231009"
+PI_BUILD="231010"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 64665b90d3..e3920cfc95 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{231009}
+{231010}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index fe6c911fe9..bb12ef0f09 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 ("7.0NG.773.3 Build 231009")
+#define PANDORA_VERSION ("7.0NG.773.3 Build 231010")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 13e4caccbe..260c1b3308 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Pandora FMS"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.773.3(Build 231009))"
+ VALUE "ProductVersion", "(7.0NG.773.3(Build 231010))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index eac67470fa..6a74fdef53 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.773.3-231009
+Version: 7.0NG.773.3-231010
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 1f2a64f9a3..1eb6207148 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="7.0NG.773.3-231009"
+pandora_version="7.0NG.773.3-231010"
package_pear=0
package_pandora=1
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 24a465a948..467b9356c5 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC231009';
+$build_version = 'PC231010';
$pandora_version = 'v7.0NG.773.3';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/install.php b/pandora_console/install.php
index b874e818fc..ef32094185 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -131,7 +131,7 @@
{'version'} . "' description='" . $pa_config->{'rb_product_name'} . " Server version " . $pa_config->{'version'} . "' agent_name='".$pa_config->{'servername'} . "' agent_alias='".$pa_config->{'servername'} . "' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
+ $xml_output = "
{'version'} . "' agent_name='pandora.internals' agent_alias='pandora.internals' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
$xml_output .=" ";
$xml_output .=" Status";
$xml_output .=" generic_proc";
@@ -6311,8 +6311,7 @@ sub pandora_self_monitoring ($$) {
$pandoradb = 1;
}
- my $num_threads = 0;
- $num_threads = get_db_value ($dbh, "SELECT SUM(threads) FROM tserver WHERE name = '".$pa_config->{"servername"}."'");
+ my $num_threads = get_db_value ($dbh, 'SELECT SUM(threads) FROM tserver WHERE name = "'.$pa_config->{"servername"}.'"');
my $cpu_load = 0;
$cpu_load = cpu_load();
@@ -6405,11 +6404,14 @@ sub pandora_self_monitoring ($$) {
$xml_output .=" ";
}
- $xml_output .=" ";
- $xml_output .=" Total Threads";
- $xml_output .=" generic_data";
- $xml_output .=" $num_threads";
- $xml_output .=" ";
+ if(defined($num_threads)) {
+ $xml_output .=" ";
+ $xml_output .=" Total Threads";
+ $xml_output .=" generic_data";
+ $xml_output .=" $num_threads";
+ $xml_output .=" ";
+ }
+
$xml_output .=" ";
$xml_output .=" CPU Load";
@@ -6441,11 +6443,12 @@ sub pandora_self_monitoring ($$) {
$xml_output .=" ";
}
+ # Installation monitoring.
+ $xml_output .= pandora_installation_monitoring($pa_config, $dbh);
$xml_output .= "";
- my $filename = $pa_config->{"incomingdir"}."/".$pa_config->{'servername'}.".self.".$utimestamp.".data";
-
+ my $filename = $pa_config->{"incomingdir"}."/pandora.internals.self".$utimestamp.".data";
open (XMLFILE, ">", $filename) or die "[FATAL] Could not open internal monitoring XML file for deploying monitorization at '$filename'";
print XMLFILE $xml_output;
close (XMLFILE);
@@ -6470,7 +6473,7 @@ sub pandora_thread_monitoring ($$$) {
# All trhead modules are "Status" module sons.
$module_parent = 'Status';
- $xml_output = "
{'version'} . "' agent_name='".$pa_config->{'servername'} . "' agent_alias='".$pa_config->{'servername'} . "' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
+ $xml_output = "{'version'} . "' agent_name='pandora.internals' agent_alias='pandora.internals' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
foreach my $server (@{$servers}) {
my $producer_stats = $server->getProducerStats();
while (my ($tid, $stats) = each(%{$producer_stats})) {
@@ -6536,7 +6539,7 @@ sub pandora_thread_monitoring ($$$) {
}
$xml_output .= "";
- my $filename = $pa_config->{"incomingdir"}."/".$pa_config->{'servername'}.".threads.".$utimestamp.".data";
+ my $filename = $pa_config->{"incomingdir"}."/pandora.internals.threads.".$utimestamp.".data";
open (XMLFILE, ">", $filename) or die "[FATAL] Could not write to the thread monitoring XML file '$filename'";
print XMLFILE $xml_output;
close (XMLFILE);
@@ -6557,7 +6560,6 @@ sub pandora_installation_monitoring($$) {
my @modules;
my $xml_output = "";
- $xml_output = "{'version'} . "' agent_name='pandora.internals' agent_alias='pandora.internals' interval='".$pa_config->{"self_monitoring_interval"}."' timestamp='".$timestamp."' >";
# Total amount of agents
my $module;
@@ -6597,13 +6599,6 @@ sub pandora_installation_monitoring($$) {
push(@modules, $module);
undef $module;
- # Total agent access record
- $module->{'name'} = "total_access_data";
- $module->{'description'} = 'Total agent access records';
- $module->{'data'} = get_db_value($dbh, 'SELECT COUNT(id_agent) FROM tagent_access');
- push(@modules, $module);
- undef $module;
-
# Total users
$module->{'name'} = "total_users";
$module->{'description'} = 'Total users';
@@ -6831,6 +6826,20 @@ sub pandora_installation_monitoring($$) {
push(@modules, $module);
undef $module;
+ # Last 24Events.
+ my $events_24 = get_db_value(
+ $dbh,
+ 'SELECT COUNT(id_evento)
+ FROM tevento
+ WHERE timestamp >=UNIX_TIMESTAMP(NOW() - INTERVAL 1 DAY)'
+ );
+ $module->{'name'} = "last_events_24h";
+ $module->{'description'} = 'Last 24h events';
+ $module->{'data'} = $events_24;
+ $module->{'module_interval'} = '288';
+ push(@modules, $module);
+ undef $module;
+
}
foreach my $module_data (@modules) {
@@ -6886,12 +6895,7 @@ sub pandora_installation_monitoring($$) {
my $wux_performance = enterprise_hook("wux_performance", [$pa_config, $dbh]);
$xml_output .= $wux_performance if defined($wux_performance);
- $xml_output .= "";
-
- my $filename = $pa_config->{"incomingdir"}."/pandora.internals.".$utimestamp.".data";
- open (XMLFILE, ">", $filename) or die "[FATAL] Could not write to the thread monitoring XML file '$filename'";
- print XMLFILE $xml_output;
- close (XMLFILE);
+ return $xml_output;
}
##########################################################################
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 704574b52d..b7c99eac51 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.773.3";
-my $pandora_build = "231009";
+my $pandora_build = "231010";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 9806be396c..715a34aa34 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.773.3
-%define release 231009
+%define release 231010
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index b1f55859e9..f058ecacf8 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -4,7 +4,7 @@
%global __os_install_post %{nil}
%define name pandorafms_server
%define version 7.0NG.773.3
-%define release 231009
+%define release 231010
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index b2e46b1b5a..f0d1ef8097 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.773.3"
-PI_BUILD="231009"
+PI_BUILD="231010"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 7d2c2eb679..dc2b07c47b 100755
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -35,7 +35,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
-my $version = "7.0NG.773.3 Build 231009";
+my $version = "7.0NG.773.3 Build 231010";
# Pandora server configuration
my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 97db74caf7..586345bcd3 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
-my $version = "7.0NG.773.3 Build 231009";
+my $version = "7.0NG.773.3 Build 231010";
# save program name for logging
my $progname = basename($0);