diff --git a/extras/Dockerfile b/extras/Dockerfile
index fcd39254fb..8f27c730b8 100644
--- a/extras/Dockerfile
+++ b/extras/Dockerfile
@@ -1,3 +1,4 @@
+# Dockerfile for the Pandora FMS image.
FROM debian:jessie
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
diff --git a/extras/chrome_extension/manifest.json b/extras/chrome_extension/manifest.json
index 662eaf24ee..85e62c1f13 100644
--- a/extras/chrome_extension/manifest.json
+++ b/extras/chrome_extension/manifest.json
@@ -1,14 +1,14 @@
{
"name": "__MSG_name__",
- "version": "1.0",
+ "version": "2.0",
"manifest_version": 2,
- "description": "__MSG_description__",
+ "description": "Pandora FMS Event viewer Chrome extension",
"homepage_url": "http://pandorafms.com",
"browser_action": {
"default_title": "__MSG_default_title__",
"default_icon": "images/icon.png",
"default_popup": "popup.html"
- },
+ },
"background": {
"page": "background.html"
},
diff --git a/extras/docker/Dockerfile b/extras/docker/Dockerfile
new file mode 100644
index 0000000000..5ffe12f2d5
--- /dev/null
+++ b/extras/docker/Dockerfile
@@ -0,0 +1,50 @@
+FROM pandorafms/pandorafms-base
+
+# Build variables.
+ARG BRANCH=develop
+ARG DB_PASS=pandora
+
+# Clone the Pandora FMS repo.
+RUN git clone --depth 1 -b "$BRANCH" https://github.com/pandorafms/pandorafms.git /tmp/pandorafms
+
+# Install the Pandora FMS Server.
+RUN cd /tmp/pandorafms/pandora_server && \
+yes | ./pandora_server_installer --install && \
+sed -i "s/^dbuser.*/dbuser root/" /etc/pandora/pandora_server.conf && \
+sed -i "s/^dbpass.*/dbpass $DB_PASS/" /etc/pandora/pandora_server.conf
+
+# Install the Pandora FMS Agent.
+RUN cd /tmp/pandorafms/pandora_agents/unix && \
+./pandora_agent_installer --install
+
+# Set the server's name in Apache's configuration file to avoid warnings.
+RUN sed -i "s/#ServerName.*/ServerName localhost:80/" /etc/httpd/conf/httpd.conf
+
+# Install the Pandora FMS Console.
+RUN service mysqld start && \
+/usr/bin/mysqladmin -u root password "$DB_PASS" && \
+service httpd start && \
+cp -r /tmp/pandorafms/pandora_console /var/www/html && \
+chown -R apache.apache /var/www/html/pandora_console/ && \
+python /tmp/pandorafms/tests/install_console.py
+
+# Redirect HTTP requests to / to the Pandora FMS Console.
+RUN echo '' > /var/www/html/index.html
+
+# Create the entrypoint script.
+RUN echo -e '#/bin/bash\n \
+service mysqld start &&\n \
+service httpd start &&\n \
+service crond start &&\n \
+/etc/init.d/pandora_agent_daemon start && \
+/etc/init.d/pandora_server start && \
+tail -f /var/log/pandora/pandora_server.log' \
+>> /entrypoint.sh && \
+chmod +x /entrypoint.sh
+
+# Clean-up.
+RUN rm -rf /tmp/pandorafms
+RUN yum clean all
+
+EXPOSE 80 3306 41121
+ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
diff --git a/extras/docker/build_and_push.sh b/extras/docker/build_and_push.sh
new file mode 100755
index 0000000000..980087cfe5
--- /dev/null
+++ b/extras/docker/build_and_push.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+docker build --rm=true --build-arg BRANCH="develop" --build-arg DB_PASS="pandora" -t pandorafms/pandorafms:7 . && \
+docker push pandorafms/pandorafms:7
diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh
index 2b77dd8e02..1953c7c834 100755
--- a/extras/pandora_update_version.sh
+++ b/extras/pandora_update_version.sh
@@ -56,6 +56,7 @@ AGENT_WIN_RC_FILE="$CODEHOME/pandora_agents/win32/versioninfo.rc"
SATELLITE_FILE="$PANDHOME_ENT/satellite_server/satellite_server.pl"
PERL_PLUGIN_FILES="$PANDHOME_ENT/pandora_plugins/NGINX/nginx_requests_queued.pl \
$PANDHOME_ENT/pandora_plugins/Sybase/sybase_plugin.pl \
+$PANDHOME_ENT/pandora_plugins/JMX/pandora_plugin_jmx.pl \
$PANDHOME_ENT/pandora_plugins/MarkLogic/pandora_marklogic.pl \
$PANDHOME_ENT/pandora_plugins/Apache/pandora_apache.pl \
$PANDHOME_ENT/pandora_plugins/Oracle/Database/pandora_oracle.pl \
@@ -65,7 +66,10 @@ $PANDHOME_ENT/pandora_plugins/MTL/pandora_mtl.pl \
$PANDHOME_ENT/pandora_plugins/Informix/informix.pl \
$PANDHOME_ENT/pandora_plugins/Ruckus/ruckus.pl \
$PANDHOME_ENT/pandora_plugins/UX/pandora_ux.pl \
-$PANDHOME_ENT/pandora_server/util/plugins/vmware-plugin.pl "
+$PANDHOME_ENT/pandora_plugins/JMX/pandora_plugin_jmx.pl \
+$PANDHOME_ENT/pandora_plugins/SNMP/dynamic_snmp.pl \
+$PANDHOME_ENT/pandora_plugins/MySQL/pandora_mysql.pl \
+$PANDHOME_ENT/pandora_server/util/plugin/vmware-plugin.pl "
PLUGIN_LIB_FILE="$CODEHOME/pandora_server/lib/PandoraFMS/PluginTools.pm"
# Update version in spec files
diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf
index 02fd3c957c..eb20b095f1 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.719, AIX version
+# Version 7.0NG.723, 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 628da69b4b..93b3cdb927 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.719, FreeBSD Version
+# Version 7.0NG.723, 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 e11e409af7..41d482d6d3 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.719, HP-UX Version
+# Version 7.0NG.723, 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 965f1f6f34..534718ad29 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.719, GNU/Linux
+# Version 7.0NG.723, 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 3654c93f80..e4d585a062 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.719, GNU/Linux
+# Version 7.0NG.723, 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 bdc4b70c3c..ddce174eed 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.719, Solaris Version
+# Version 7.0NG.723, 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 2a179f1c6d..1b3ea967ac 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.719
+# Version 7.0NG.723
# 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/pc/Win32/util/tentacle_server.exe b/pandora_agents/pc/Win32/util/tentacle_server.exe
index fc0522d9b0..a1b10c214f 100644
Binary files a/pandora_agents/pc/Win32/util/tentacle_server.exe and b/pandora_agents/pc/Win32/util/tentacle_server.exe differ
diff --git a/pandora_agents/pc/tentacle_server b/pandora_agents/pc/tentacle_server
index 283324b5ff..d6b5d4d3bd 100755
--- a/pandora_agents/pc/tentacle_server
+++ b/pandora_agents/pc/tentacle_server
@@ -102,7 +102,7 @@ my $SERVICE_NAME="Tentacle Server";
my $SERVICE_PARAMS=join(' ', @ARGV);
# Program version
-our $VERSION = '0.6.1';
+our $VERSION = '0.6.2';
# IPv4 address to listen on
my @t_addresses = ('0', '0.0.0.0');
@@ -217,6 +217,7 @@ sub print_help {
print ("\t-d\t\tRun as daemon.\n");
print ("\t-e cert\t\tOpenSSL certificate file. Enables SSL.\n");
print ("\t-f ca_cert\tVerify that the peer certificate is signed by a ca.\n");
+ print ("\t-F config_file\tConfiguration file full path.\n");
print ("\t-h\t\tShow help.\n");
print ("\t-I\t\tEnable insecure operations (file listing and moving).\n");
print ("\t-i\t\tFilters.\n");
@@ -278,11 +279,13 @@ sub daemonize {
################################################################################
sub parse_options {
my %opts;
+ my $CONF = {};
+ my $token_value;
my $tmp;
my @t_addresses_tmp;
# Get options
- if (getopts ('a:b:c:de:f:g:hIi:k:l:m:op:qr:s:S:t:TvVwx:', \%opts) == 0 || defined ($opts{'h'})) {
+ if (getopts ('a:b:c:de:f:F:g:hIi:k:l:m:op:qr:s:S:t:TvVwx:', \%opts) == 0 || defined ($opts{'h'})) {
print_help ();
exit 1;
}
@@ -304,10 +307,16 @@ sub parse_options {
}
}
+ # Configuration file
+ if (defined($opts{'F'})) {
+ parse_config_file($opts{'F'}, $CONF);
+ }
+
# Address
- if (defined ($opts{'a'})) {
+ $token_value = get_config_value($opts{'a'}, $CONF->{'addresses'});
+ if (defined ($token_value)) {
@t_addresses = ();
- @t_addresses_tmp = split(/,/, $opts{'a'});
+ @t_addresses_tmp = split(/,/, $token_value);
foreach my $t_address (@t_addresses_tmp) {
$t_address =~ s/^ *(.*?) *$/$1/;
@@ -323,15 +332,17 @@ sub parse_options {
}
# Maximum simultaneous connections
- if (defined ($opts{'c'})) {
- $t_max_conn = $opts{'c'};
+ $token_value = get_config_value($opts{'c'}, $CONF->{'max_connections'});
+ if (defined ($token_value)) {
+ $t_max_conn = $token_value;
if ($t_max_conn !~ /^\d+$/ || $t_max_conn < 1) {
error ("Invalid number of maximum simultaneous connections.");
}
}
# Run as daemon
- if (defined ($opts{'d'})) {
+ $token_value = get_config_value($opts{'d'}, $CONF->{'daemon'}, 1);
+ if (defined ($token_value)) {
if ($^ eq 'MSWin32') {
error ("-d flag not available for this OS.");
}
@@ -340,11 +351,12 @@ sub parse_options {
}
# Enable SSL
- if (defined ($opts{'e'})) {
+ $token_value = get_config_value($opts{'e'}, $CONF->{'ssl_cert'});
+ if (defined ($token_value)) {
require IO::Socket::SSL;
- $t_ssl_cert = $opts{'e'};
+ $t_ssl_cert = $token_value;
if (! -f $t_ssl_cert) {
error ("File $t_ssl_cert does not exist.");
}
@@ -353,21 +365,24 @@ sub parse_options {
}
# Verify peer certificate
- if (defined ($opts{'f'})) {
- $t_ssl_ca = $opts{'f'};
+ $token_value = get_config_value($opts{'f'}, $CONF->{'ssl_ca'});
+ if (defined ($token_value)) {
+ $t_ssl_ca = $token_value;
if (! -f $t_ssl_ca) {
error ("File $t_ssl_ca does not exist.");
}
}
# Insecure mode
- if (defined ($opts{'I'})) {
+ $token_value = get_config_value($opts{'I'}, $CONF->{'insecure'}, 1);
+ if (defined ($token_value)) {
$t_insecure = 1;
}
# Filters (regexp:dir;regexp:dir...)
- if (defined ($opts{'i'})) {
- my @filters = split (';', $opts{'i'});
+ $token_value = get_config_value($opts{'i'}, $CONF->{'filters'});
+ if (defined ($token_value)) {
+ my @filters = split (';', $token_value);
foreach my $filter (@filters) {
my ($regexp, $dir) = split (':', $filter);
next unless defined ($regexp) && defined ($dir);
@@ -381,51 +396,58 @@ sub parse_options {
}
# SSL private key file
- if (defined ($opts{'k'})) {
- $t_ssl_key = $opts{'k'};
+ $token_value = get_config_value($opts{'k'}, $CONF->{'ssl_key'});
+ if (defined ($token_value)) {
+ $t_ssl_key = $token_value;
if (! -f $t_ssl_key) {
error ("File $t_ssl_key does not exist.");
}
}
# Maximum file size
- if (defined ($opts{'m'})) {
- $t_max_size = $opts{'m'};
+ $token_value = get_config_value($opts{'m'}, $CONF->{'max_size'});
+ if (defined ($token_value)) {
+ $t_max_size = $token_value;
if ($t_max_size !~ /^\d+$/ || $t_max_size < 1) {
error ("Invalid maximum file size.");
}
}
# File overwrite
- if (defined ($opts{'o'})) {
+ $token_value = get_config_value($opts{'o'}, $CONF->{'overwrite'}, 1);
+ if (defined ($token_value)) {
$t_overwrite = 1;
}
# Port
- if (defined ($opts{'p'})) {
- $t_port = $opts{'p'};
+ $token_value = get_config_value($opts{'p'}, $CONF->{'port'});
+ if (defined ($token_value)) {
+ $t_port = $token_value;
if ($t_port !~ /^\d+$/ || $t_port < 1 || $t_port > 65535) {
error ("Port $t_port is not valid.");
}
}
# Quiet mode
- if (defined ($opts{'q'})) {
+ $token_value = get_config_value($opts{'q'}, $CONF->{'quiet'}, 1);
+ if (defined ($token_value)) {
$t_quiet = 1;
}
# Retries
- if (defined ($opts{'r'})) {
- $t_retries = $opts{'r'};
+ $token_value = get_config_value($opts{'r'}, $CONF->{'retries'});
+ if (defined ($token_value)) {
+ $t_retries = $token_value;
if ($t_retries !~ /^\d+$/ || $t_retries < 1) {
error ("Invalid number of retries for network operations.");
}
}
# Storage directory
- if (defined ($opts{'s'})) {
+ $token_value = get_config_value($opts{'s'}, $CONF->{'directory'});
+ if (defined ($token_value)) {
- $t_directory = $opts{'s'};
+ $t_directory = $token_value;
# Check that directory exists
if (! -d $t_directory) {
@@ -444,25 +466,36 @@ sub parse_options {
}
}
else {
- if (! defined($opts{'b'})) {
+ $token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'});
+ if (! defined($token_value)) {
print_help ();
exit 1;
}
}
# Timeout
- if (defined ($opts{'t'})) {
- $t_timeout = $opts{'t'};
+ $token_value = get_config_value($opts{'t'}, $CONF->{'timeout'});
+ if (defined ($token_value)) {
+ $t_timeout = $token_value;
if ($t_timeout !~ /^\d+$/ || $t_timeout < 1) {
error ("Invalid timeout for network operations.");
}
}
+ # Read verbose from config file
+ if (defined($CONF->{'verbose'})) {
+ if ($CONF->{'verbose'} eq "1") {
+ $t_log = 1;
+ } elsif ($CONF->{'verbose'} eq "2") {
+ $t_log = 1;
+ $t_log_hard = 1;
+ }
+ }
# Be verbose
if (defined ($opts{'v'})) {
$t_log = 1;
+ $t_log_hard = 0;
}
-
# Be verbose hard
if (defined ($opts{'V'})) {
$t_log = 1;
@@ -470,18 +503,21 @@ sub parse_options {
}
# SSL private key password
- if (defined ($opts{'w'})) {
+ $token_value = get_config_value($opts{'w'}, $CONF->{'ssl_password'}, 1);
+ if (defined ($token_value)) {
$t_ssl_pwd = ask_passwd ("Enter private key file password: ", "Enter private key file password again for confirmation: ");
}
# Server password
- if (defined ($opts{'x'})) {
- $t_pwd = $opts{'x'};
+ $token_value = get_config_value($opts{'x'}, $CONF->{'password'});
+ if (defined ($token_value)) {
+ $t_pwd = $token_value;
}
#Proxy IP address
- if (defined ($opts{'b'})) {
- $t_proxy_ip = $opts{'b'};
+ $token_value = get_config_value($opts{'b'}, $CONF->{'proxy_ip'});
+ if (defined ($token_value)) {
+ $t_proxy_ip = $token_value;
if ($t_proxy_ip !~ /^[a-zA-Z\.]+$/ && ($t_proxy_ip !~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
|| $1 < 0 || $1 > 255 || $2 < 0 || $2 > 255
|| $3 < 0 || $3 > 255 || $4 < 0 || $4 > 255) &&
@@ -491,15 +527,17 @@ sub parse_options {
}
# Proxy Port
- if (defined ($opts{'g'})) {
- $t_proxy_port = $opts{'g'};
+ $token_value = get_config_value($opts{'g'}, $CONF->{'proxy_port'});
+ if (defined ($token_value)) {
+ $t_proxy_port = $token_value;
if ($t_proxy_port !~ /^\d+$/ || $t_proxy_port < 1 || $t_proxy_port > 65535) {
error ("Proxy port $t_port is not valid.");
}
}
# TCP wrappers support
- if (defined ($opts{'T'})) {
+ $token_value = get_config_value($opts{'T'}, $CONF->{'use_libwrap'}, 1);
+ if (defined ($token_value)) {
if ($t_libwrap_installed) {
$t_use_libwrap = 1;
} else {
@@ -531,9 +569,76 @@ sub parse_options {
}
# Get the config file
- if (defined ($opts{'l'})) {
- $log_file = $opts{'l'};
+ $token_value = get_config_value($opts{'l'}, $CONF->{'log_file'});
+ if (defined ($token_value)) {
+ $log_file = $token_value;
}
+
+ # No command lines config values
+
+ # Get the block size
+ if (defined ($CONF->{'block_size'})) {
+ if ($t_port !~ /^\d+$/ || $t_port < 1) {
+ error ("Invalid block size: " . $CONF->{'block_size'} . ".");
+ }
+ $t_block_size = $CONF->{'block_size'};
+ }
+
+ # Configuration file invalid chars
+ if (defined ($CONF->{'invalid_chars'})) {
+ $t_invalid_chars = $CONF->{'invalid_chars'};
+ }
+}
+
+################################################################################
+## SUB parse_config_file
+## Get all options from a config file.
+################################################################################
+sub parse_config_file {
+ my ($config_file, $CONF) = @_;
+
+ # File should be writable
+ if (! -r $config_file) {
+ print "Configuration file $config_file is not readable.\n";
+ return;
+ }
+
+ # Open the file
+ my $FH;
+ if (! open ($FH, "< $config_file")) {
+ print "Cannot open configuration file $config_file.\n";
+ return;
+ }
+
+ # Read the file and only get the well formed lines
+ while (<$FH>) {
+ my $buffer_line = $_;
+ if ($buffer_line =~ /^[a-zA-Z]/){ # begins with letters
+ if ($buffer_line =~ m/([\w\-\_\.]+)\s+(.*)/){
+ $CONF->{$1} = $2 unless $2 eq "";
+ }
+ }
+ }
+
+ close ($FH);
+ return;
+}
+
+################################################################################
+## SUB parse_config_file
+## Search in command line options and config hash from configuration file
+## to get a value (command line is a priority)
+################################################################################
+sub get_config_value {
+ my ($cmd_value, $conf_value, $bool) = @_;
+ $bool = 0 unless defined($bool);
+
+ return $cmd_value if defined($cmd_value);
+ # The boolean type value is 1 or undef (0 should be translated like undefP)
+ if ($bool && defined($conf_value)) {
+ return undef if ($conf_value ne "1");
+ }
+ return $conf_value;
}
################################################################################
@@ -929,14 +1034,14 @@ sub recv_file {
# Check file name
if ($base_name =~ /[$t_invalid_chars]/) {
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " has an invalid file name");
- send_data ("SEND ERR\n");
+ send_data ("SEND ERR (invalid file name)\n");
return;
}
# Check file size, empty files are not allowed
if ($size < 1 || $size > $t_max_size) {
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " is too big");
- send_data ("SEND ERR\n");
+ send_data ("SEND ERR (file is too big)\n");
return;
}
@@ -946,7 +1051,7 @@ sub recv_file {
# Check if file exists
if (-f $file && $t_overwrite == 0) {
print_log ("File '$base_name' size ${size}b from " . $t_client_socket->sockhost () . " already exists");
- send_data ("SEND ERR\n");
+ send_data ("SEND ERR (file already exists)\n");
return;
}
@@ -979,7 +1084,7 @@ sub send_file {
# Check file name
if ($base_name =~ /[$t_invalid_chars]/) {
print_log ("Requested file '$base_name' from " . $t_client_socket->sockhost () . " has an invalid file name");
- send_data ("RECV ERR\n");
+ send_data ("RECV ERR (file has an invalid file name)\n");
return;
}
@@ -989,7 +1094,7 @@ sub send_file {
# Check if file exists
if (! -f $file) {
print_log ("Requested file '$file' from " . $t_client_socket->sockhost () . " does not exist");
- send_data ("RECV ERR\n");
+ send_data ("RECV ERR (file does not exist)\n");
return;
}
diff --git a/pandora_agents/shellscript/aix/pandora_agent.conf b/pandora_agents/shellscript/aix/pandora_agent.conf
index c95b70a58d..0d6558aa12 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.719, AIX version
+# Version 7.0NG.723, 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 ce6d91f8ab..7478d64f27 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.719
+# Version 7.0NG.723
# 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 483c8728bd..4f3694a530 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.719, HPUX Version
+# Version 7.0NG.723, HPUX Version
# General Parameters
# ==================
diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf
index b47b7b0ef2..374a998426 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.719
+# Version 7.0NG.723
# 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 993be45b74..3de4952d24 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.719
+# Version 7.0NG.723
# 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 0f703a7387..8cfc4f51aa 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.719
+# Version 7.0NG.723
# 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 c0439c7b96..d962b005e4 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.719, Solaris version
+# Version 7.0NG.723, Solaris version
# General Parameters
# ==================
diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf
index 0c7bbcef39..6fb838938d 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.719, AIX version
+# Version 7.0NG.723, AIX version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@@ -102,6 +102,9 @@ transfer_mode tentacle
# Agent mode: Learn (default), No-learn, Autodisable
# agent_mode autodisable
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
# Secondary server configuration
# ==============================
diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index cb9d4332f2..82567e4815 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.719-180302
+Version: 7.0NG.723-180530
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 39a79290f5..492bd7e87e 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.719-180302"
+pandora_version="7.0NG.723-180530"
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/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf
index 07a8fa36ce..2a03683bd8 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.719, GNU/Linux
+# Version 7.0NG.723, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2012 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@@ -143,6 +143,9 @@ transfer_mode tentacle
# Agent mode: Learn (default), No-learn, Autodisable
# agent_mode autodisable
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
# Secondary server configuration
# ==============================
diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf
index 40212d2098..c1eb8072e6 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.719, FreeBSD Version
+# Version 7.0NG.723, FreeBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2016 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@@ -153,6 +153,9 @@ xml_buffer 1
# Minimum available bytes in the temporal directory to enable the XML buffer
temporal_min_size 1024
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
#Secondary server configuration
#==============================
diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf
index 04c521b395..3cf05b23eb 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.719, HP-UX Version
+# Version 7.0NG.723, HP-UX Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@@ -104,6 +104,9 @@ transfer_mode tentacle
# Agent mode: Learn (default), No-learn, Autodisable
# agent_mode autodisable
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
# Secondary server configuration
# ==============================
diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf
index fda0d82f2d..607bdc9d3c 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.719, GNU/Linux
+# Version 7.0NG.723, GNU/Linux
# Licensed under GPL license v2,
# Copyright (c) 2003-2014 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@@ -167,6 +167,9 @@ temporal_min_size 1024
# the eHorus agent's identifying key
ehorus_conf /etc/ehorus/ehorus_agent.conf
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
# Secondary server configuration
# ==============================
diff --git a/pandora_agents/unix/NT4/pandora_agent.conf b/pandora_agents/unix/NT4/pandora_agent.conf
index de203fa85c..846ced852c 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.719, GNU/Linux
+# Version 7.0NG.723, 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 bca26835ce..d67e9bd6c3 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.719, NetBSD Version
+# Version 7.0NG.723, NetBSD Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2010 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@@ -116,6 +116,9 @@ transfer_mode tentacle
# Agent mode: Learn (default), No-learn, Autodisable
# agent_mode autodisable
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
# Secondary server configuration
# ==============================
diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf
index f7f6d4f192..b6197225dd 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.719, Solaris Version
+# Version 7.0NG.723, Solaris Version
# Licensed under GPL license v2,
# Copyright (c) 2003-2009 Artica Soluciones Tecnologicas
# http://www.pandorafms.com
@@ -107,6 +107,9 @@ transfer_mode tentacle
# Agent mode: Learn (default), No-learn, Autodisable
# agent_mode autodisable
+# Secondary groups. You can select several groups separated by comma.
+# secondary_groups Group1,Group2
+
# Secondary server configuration
# ==============================
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index 41fe2e3152..0ea0e01bd1 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -41,8 +41,8 @@ my $Sem = undef;
# Semaphore used to control the number of threads
my $ThreadSem = undef;
-use constant AGENT_VERSION => '7.0NG.719';
-use constant AGENT_BUILD => '180302';
+use constant AGENT_VERSION => '7.0NG.723';
+use constant AGENT_BUILD => '180530';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
@@ -3065,7 +3065,11 @@ while (1) {
if (defined ($Conf{'parent_agent_name'})) {
$xml_header .= "' parent_agent_name='" .$Conf{'parent_agent_name'};
}
-
+
+ if (defined ($Conf{'secondary_groups'})) {
+ $xml_header .= "' secondary_groups='" .$Conf{'secondary_groups'};
+ }
+
if (defined ($Conf{'agent_mode'})) {
if ($Conf{'agent_mode'} =~ m/no.?learn/ig) {
$xml_header .= "' agent_mode='0";
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 59a33164ce..6f080ae29c 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.719
-%define release 180302
+%define version 7.0NG.723
+%define release 180530
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 d2f6d674aa..34bf115ae1 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.719
-%define release 180302
+%define version 7.0NG.723
+%define release 180530
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 375238a319..f58de6f228 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.719"
-PI_BUILD="180302"
+PI_VERSION="7.0NG.723"
+PI_BUILD="180530"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/unix/plugins/grep_log_module b/pandora_agents/unix/plugins/grep_log_module
index 0769128cbd..6fc1cff239 100755
--- a/pandora_agents/unix/plugins/grep_log_module
+++ b/pandora_agents/unix/plugins/grep_log_module
@@ -215,6 +215,7 @@ sub print_log (@) {
$output .= "