diff --git a/README.md b/README.md
index 07069d5e84..3187ac8487 100644
--- a/README.md
+++ b/README.md
@@ -8,31 +8,34 @@ Pandora FMS is a monitoring software for IT infrastructure management which incl
For community support you can visit our forums at http://forums.pandorafms.org. Visit our community page at http://pandorafms.org and if you need commercial information or/and professional support visit http://pandorafms.com.
-
### How to install Pandora FMS
Installing Pandora FMS is a very easy task. Please visit our wiki and follow all the steps described for a quick and proper installation. http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Installing
### What is Pandora FMS?
-Pandora FMS is a monitoring application to watch systems and applications that allows to know the status of any element of the business systems. Pandora FMS watches your hardware, software, your multilayer system and, of course, your OS. Pandora FMS can detect if a network interface is down or the movement of any NASDAQ new technology market value. If you wish, Pandora FMS can send a SMS message when your system or your application fails or when Google stock value drops below 330 US$. Pandora FMS will fit your systems and requirements, because it has been designed to be open, modular, multiplattform and easy to customize.
+
+Pandora FMS is a monitoring application to watch systems and applications that allows to know the status of any element of the business systems. Pandora FMS watches your hardware, software, your multilayer system and, of course, your OS. Pandora FMS can detect if a network interface is down or the movement of any NASDAQ new technology market value. If you wish, Pandora FMS can send a SMS message when your system or your application fails or when Google stock value drops below 330 US\$. Pandora FMS will fit your systems and requirements, because it has been designed to be open, modular, multiplattform and easy to customize.
### Other things Pandora FMS can do
-Pandora FMS is a monitoring tool that not only measures if a parameter is right or wrong. Pandora FMS can quantify the state (right or wrong), or store a value (numeric or alphanumeric) for months if necessary. Pandora FMS can measure performances, compare values among different systems and set alarms over thresholds. Pandora FMS works against a Database so it can generate reports, statistics, SLA and meausre anything: OS, applications and hardware systems, such as firewalls, proxies, Databases, web servers, VPN, routers, switches, processes, services, remote accesses to servers, etc. Everything integrated in an open and distributed architecture. Pandora FMS can be deployed over any OS, with specific agents for each platform. There are agents for Windows (2000, XP, 2003), GNU/Linux, Solaris, HP-UX, BSD, AIX, IPSO and OpenWRT. Pandora FMS not only gathers information through its agents, but it can also monitor any hardware system with TCP/IP connectivity, such as load balancing systems, routers, switches or printers, through SNMP and TCP/ICMP checks.
+
+Pandora FMS is a monitoring tool that not only measures if a parameter is right or wrong. Pandora FMS can quantify the state (right or wrong), or store a value (numeric or alphanumeric) for months if necessary. Pandora FMS can measure performances, compare values among different systems and set alarms over thresholds. Pandora FMS works against a Database so it can generate reports, statistics, SLA and meausre anything: OS, applications and hardware systems, such as firewalls, proxies, Databases, web servers, VPN, routers, switches, processes, services, [remote accesses to servers](https://pandorafms.com/server-monitoring/), etc. Everything integrated in an open and distributed architecture. Pandora FMS can be deployed over any OS, with specific agents for each platform. There are agents for Windows (2000, XP, 2003), GNU/Linux, Solaris, HP-UX, BSD, AIX, IPSO and OpenWRT. Pandora FMS not only gathers information through its agents, but it can also monitor any hardware system with TCP/IP connectivity, such as load balancing systems, routers, switches or printers, through SNMP and TCP/ICMP checks.
### Main features
-* Network monitoring
-* WMI monitoring
-* Agent monitoring (for all OS)
-* Graphical reporting, based on it's own SQL backend
-* SLA, and ITIL KPI metrics on reporting
-* Status & Performance monitoring
-* GIS tracking and viewing
-* Inventory management (Local and remote)
-* User defined visual console screens and Dashboards WYSIWYG
-* Very high capacity (Thousands of devices)
-* Multiuser, several levels of ACL management.
+
+- Network monitoring
+- WMI monitoring
+- Agent monitoring (for all OS)
+- Graphical reporting, based on it's own SQL backend
+- SLA, and ITIL KPI metrics on reporting
+- Status & Performance monitoring
+- GIS tracking and viewing
+- Inventory management (Local and remote)
+- User defined visual console screens and Dashboards WYSIWYG
+- Very high capacity (Thousands of devices)
+- Multiuser, several levels of ACL management.
### Screenshots
+

diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf
index d0a75daa64..a8976d5b1d 100644
--- a/pandora_agents/pc/AIX/pandora_agent.conf
+++ b/pandora_agents/pc/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, AIX version
+# Version 7.0NG.749, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/FreeBSD/pandora_agent.conf b/pandora_agents/pc/FreeBSD/pandora_agent.conf
index 99c223c44b..db354ce74e 100644
--- a/pandora_agents/pc/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/pc/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, FreeBSD Version
+# Version 7.0NG.749, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/HP-UX/pandora_agent.conf b/pandora_agents/pc/HP-UX/pandora_agent.conf
index e02ab21bc0..35ab968b83 100644
--- a/pandora_agents/pc/HP-UX/pandora_agent.conf
+++ b/pandora_agents/pc/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, HP-UX Version
+# Version 7.0NG.749, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Linux/pandora_agent.conf b/pandora_agents/pc/Linux/pandora_agent.conf
index 8fb9619396..d01aedfcb6 100644
--- a/pandora_agents/pc/Linux/pandora_agent.conf
+++ b/pandora_agents/pc/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, GNU/Linux
+# Version 7.0NG.749, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/NT4/pandora_agent.conf b/pandora_agents/pc/NT4/pandora_agent.conf
index da44447fb5..d3d6bbe3ad 100644
--- a/pandora_agents/pc/NT4/pandora_agent.conf
+++ b/pandora_agents/pc/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, GNU/Linux
+# Version 7.0NG.749, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/SunOS/pandora_agent.conf b/pandora_agents/pc/SunOS/pandora_agent.conf
index 1732b09047..a1c0730d7d 100644
--- a/pandora_agents/pc/SunOS/pandora_agent.conf
+++ b/pandora_agents/pc/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, Solaris Version
+# Version 7.0NG.749, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/pc/Win32/pandora_agent.conf b/pandora_agents/pc/Win32/pandora_agent.conf
index a792678b72..58f0273c5f 100644
--- a/pandora_agents/pc/Win32/pandora_agent.conf
+++ b/pandora_agents/pc/Win32/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2010 Artica Soluciones Tecnologicas
-# Version 7.0NG.746
+# Version 7.0NG.749
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf
index 1701726cac..0a03ed9406 100644
--- a/pandora_agents/shellscript/aix/pandora_agent.conf
+++ b/pandora_agents/shellscript/aix/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.746, AIX version
+# Version 7.0NG.749, AIX version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
index d22024a70e..960b5c6571 100644
--- a/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
+++ b/pandora_agents/shellscript/bsd-ipso/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.746
+# Version 7.0NG.749
# FreeBSD/IPSO version
# Licenced under GPL licence, 2003-2007 Sancho Lerena
diff --git a/pandora_agents/shellscript/hp-ux/pandora_agent.conf b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
index be269b14bb..06f9dad4e7 100644
--- a/pandora_agents/shellscript/hp-ux/pandora_agent.conf
+++ b/pandora_agents/shellscript/hp-ux/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.746, HPUX Version
+# Version 7.0NG.749, HPUX Version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf
index b8e6838203..c648bdbc26 100644
--- a/pandora_agents/shellscript/linux/pandora_agent.conf
+++ b/pandora_agents/shellscript/linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746
+# Version 7.0NG.749
# Licensed under GPL license v2,
# (c) 2003-2010 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/mac_osx/pandora_agent.conf b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
index a3dd4a0d2f..c8806e32c8 100644
--- a/pandora_agents/shellscript/mac_osx/pandora_agent.conf
+++ b/pandora_agents/shellscript/mac_osx/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746
+# Version 7.0NG.749
# Licensed under GPL license v2,
# (c) 2003-2009 Artica Soluciones Tecnologicas
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/openWRT/pandora_agent.conf b/pandora_agents/shellscript/openWRT/pandora_agent.conf
index c491068bf4..c11692b728 100644
--- a/pandora_agents/shellscript/openWRT/pandora_agent.conf
+++ b/pandora_agents/shellscript/openWRT/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746
+# Version 7.0NG.749
# Licensed under GPL license v2,
# please visit http://pandora.sourceforge.net
diff --git a/pandora_agents/shellscript/solaris/pandora_agent.conf b/pandora_agents/shellscript/solaris/pandora_agent.conf
index e0be14d00a..59db4e115a 100644
--- a/pandora_agents/shellscript/solaris/pandora_agent.conf
+++ b/pandora_agents/shellscript/solaris/pandora_agent.conf
@@ -1,6 +1,6 @@
# Fichero de configuracion base de agentes de Pandora
# Base config file for Pandora agents
-# Version 7.0NG.746, Solaris version
+# Version 7.0NG.749, Solaris version
# General Parameters
# ==================
diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index c24870acfd..f81cfe787c 100644
--- a/pandora_agents/unix/AIX/pandora_agent.conf
+++ b/pandora_agents/unix/AIX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, AIX version
+# Version 7.0NG.749, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index d6354e3264..e58458e79e 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.746-200617
+Version: 7.0NG.749-200909
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 ebf1db1cd6..4c3b4f0e9a 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.746-200617"
+pandora_version="7.0NG.749-200909"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
@@ -81,6 +81,9 @@ cp -aRf man/man1/* temp_package/usr/share/man/man1/
# Relocate plugins to the final dir and delete
cp temp_package/usr/share/pandora_agent/plugins/* temp_package/etc/pandora/plugins
+# Make sure the plugins have execution privileges
+chmod 755 temp_package/etc/pandora/plugins/*
+
echo "Official plugins are placed on /etc/pandora/plugins" > temp_package/usr/share/pandora_agent/plugins/README
#Disabled, now the package overwrite the previous files.
diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf
index 1f3c3f196a..f0f43f80e0 100644
--- a/pandora_agents/unix/Darwin/pandora_agent.conf
+++ b/pandora_agents/unix/Darwin/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, GNU/Linux
+# Version 7.0NG.749, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf
index 5afed87d77..33b2fe1271 100644
--- a/pandora_agents/unix/FreeBSD/pandora_agent.conf
+++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, FreeBSD Version
+# Version 7.0NG.749, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf
index dc16545f04..717a1e6e2a 100644
--- a/pandora_agents/unix/HP-UX/pandora_agent.conf
+++ b/pandora_agents/unix/HP-UX/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, HP-UX Version
+# Version 7.0NG.749, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf
index 9e1bd63a83..36ea7c62de 100644
--- a/pandora_agents/unix/Linux/pandora_agent.conf
+++ b/pandora_agents/unix/Linux/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, GNU/Linux
+# Version 7.0NG.749, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf
index 82a63a8d00..fbde635047 100644
--- a/pandora_agents/unix/NT4/pandora_agent.conf
+++ b/pandora_agents/unix/NT4/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, GNU/Linux
+# Version 7.0NG.749, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf
index 36ab7779b3..fafa8485f6 100644
--- a/pandora_agents/unix/NetBSD/pandora_agent.conf
+++ b/pandora_agents/unix/NetBSD/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, NetBSD Version
+# Version 7.0NG.749, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf
index b7510e704b..a533c29424 100644
--- a/pandora_agents/unix/SunOS/pandora_agent.conf
+++ b/pandora_agents/unix/SunOS/pandora_agent.conf
@@ -1,5 +1,5 @@
# Base config file for Pandora FMS agents
-# Version 7.0NG.746, Solaris Version
+# Version 7.0NG.749, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index c1544a1c73..ef4c908c70 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -54,8 +54,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
-use constant AGENT_VERSION => '7.0NG.746';
-use constant AGENT_BUILD => '200617';
+use constant AGENT_VERSION => '7.0NG.749';
+use constant AGENT_BUILD => '200909';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
@@ -1678,7 +1678,7 @@ sub execute_command_timeout {
};
my $result = ($?>>8);
- print $result;
+ return $result;
# Exit child.
# Child finishes.
@@ -1753,7 +1753,7 @@ sub execute_command_block {
);
# Do not retry if success.
- last if looks_like_number($err_level) && $err_level == 0;
+ $retries = 0 if looks_like_number($err_level) && $err_level == 0;
} while ((--$retries) > 0);
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 08574ef764..ac8ab949a1 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.746
-%define release 200617
+%define version 7.0NG.749
+%define release 200909
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
@@ -21,10 +21,10 @@ BuildArch: noarch
Requires(pre): shadow-utils
Requires(post): chkconfig /bin/ln
Requires(preun): chkconfig /bin/rm /usr/sbin/userdel
-Requires: fileutils textutils unzip
+Requires: coreutils unzip
Requires: util-linux procps grep
Requires: /sbin/ip /bin/awk
-Requires: perl perl(Sys::Syslog) perl(IO::Compress::Zip) perl(YAML::Tiny)
+Requires: perl perl(Sys::Syslog) perl(IO::Compress::Zip)
# Required by plugins
#Requires: sh-utils sed passwd net-tools rpm
AutoReq: 0
@@ -108,8 +108,27 @@ mkdir -p /var/spool/pandora/data_out
if [ ! -d /var/log/pandora ]; then
mkdir -p /var/log/pandora
fi
-/sbin/chkconfig --add pandora_agent_daemon
-/sbin/chkconfig pandora_agent_daemon on
+
+if [ `command -v systemctl` ];
+then
+ echo "Copying new version of pandora_agent_daemon service"
+ cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/
+ chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service
+# Enable the services on SystemD
+ systemctl enable pandora_agent_daemon.service
+else
+ /sbin/chkconfig --add pandora_agent_daemon
+ /sbin/chkconfig pandora_agent_daemon on
+fi
+
+if [ "$1" -gt 1 ]
+then
+
+ echo "If Pandora Agent daemon was running with init.d script,"
+ echo "please stop it manually and start the service with systemctl"
+
+fi
+
%preun
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index cb16f57d9d..504746fb8f 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -2,8 +2,8 @@
#Pandora FMS Linux Agent
#
%define name pandorafms_agent_unix
-%define version 7.0NG.746
-%define release 200617
+%define version 7.0NG.749
+%define release 200909
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
@@ -20,7 +20,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
BuildArch: noarch
#PreReq: %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep /usr/sbin/useradd
Requires(pre,preun):/usr/bin/sed /usr/bin/grep /usr/sbin/useradd
-Requires: coreutils unzip perl perl(Sys::Syslog) perl(IO::Compress::Zip) perl(YAML::Tiny)
+Requires: coreutils unzip perl perl(Sys::Syslog) perl(IO::Compress::Zip)
AutoReq: 0
Provides: %{name}-%{version}
@@ -98,11 +98,27 @@ fi
cp -aRf /usr/share/pandora_agent/pandora_agent_logrotate /etc/logrotate.d/pandora_agent
-# Enable the service on SystemD
-systemctl enable pandora_agent_daemon.service
-
mkdir -p /var/spool/pandora/data_out
-chkconfig pandora_agent_daemon on
+
+if [ `command -v systemctl` ];
+then
+ echo "Copying new version of pandora_agent_daemon service"
+ cp -f /usr/share/pandora_agent/pandora_agent_daemon.service /usr/lib/systemd/system/
+ chmod -x /usr/lib/systemd/system/pandora_agent_daemon.service
+# Enable the services on SystemD
+ systemctl enable pandora_agent_daemon.service
+else
+ chkconfig pandora_agent_daemon on
+fi
+
+if [ "$1" -gt 1 ]
+then
+
+ echo "If Pandora Agent daemon was running with init.d script,"
+ echo "please stop it manually and start the service with systemctl"
+
+fi
+
%preun
diff --git a/pandora_agents/unix/pandora_agent_daemon.service b/pandora_agents/unix/pandora_agent_daemon.service
index 182144d1e7..103ca44167 100644
--- a/pandora_agents/unix/pandora_agent_daemon.service
+++ b/pandora_agents/unix/pandora_agent_daemon.service
@@ -4,6 +4,8 @@ After=network-online.target
[Service]
ExecStart=/usr/bin/pandora_agent /etc/pandora
+Restart=on-failure
+RestartPreventExitStatus=1
[Install]
WantedBy=multi-user.target
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index f4f03b1a40..c519b3c3ad 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -9,8 +9,8 @@
# Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license.
# **********************************************************************
-PI_VERSION="7.0NG.746"
-PI_BUILD="200617"
+PI_VERSION="7.0NG.749"
+PI_BUILD="200909"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/unix/plugins/grep_log b/pandora_agents/unix/plugins/grep_log
index 76661c5230..2143464b48 100755
--- a/pandora_agents/unix/plugins/grep_log
+++ b/pandora_agents/unix/plugins/grep_log
@@ -56,6 +56,8 @@ my $Reg_exp = '';
# Flag to show or not summary module
my $summary_flag = 0;
+my $nodatalist_flag = 0;
+
# Number of coincidences found
my $coincidences = 0;
@@ -120,7 +122,15 @@ sub error_msg ($) {
# Print a help message.
###############################################################################
sub print_help () {
- print "Usage: $0 [--summary]\n";
+ print "Usage: $0 [--summary] [--nodatalist]\n\n";
+ print "Options:\n";
+ print "\t\t\tPath to the log file to be monitored\n";
+ print "\t\t\tName of the module that will be created\n";
+ print "\t\t\tRegex string to be matched in log file\n";
+ print "\t\tShows NUM lines before matching lines to provide context\n";
+ print "\t\tShows NUM lines after matching lines to provide context\n";
+ print "\t--summary\t\tCreates a module with the total number of matches\n";
+ print "\t--nodatalist\t\tInserts all coincidences in a single data output instead of a data per line\n";
}
###############################################################################
@@ -317,6 +327,7 @@ sub print_log ($) {
if ($#kdata < 0) {
print_summary() if ($summary_flag == 1);
return;
+
}
# Log module
@@ -341,6 +352,18 @@ sub print_log ($) {
$output = "\n";
$output .= "\n";
$output .= "\n";
+ if ($nodatalist_flag == 1){
+ $output .= "{$line}}) {
+ my $processed_line = $content;
+ $processed_line =~ "\n";
+ $output .= $processed_line;
+ }
+ }
+ $output .= "]]>\n";
+ }
+ else {
$output .= "\n";
+ }
$output .= "\n";
print stdout $output;
}
+
}
###############################################################################
@@ -376,12 +401,18 @@ $Reg_exp = trim($ARGV[2]);
my $up_lines = trim($ARGV[3]);
my $bot_lines = trim($ARGV[4]);
my $sum_flag = trim($ARGV[5]);
+my $nodatalist = trim($ARGV[6]);
-if ( ( defined($up_lines) && ($up_lines eq "--summary"))
- || ( defined($bot_lines) && ($bot_lines eq "--summary"))
- || ( defined($sum_flag) && ($sum_flag eq "--summary")) ) {
- $summary_flag = 1;
+if ( grep { /--summary/ } @ARGV )
+{
+ $summary_flag = 1;
}
+
+if ( grep { /--nodatalist/ } @ARGV )
+{
+ $nodatalist_flag = 1;
+}
+
# Create index file storage directory
if ( ! -d $Idx_dir) {
mkdir($Idx_dir) || error_msg("Error creating directory $Idx_dir: "
diff --git a/pandora_agents/unix/plugins/inventory b/pandora_agents/unix/plugins/inventory
index b361bb43ac..bca287e7ba 100755
--- a/pandora_agents/unix/plugins/inventory
+++ b/pandora_agents/unix/plugins/inventory
@@ -460,15 +460,19 @@ close (FILE);
$Mode = 'LSHW';
$Separator = '\s+\*\-';
my @hwinfo;
+my $lshwpath = $0 =~ s/inventory/lshw/r ;
if (is_enabled $AIX) {
$Separator = '^\s*$';
@hwinfo=`prtconf 2>/dev/null`;
} else {
@hwinfo = `lshw 2>/dev/null`;
if ($? != 0) {
- $Mode = 'HWINFO';
- $Separator = 'Hardware Class:';
- @hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
+ @hwinfo = `$lshwpath 2>/dev/null`;
+ if ($? != 0) {
+ $Mode = 'HWINFO';
+ $Separator = 'Hardware Class:';
+ @hwinfo = `hwinfo --cpu --memory --gfxcard --netcard --cdrom --disk 2>/dev/null`;
+ }
}
}
diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf
index 1cbeeafa0a..91aee94a6f 100644
--- a/pandora_agents/win32/bin/pandora_agent.conf
+++ b/pandora_agents/win32/bin/pandora_agent.conf
@@ -1,6 +1,6 @@
# Base config file for Pandora FMS Windows Agent
# (c) 2006-2017 Artica Soluciones Tecnologicas
-# Version 7.0NG.746
+# Version 7.0NG.749
# This program is Free Software, you can redistribute it and/or modify it
# under the terms of the GNU General Public Licence as published by the Free Software
diff --git a/pandora_agents/win32/bin/util/grep_log.exe b/pandora_agents/win32/bin/util/grep_log.exe
index 4e4029fb60..dbabc454b4 100644
Binary files a/pandora_agents/win32/bin/util/grep_log.exe and b/pandora_agents/win32/bin/util/grep_log.exe differ
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index e654b4779c..c91cf9a768 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -3,7 +3,7 @@ AllowLanguageSelection
{Yes}
AppName
-{Pandora FMS Windows Agent v7.0NG.746}
+{Pandora FMS Windows Agent v7.0NG.749}
ApplicationID
{17E3D2CF-CA02-406B-8A80-9D31C17BD08F}
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{200617}
+{200909}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index a6729d9272..4e7d18f146 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.746(Build 200617)")
+#define PANDORA_VERSION ("7.0NG.749(Build 200909)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index 4227662906..42af4e8513 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", "(7.0NG.746(Build 200617))"
+ VALUE "ProductVersion", "(7.0NG.749(Build 200909))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/.gitignore b/pandora_console/.gitignore
index 14c3e02e3d..a56f376f61 100644
--- a/pandora_console/.gitignore
+++ b/pandora_console/.gitignore
@@ -6,7 +6,10 @@ attachment/collection
attachment/files_repo
include/config.php
pandora_console.log
+log/console.log
+log/cron.log
enterprise
*.bak
audit.log
+log/audit.log
install_old.php
diff --git a/pandora_console/.htaccess b/pandora_console/.htaccess
index a1e6f62d2d..ca572f7df1 100644
--- a/pandora_console/.htaccess
+++ b/pandora_console/.htaccess
@@ -4,5 +4,4 @@ Options -Indexes
Order Allow,Deny
Deny from All
-
-
+
\ No newline at end of file
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 9db199ff25..3b29befe77 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.746-200617
+Version: 7.0NG.749-200909
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 e384ee3f34..1cd666d370 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.746-200617"
+pandora_version="7.0NG.749-200909"
package_pear=0
package_pandora=1
diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php
index a304fd516b..7d7619ff95 100644
--- a/pandora_console/ajax.php
+++ b/pandora_console/ajax.php
@@ -27,6 +27,8 @@
*/
// Begin.
+require 'vendor/autoload.php';
+
define('AJAX', true);
if (!defined('__PAN_XHPROF__')) {
@@ -39,7 +41,9 @@ if (__PAN_XHPROF__ === 1) {
}
}
-if ((! file_exists('include/config.php')) || (! is_readable('include/config.php'))) {
+if ((! file_exists('include/config.php'))
+ || (! is_readable('include/config.php'))
+) {
exit;
}
@@ -50,13 +54,25 @@ require_once 'include/functions.php';
require_once 'include/functions_db.php';
require_once 'include/auth/mysql.php';
-// Hash login process
-if (isset($_GET['loginhash'])) {
+if (isset($config['console_log_enabled']) === true
+ && $config['console_log_enabled'] == 1
+) {
+ ini_set('log_errors', 1);
+ ini_set('error_log', $config['homedir'].'/log/console.log');
+} else {
+ ini_set('log_errors', 0);
+ ini_set('error_log', 0);
+}
+
+// Hash login process.
+if (isset($_GET['loginhash']) === true) {
$loginhash_data = get_parameter('loginhash_data', '');
$loginhash_user = str_rot13(get_parameter('loginhash_user', ''));
if ($config['loginhash_pwd'] != ''
- && $loginhash_data == md5($loginhash_user.io_output_password($config['loginhash_pwd']))
+ && $loginhash_data == md5(
+ $loginhash_user.io_output_password($config['loginhash_pwd'])
+ )
) {
db_logon($loginhash_user, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $loginhash_user;
@@ -65,14 +81,38 @@ if (isset($_GET['loginhash'])) {
include_once 'general/login_page.php';
db_pandora_audit('Logon Failed (loginhash', '', 'system');
while (@ob_end_flush()) {
+ // Dumping...
+ continue;
}
exit('