Merge remote-tracking branch 'origin/develop' into ent-2441-despliegue-de-agentes-desde-pandora
This commit is contained in:
commit
755b0bbf7d
|
@ -0,0 +1,49 @@
|
||||||
|
FROM centos:centos7
|
||||||
|
MAINTAINER Pandora FMS Team <info@pandorafms.com>
|
||||||
|
|
||||||
|
# Add Pandora FMS agent installer
|
||||||
|
ADD unix /tmp/pandora_agent/unix
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN yum -y install \
|
||||||
|
epel-release \
|
||||||
|
unzip \
|
||||||
|
perl \
|
||||||
|
sed \
|
||||||
|
"perl(Sys::Syslog)"
|
||||||
|
|
||||||
|
# Install Pandora FMS agent
|
||||||
|
RUN cd /tmp/pandora_agent/unix \
|
||||||
|
&& ./pandora_agent_installer --install
|
||||||
|
|
||||||
|
# Set default variables
|
||||||
|
ENV SERVER_IP '127.0.0.1'
|
||||||
|
ENV REMOTE_CONFIG '0'
|
||||||
|
ENV GROUP 'Servers'
|
||||||
|
ENV DEBUG '0'
|
||||||
|
ENV AGENT_NAME 'agent_docker'
|
||||||
|
ENV AGENT_ALIAS 'agent_docker'
|
||||||
|
ENV TIMEZONE 'UTC'
|
||||||
|
ENV SECONDARY_GROUPS ''
|
||||||
|
|
||||||
|
# Create the entrypoint script.
|
||||||
|
RUN echo -e '#/bin/bash\n \
|
||||||
|
sed -i "s/^server_ip.*$/server_ip $SERVER_IP/g" /etc/pandora/pandora_agent.conf\n \
|
||||||
|
sed -i "s/^remote_config.*$/remote_config $REMOTE_CONFIG/g" /etc/pandora/pandora_agent.conf\n \
|
||||||
|
sed -i "s/^group.*$/group $GROUP/g" /etc/pandora/pandora_agent.conf\n \
|
||||||
|
sed -i "s/^debug.*$/debug $DEBUG/g" /etc/pandora/pandora_agent.conf\n \
|
||||||
|
sed -i "s/^#agent_name.*$/agent_name $AGENT_NAME/g" /etc/pandora/pandora_agent.conf\n \
|
||||||
|
sed -i "s/^#agent_alias.*$/agent_alias $AGENT_ALIAS/g" /etc/pandora/pandora_agent.conf\n \
|
||||||
|
sed -i "s/^# secondary_groups.*$/secondary_groups $SECONDARY_GROUPS/g" /etc/pandora/pandora_agent.conf\n \
|
||||||
|
if [ $TIMEZONE != "" ]; then\n \
|
||||||
|
\tln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime\n \
|
||||||
|
fi\n \
|
||||||
|
/etc/init.d/pandora_agent_daemon start\n \
|
||||||
|
rm -f $0\n \
|
||||||
|
bash' \
|
||||||
|
>> /entrypoint.sh && \
|
||||||
|
chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
# Entrypoint + CMD
|
||||||
|
ENTRYPOINT ["bash"]
|
||||||
|
CMD ["/entrypoint.sh"]
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
source /root/code/pandorafms/extras/build_vars.sh
|
||||||
|
|
||||||
|
# Set tag for docker build
|
||||||
|
if [ "$1" == "nightly" ]; then
|
||||||
|
LOCAL_VERSION="latest"
|
||||||
|
else
|
||||||
|
LOCAL_VERSION=$VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build image with code
|
||||||
|
docker build --rm=true --pull --no-cache -t pandorafms/pandorafms-agent:$LOCAL_VERSION -f $CODEHOME/pandora_agents/Dockerfile $CODEHOME/pandora_agents/
|
||||||
|
|
||||||
|
# Push image
|
||||||
|
docker push pandorafms/pandorafms-agent:$LOCAL_VERSION
|
||||||
|
|
||||||
|
# Delete local image
|
||||||
|
docker image rm -f pandorafms/pandorafms-agent:$LOCAL_VERSION
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-agent-unix
|
package: pandorafms-agent-unix
|
||||||
Version: 7.0NG.736-190726
|
Version: 7.0NG.736-190730
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.736-190726"
|
pandora_version="7.0NG.736-190730"
|
||||||
|
|
||||||
echo "Test if you has the tools for to make the packages."
|
echo "Test if you has the tools for to make the packages."
|
||||||
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
|
||||||
|
|
|
@ -42,7 +42,7 @@ my $Sem = undef;
|
||||||
my $ThreadSem = undef;
|
my $ThreadSem = undef;
|
||||||
|
|
||||||
use constant AGENT_VERSION => '7.0NG.736';
|
use constant AGENT_VERSION => '7.0NG.736';
|
||||||
use constant AGENT_BUILD => '190726';
|
use constant AGENT_BUILD => '190730';
|
||||||
|
|
||||||
# Agent log default file size maximum and instances
|
# Agent log default file size maximum and instances
|
||||||
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
use constant DEFAULT_MAX_LOG_SIZE => 600000;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.736
|
%define version 7.0NG.736
|
||||||
%define release 190726
|
%define release 190730
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_agent_unix
|
%define name pandorafms_agent_unix
|
||||||
%define version 7.0NG.736
|
%define version 7.0NG.736
|
||||||
%define release 190726
|
%define release 190730
|
||||||
|
|
||||||
Summary: Pandora FMS Linux agent, PERL version
|
Summary: Pandora FMS Linux agent, PERL version
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.736"
|
PI_VERSION="7.0NG.736"
|
||||||
PI_BUILD="190726"
|
PI_BUILD="190730"
|
||||||
OS_NAME=`uname -s`
|
OS_NAME=`uname -s`
|
||||||
|
|
||||||
FORCE=0
|
FORCE=0
|
||||||
|
|
|
@ -186,7 +186,7 @@ UpgradeApplicationID
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Version
|
Version
|
||||||
{190726}
|
{190730}
|
||||||
|
|
||||||
ViewReadme
|
ViewReadme
|
||||||
{Yes}
|
{Yes}
|
||||||
|
|
|
@ -30,7 +30,7 @@ using namespace Pandora;
|
||||||
using namespace Pandora_Strutils;
|
using namespace Pandora_Strutils;
|
||||||
|
|
||||||
#define PATH_SIZE _MAX_PATH+1
|
#define PATH_SIZE _MAX_PATH+1
|
||||||
#define PANDORA_VERSION ("7.0NG.736(Build 190726)")
|
#define PANDORA_VERSION ("7.0NG.736(Build 190730)")
|
||||||
|
|
||||||
string pandora_path;
|
string pandora_path;
|
||||||
string pandora_dir;
|
string pandora_dir;
|
||||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
||||||
VALUE "LegalCopyright", "Artica ST"
|
VALUE "LegalCopyright", "Artica ST"
|
||||||
VALUE "OriginalFilename", "PandoraAgent.exe"
|
VALUE "OriginalFilename", "PandoraAgent.exe"
|
||||||
VALUE "ProductName", "Pandora FMS Windows Agent"
|
VALUE "ProductName", "Pandora FMS Windows Agent"
|
||||||
VALUE "ProductVersion", "(7.0NG.736(Build 190726))"
|
VALUE "ProductVersion", "(7.0NG.736(Build 190730))"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-console
|
package: pandorafms-console
|
||||||
Version: 7.0NG.736-190726
|
Version: 7.0NG.736-190730
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.736-190726"
|
pandora_version="7.0NG.736-190730"
|
||||||
|
|
||||||
package_pear=0
|
package_pear=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
/**
|
/**
|
||||||
* Pandora build version and version
|
* Pandora build version and version
|
||||||
*/
|
*/
|
||||||
$build_version = 'PC190726';
|
$build_version = 'PC190730';
|
||||||
$pandora_version = 'v7.0NG.736';
|
$pandora_version = 'v7.0NG.736';
|
||||||
|
|
||||||
// Do not overwrite default timezone set if defined.
|
// Do not overwrite default timezone set if defined.
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
<div style='height: 10px'>
|
<div style='height: 10px'>
|
||||||
<?php
|
<?php
|
||||||
$version = '7.0NG.736';
|
$version = '7.0NG.736';
|
||||||
$build = '190726';
|
$build = '190730';
|
||||||
$banner = "v$version Build $build";
|
$banner = "v$version Build $build";
|
||||||
|
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.736
|
%define version 7.0NG.736
|
||||||
%define release 190726
|
%define release 190730
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.736
|
%define version 7.0NG.736
|
||||||
%define release 190726
|
%define release 190730
|
||||||
|
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_console
|
%define name pandorafms_console
|
||||||
%define version 7.0NG.736
|
%define version 7.0NG.736
|
||||||
%define release 190726
|
%define release 190730
|
||||||
%define httpd_name httpd
|
%define httpd_name httpd
|
||||||
# User and Group under which Apache is running
|
# User and Group under which Apache is running
|
||||||
%define httpd_name apache2
|
%define httpd_name apache2
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package: pandorafms-server
|
package: pandorafms-server
|
||||||
Version: 7.0NG.736-190726
|
Version: 7.0NG.736-190730
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: admin
|
Section: admin
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
pandora_version="7.0NG.736-190726"
|
pandora_version="7.0NG.736-190730"
|
||||||
|
|
||||||
package_cpan=0
|
package_cpan=0
|
||||||
package_pandora=1
|
package_pandora=1
|
||||||
|
|
|
@ -45,7 +45,7 @@ our @EXPORT = qw(
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.736";
|
my $pandora_version = "7.0NG.736";
|
||||||
my $pandora_build = "190726";
|
my $pandora_build = "190730";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
# Setup hash
|
# Setup hash
|
||||||
|
|
|
@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.736";
|
my $pandora_version = "7.0NG.736";
|
||||||
my $pandora_build = "190726";
|
my $pandora_build = "190730";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.736
|
%define version 7.0NG.736
|
||||||
%define release 190726
|
%define release 190730
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
%define name pandorafms_server
|
%define name pandorafms_server
|
||||||
%define version 7.0NG.736
|
%define version 7.0NG.736
|
||||||
%define release 190726
|
%define release 190730
|
||||||
|
|
||||||
Summary: Pandora FMS Server
|
Summary: Pandora FMS Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# **********************************************************************
|
# **********************************************************************
|
||||||
|
|
||||||
PI_VERSION="7.0NG.736"
|
PI_VERSION="7.0NG.736"
|
||||||
PI_BUILD="190726"
|
PI_BUILD="190730"
|
||||||
|
|
||||||
MODE=$1
|
MODE=$1
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
|
|
|
@ -34,7 +34,7 @@ use PandoraFMS::Config;
|
||||||
use PandoraFMS::DB;
|
use PandoraFMS::DB;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.736 PS190726";
|
my $version = "7.0NG.736 PS190730";
|
||||||
|
|
||||||
# Pandora server configuration
|
# Pandora server configuration
|
||||||
my %conf;
|
my %conf;
|
||||||
|
|
|
@ -36,7 +36,7 @@ use Encode::Locale;
|
||||||
Encode::Locale::decode_argv;
|
Encode::Locale::decode_argv;
|
||||||
|
|
||||||
# version: define current version
|
# version: define current version
|
||||||
my $version = "7.0NG.736 PS190726";
|
my $version = "7.0NG.736 PS190730";
|
||||||
|
|
||||||
# save program name for logging
|
# save program name for logging
|
||||||
my $progname = basename($0);
|
my $progname = basename($0);
|
||||||
|
|
Loading…
Reference in New Issue