diff --git a/extras/docker/centos8/README.MD b/extras/docker/centos8/README.MD new file mode 100644 index 0000000000..0c5dc9a2a1 --- /dev/null +++ b/extras/docker/centos8/README.MD @@ -0,0 +1,145 @@ +![Image of Pandora FMS](https://pandorafms.org/wp-content/uploads/2016/06/logo_pandora_community.png) + + +Pandora FMS is a __monitoring solution__ that provides unparalleled flexibility for IT to address both immediate and unforeseen operational issues, including infrastructure and IT processes. + +It uniquely enables business and IT to adapt to changing needs through a flexible and rapid approach to IT and business deployment. + +For community support you can visit our forums at [forums.pandorafms.org](http://forums.pandorafms.org). Check out our community website at [pandorafms.org](http://pandorafms.org), and if you need sales information or/and professional support, visit [pandorafms.com](http://pandorafms.com). + +# Pandora FMS full stack based on Centos 8 + +## Try it + +You can try it on a cloud env for 4 hours using play with docker just click in the icon bellow, wait for the pulling image and the containers will be up and running automatically + +If you want to open the console just click on the port 8080 on the upside and will be redirected to the pandora consola. + +[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/rafaelameijeiras/PandoraFMS/master/pandorafms_community/docker-compose-official.yml) + + +https://www.youtube.com/watch?v=Hw2P6hHQpeI + +Note: could take a couple of minutes for the console to be ready so if you click in the 8080 port and nothing and have a blank page wait a little and reload the page + +## Usage +``` +docker run --name Pandora_new %container_name% --rm \ +-p %local_httpd_port%:80 \ +-p %local_tentacle_port%:41121 \ +-e DBHOST=%Mysql_Server_IP% \ +-e DBNAME=%database_name% \ +-e DBUSER=%Mysql_user% \ +-e DBPASS=%Mysql_pass% \ +-e DBPORT=%Mysql_port% \ +-e INSTANCE_NAME=%server name% \ +-ti pandorafms-open-stack-el8 +``` +Example: +``` +docker run --name Pandora_new --rm \ +-p 8081:80 \ +-p 41125:41121 \ +-e DBHOST=192.168.80.45 \ +-e DBNAME=pandora_demos_1 \ +-e DBUSER=pandora \ +-e DBPASS=pandora \ +-e DBPORT=3306 \ +-e INSTANCE_NAME=pandora201 \ +-ti pandorafms-open-stack-el8 +``` + +### Integrated database for PandoraFMS container +There is a preconfigured database image in this repo to connect the Pandora environment so you can up the database and then point the pandora container to the database. + +Example: +``` +docker run --name Pandora_DB \ +-p 3306:3306 \ +-e MYSQL_ROOT_PASSWORD=pandora \ +-e MYSQL_DATABASE=pandora \ +-e MYSQL_USER=pandora \ +-e MYSQL_PASSWORD=pandora \ +-d pandorafms/pandorafms-percona-base +``` + +This creates a Percona mysql docker and a database called Pandora with grants to the pandora user (optional) and the credentials for root user. + +In this example we expose the 3306 for database connection. + +Using this configuration (getting the container ip from DB container ip) you can execute the next container Pandora pointing to it: + +``` +docker run --name Pandora_new --rm \ +-p 8081:80 \ +-p 41125:41121 \ +-e DBHOST= \ +-e DBNAME=pandora \ +-e DBUSER=pandora \ +-e DBPASS=pandora \ +-e DBPORT=3306 \ +-e INSTANCE_NAME=pandora_inst \ +-ti pandorafms/pandorafms-open-stack-el8 +``` + +### Docker Compose Stack + +if you want to run an easy to deploy stack you may use the docker-compose.yml file + +``` +version: '3.1' +services: + db: + image: pandorafms/pandorafms-percona-base + restart: always + #command: ["mysqld", "--innodb-buffer-pool-size=900M"] + environment: + MYSQL_ROOT_PASSWORD: pandora + MYSQL_DATABASE: pandora + MYSQL_USER: pandora + MYSQL_PASSWORD: pandora + networks: + - pandora + + pandora: + image: pandorafms/pandorafms-open-stack-el8:latest + restart: always + depends_on: + - db + environment: + MYSQL_ROOT_PASSWORD: pandora + DBHOST: db + DBNAME: pandora + DBUSER: pandora + DBPASS: pandora + DBPORT: 3306 + INSTANCE_NAME: pandora01 + PUBLICURL: "" + SLEEP: 5 + RETRIES: 10 + networks: + - pandora + ports: + - "8080:80" + - "41121:41121" + - "162:162/udp" + - "9995:9995/udp" +networks: + pandora: +``` +just by running: `docker-compose -f up` + +## Important Parameters: + +* __INSTANCE_NAME__: Pandora Server name +* __DBHOST__: DB host IP to MySQL engine +* __DBNAME__: The name of the database. If your user have enough permissions to create databases, the container will create it in case automatically if didn't exist +* __DBUSER__: The user to connect MySQL engine. +* __DBPASS__: User password to connect MySQL engine. +* __DBPORT__: The port to connect MySQL engine. by default 33306 +* __PUBLICURL__: Define a public URL. Useful when Pandora is used behind a reverse proxy +* __SLEEP__: Time to wait between retries +* __RETRIES__: How many times Pandora will try to connect to MySQL engine before fail. + +Note1: the SLEEP and RETRIES variables will be used to wait for database container to fully start, if you are in a slower system maybe you will need to increase these variables values, in this example will wait 5 seconds for the database container to be up and retries 3 times. + diff --git a/extras/docker/centos8/base/Dockerfile b/extras/docker/centos8/base/Dockerfile new file mode 100644 index 0000000000..285f2f7ef8 --- /dev/null +++ b/extras/docker/centos8/base/Dockerfile @@ -0,0 +1,257 @@ +#docker build -t pandorafms/pandorafms-open-base-el8 -f $HOME/code/pandorafms/extras/docker/centos8/base/Dockerfile $HOME/code/pandorafms/extras/docker/centos8/base/ +#docker push pandorafms/pandorafms-open-base-el8 + +FROM centos:8 + +RUN dnf install -y --setopt=tsflags=nodocs \ + epel-release \ + dnf-utils \ + http://rpms.remirepo.net/enterprise/remi-release-8.rpm + +RUN dnf module reset -y php && dnf module install -y php:remi-7.3 +RUN dnf config-manager --set-enabled PowerTools + +# Install console +RUN dnf install -y --setopt=tsflags=nodocs \ + php \ + php-mcrypt \php-cli \ + php-gd \ + php-curl \ + php-session \ + php-mysqlnd \ + php-ldap \ + php-zip \ + php-zlib \ + php-fileinfo \ + php-gettext \ + php-snmp \ + php-mbstring \ + php-pecl-zip \ + php-xmlrpc \ + libxslt \ + wget \ + php-xml \ + httpd \ + mod_php \ + atk \ + avahi-libs \ + cairo \ + cups-libs \ + fribidi \ + gd \ + gdk-pixbuf2 \ + ghostscript \ + graphite2 \ + graphviz \ + gtk2 \ + harfbuzz \ + hicolor-icon-theme \ + hwdata \ + jasper-libs \ + lcms2 \ + libICE \ + libSM \ + libXaw \ + libXcomposite \ + libXcursor \ + libXdamage \ + libXext \ + libXfixes \ + libXft \ + libXi \ + libXinerama \ + libXmu \ + libXrandr \ + libXrender \ + libXt \ + libXxf86vm \ + libcroco \ + libdrm \ + libfontenc \ + libglvnd \ + libglvnd-egl \ + libglvnd-glx \ + libpciaccess \ + librsvg2 \ + libthai \ + libtool-ltdl \ + libwayland-client \ + libwayland-server \ + libxshmfence \ + mesa-libEGL \ + mesa-libGL \ + mesa-libgbm \ + mesa-libglapi \ + pango \ + pixman \ + nfdump \ + xorg-x11-fonts-75dpi \ + xorg-x11-fonts-misc \ + poppler-data \ + php-yaml; yum clean all + +RUN mkdir -p /run/php-fpm/ ; chown -R root:apache /run/php-fpm/ +# not installed perl-Net-Telnet gtk-update-icon-cach ghostscript-fonts + +# Install server + +RUN dnf install -y --setopt=tsflags=nodocs \ + GeoIP \ + GeoIP-GeoLite-data \ + dwz \ + efi-srpm-macros \ + ghc-srpm-macros \ + go-srpm-macros \ + ocaml-srpm-macros \ + openblas-srpm-macros \ + perl \ + perl-Algorithm-Diff \ + perl-Archive-Tar \ + perl-Archive-Zip \ + perl-Attribute-Handlers \ + perl-B-Debug \ + perl-CPAN \ + perl-CPAN-Meta \ + perl-CPAN-Meta-Requirements \ + perl-CPAN-Meta-YAML \ + perl-Compress-Bzip2 \ + perl-Config-Perl-V \ + perl-DBD-MySQL \ + perl-DBI \ + perl-DB_File \ + perl-Data-Dump \ + perl-Data-OptList \ + perl-Data-Section \ + perl-Devel-PPPort \ + perl-Devel-Peek \ + perl-Devel-SelfStubber \ + perl-Devel-Size \ + perl-Digest-HMAC \ + perl-Digest-SHA \ + perl-Encode-Locale \ + perl-Encode-devel \ + perl-Env \ + perl-ExtUtils-CBuilder \ + perl-ExtUtils-Command \ + perl-ExtUtils-Embed \ + perl-ExtUtils-Install \ + perl-ExtUtils-MM-Utils \ + perl-ExtUtils-MakeMaker \ + perl-ExtUtils-Manifest \ + perl-ExtUtils-Miniperl \ + perl-ExtUtils-ParseXS \ + perl-File-Fetch \ + perl-File-HomeDir \ + perl-File-Listing \ + perl-File-Which \ + perl-Filter \ + perl-Filter-Simple \ + perl-Geo-IP \ + perl-HTML-Parser \ + perl-HTML-Tagset \ + perl-HTML-Tree \ + perl-HTTP-Cookies \ + perl-HTTP-Date \ + perl-HTTP-Message \ + perl-HTTP-Negotiate \ + perl-IO-HTML \ + perl-IO-Socket-INET6 \ + perl-IO-Zlib \ + perl-IO-stringy \ + perl-IPC-Cmd \ + perl-IPC-SysV \ + perl-IPC-System-Simple \ + perl-JSON \ + perl-JSON-PP \ + perl-LWP-MediaTypes \ + perl-Locale-Codes \ + perl-Locale-Maketext \ + perl-Locale-Maketext-Simple \ + perl-MRO-Compat \ + perl-Math-BigInt \ + perl-Math-BigInt-FastCalc \ + perl-Math-BigRat \ + perl-Memoize \ + perl-Module-Build \ + perl-Module-CoreList \ + perl-Module-CoreList-tools \ + perl-Module-Load \ + perl-Module-Load-Conditional \ + perl-Module-Loaded \ + perl-Module-Metadata \ + perl-NTLM \ + perl-Net-HTTP \ + perl-Net-Ping \ + perl-NetAddr-IP \ + perl-Package-Generator \ + perl-Params-Check \ + perl-Params-Util \ + perl-Perl-OSType \ + perl-PerlIO-via-QuotedPrint \ + perl-Pod-Checker \ + perl-Pod-Html \ + perl-Pod-Parser \ + perl-SelfLoader \ + perl-Socket6 \ + perl-Software-License \ + perl-Sub-Exporter \ + perl-Sub-Install \ + perl-Sys-Syslog \ + perl-Test \ + perl-Test-Harness \ + perl-Test-Simple \ + perl-Text-Balanced \ + perl-Text-Diff \ + perl-Text-Glob \ + perl-Text-Template \ + perl-Thread-Queue \ + perl-Time-Piece \ + perl-TimeDate \ + perl-Try-Tiny \ + perl-Unicode-Collate \ + perl-WWW-RobotRules \ + perl-XML-NamespaceSupport \ + perl-XML-Parser \ + perl-XML-SAX \ + perl-XML-SAX-Base \ + perl-XML-Simple \ + perl-XML-Twig \ + perl-autodie \ + perl-bignum \ + perl-devel \ + perl-encoding \ + perl-experimental \ + perl-inc-latest \ + perl-libnetcfg \ + perl-libwww-perl \ + perl-local-lib \ + perl-open \ + perl-perlfaq \ + perl-srpm-macros \ + perl-utils \ + perl-version \ + python-srpm-macros \ + python3-pyparsing \ + python3-rpm-macros \ + qt5-srpm-macros \ + redhat-rpm-config \ + rust-srpm-macros \ + systemtap-sdt-devel \ + perl-TermReadKey \ + perl \ + perl-DBD-MySQL \ + perl-DBI \ + initscripts \ + net-tools \ + nmap-ncat \ + nmap \ + net-snmp-utils \ + sudo \ + http://firefly.artica.es/centos8/perl-Net-Telnet-3.04-1.el8.noarch.rpm \ + http://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/wmi-1.3.14-4.el7.art.x86_64.rpm + + +RUN dnf install -y supervisor crontabs mysql http://firefly.artica.es/centos8/phantomjs-2.1.1-1.el7.x86_64.rpm --setopt=tsflags=nodocs + + +EXPOSE 80 443 41121 162/udp diff --git a/extras/docker/centos8/build_image_el8.sh b/extras/docker/centos8/build_image_el8.sh new file mode 100755 index 0000000000..00c50f6ff2 --- /dev/null +++ b/extras/docker/centos8/build_image_el8.sh @@ -0,0 +1,112 @@ +#!/bin/bash + +VERSION=$1 +ENT="$HOME/code/pandora_enterprise" +OPEN="$HOME/code/pandorafms" +OS="Centos" +ARCH="x86_64" +EL="el7" +EXT="demo" +TARGET_URL="http://atlantis.artica.es" +DOCKER_PATH="$OPEN/extras/docker/centos8/" +OSTACK_IMAGE="pandorafms/pandorafms-open-stack-el8" +OBASE_IMAGE="pandorafms/pandorafms-open-base-el8" +PERCONA_IMAGE="pandorafms/pandorafms-percona-base" + + +function help { + echo "To excute the builder you must declare 4 parameters: the version image, upload (push) tokens, build base (rebuild centos base image), build percona (rebuild percona base image)" + echo "" + echo "$0 [ ] [] []" + echo "Ex creates a local image from 749 packages : $0 749 0 1 1" +} + +if [ "$1" == "" ] || [ "$1" == "-h" ] ; then + help + exit +fi + +if [ "$2" == "1" ]; then + UPDATE="1" +fi + +if [ "$3" == "1" ]; then + BASEBUILD="1" +fi + +if [ "$4" == "1" ]; then + DBBUILD="1" +fi + +#Defining packages urls + +oconsoleurl=$TARGET_URL/Releases/7.0NG.$VERSION/$OS/noarch/pandorafms_console-7.0NG.$VERSION.noarch.rpm +oserverurl=$TARGET_URL/Releases/7.0NG.$VERSION/$OS/noarch/pandorafms_server-7.0NG.$VERSION.noarch.rpm +url=$(curl -I -s $TARGET_URL/Releases/7.0NG.$VERSION/ 2> /dev/null | grep "200 OK" | wc -l) + +# log in into docker acount to acces private repo. + +# docker login -u $DOCKERUSER -p$DOCKERPASS + +Check athlantis is reachable +if [ "$url" -lt 1 ] ; then + echo "$url Athlantis unreachable ..." + exit +fi + +echo "Start" +# Removing old packages +cd $DOCKER_PATH/pandora-stack/sources +rm -rf ./pandorafms_* + +# Downloading new packages +wget $oconsoleurl +wget $oserverurl + +if [ "$BASEBUILD" == 1 ] ; then + # Open Base image + echo "building Base el8 image" + cd $DOCKER_PATH/base + docker build -t $OBASE_IMAGE:$VERSION -f $DOCKER_PATH/base/Dockerfile $DOCKER_PATH/base + echo "Taging Open stack el8 latest image before upload" + docker tag $OBASE_IMAGE:$VERSION $OBASE_IMAGE:latest + echo -e ">>>> \n" +fi + +if [ "$DBBUILD" == 1 ] ; then + # Percona image + echo "building Percona image" + cd $OPEN/extras/docker/percona + docker build -t $PERCONA_IMAGE:latest -f $OPEN/extras/docker/percona/Dockerfile $OPEN/extras/docker/percona + echo -e ">>>> \n" +fi + +#Open Stack image +echo "building Open el8 image" +cd $DOCKER_PATH/pandora-stack +docker build -t $OSTACK_IMAGE:$VERSION -f $DOCKER_PATH/pandora-stack/Dockerfile $DOCKER_PATH/pandora-stack +echo "Taging Open base latest image before upload" +docker tag $OSTACK_IMAGE:$VERSION $OSTACK_IMAGE:latest +echo -e ">>>> \n" + +# Upload images + +if [ "$UPDATE" == 1 ] ; then + if [ "$BASEBUILD" == 1 ] ; then + #Open base Images + echo "Uploading Open $OBASE_IMAGE:$VERSION . . ." + docker push $OBASE_IMAGE:$VERSION + docker push $OBASE_IMAGE:latest + fi + + if [ "$DBBUILD" == 1 ] ; then + #Open base Images + echo "Uploading percona $PERCONA_IMAGE:latest . . ." + docker push $PERCONA_IMAGE:latest + fi + + #Open Stack Images + echo "Uploading Open $OSTACK_IMAGE:$VERSION . . ." + docker push $OSTACK_IMAGE:$VERSION + docker push $OSTACK_IMAGE:latest +fi diff --git a/extras/docker/centos8/docker-compose.yml b/extras/docker/centos8/docker-compose.yml new file mode 100644 index 0000000000..5ac5385133 --- /dev/null +++ b/extras/docker/centos8/docker-compose.yml @@ -0,0 +1,43 @@ +# Use root/example as user/password credentials +# este compose incluye la base de datos en otro docker y levanta aplicacion y DB juntos +version: '3.1' + +services: + + db: + image: pandorafms/pandorafms-percona-base + restart: always + #command: ["mysqld", "--innodb-buffer-pool-size=900M"] + environment: + MYSQL_ROOT_PASSWORD: pandora + MYSQL_DATABASE: pandora + MYSQL_USER: pandora + MYSQL_PASSWORD: pandora + networks: + - pandora + + pandora: + image: pandorafms/pandorafms-open-stack-el8:latest + restart: always + depends_on: + - db + environment: + MYSQL_ROOT_PASSWORD: pandora + DBHOST: db + DBNAME: pandora + DBUSER: pandora + DBPASS: pandora + DBPORT: 3306 + INSTANCE_NAME: pandora01 + PUBLICURL: "" + SLEEP: 5 + RETRIES: 10 + networks: + - pandora + ports: + - "8080:80" + - "41121:41121" + - "162:162/udp" + - "9995:9995/udp" +networks: + pandora: diff --git a/extras/docker/centos8/pandora-stack/Dockerfile b/extras/docker/centos8/pandora-stack/Dockerfile new file mode 100644 index 0000000000..59728b37d6 --- /dev/null +++ b/extras/docker/centos8/pandora-stack/Dockerfile @@ -0,0 +1,24 @@ +#docker build -t pandorafms/pandorafms-open-stack-el8:$VERSION -f $HOME/code/pandorafms/extras/docker/centos8/pandora-stack/Dockerfile $HOME/code/pandorafms/extras/docker/centos8/pandora-stack/ + +FROM pandorafms/pandorafms-open-base-el8 + +ENV DBNAME=pandora +ENV DBUSER=pandora +ENV DBPASS=pandora +ENV DBHOST=pandora +ENV DBPORT=3306 +ENV SLEEP=5 +ENV RETRIES=1 +ENV OPEN=1 + +ENV LC_ALL=C + +RUN rm -rf /etc/localtime ; ln -s /usr/share/zoneinfo/Europe/Madrid /etc/localtime + +COPY ./sources /opt/pandora +# Install the Pandora console +RUN dnf install -y /opt/pandora/pandorafms_console-*.rpm /opt/pandora/pandorafms_server-*.rpm ; yum clean all + +EXPOSE 80 443 41121 162/udp 9995/udp + +CMD sh /opt/pandora/init_pandora.sh diff --git a/extras/docker/centos8/pandora-stack/sources/.gitignore b/extras/docker/centos8/pandora-stack/sources/.gitignore new file mode 100644 index 0000000000..9e870cb2e3 --- /dev/null +++ b/extras/docker/centos8/pandora-stack/sources/.gitignore @@ -0,0 +1,5 @@ +# exclude packages +demos/ +*.tar* +*.rpm +phantomjs diff --git a/extras/docker/centos8/pandora-stack/sources/init_pandora.sh b/extras/docker/centos8/pandora-stack/sources/init_pandora.sh new file mode 100755 index 0000000000..56424e6cb9 --- /dev/null +++ b/extras/docker/centos8/pandora-stack/sources/init_pandora.sh @@ -0,0 +1,336 @@ +#!/bin/bash +# +# Prepares environment and launchs Pandora FMS +# +# Global vars +# +PANDORA_CONSOLE=/var/www/html/pandora_console +PANDORA_SERVER_CONF=/etc/pandora/pandora_server.conf +PANDORA_SERVER_BIN=/usr/bin/pandora_server +PANDORA_HA_BIN=/usr/bin/pandora_ha +PANDORA_TABLES_MIN=160 +# +# Check database +# +function db_check { + # Check DB + echo -n ">> Checking dbengine connection: " + + for i in `seq $RETRIES`; do + r=`echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A` + if [ $? -ne 0 ]; then + echo -n "retriying DB conection in $SLEEP seconds: " + sleep $SLEEP + else + break + fi + done + + r=`echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A` + if [ $? -eq 0 ]; then + echo "OK" + echo -n ">> Checking database connection: " + r=`echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME` + if [ $? -eq 0 ]; then + echo "OK" + return 0 + fi + echo -n ">> Cannot connect to $DBNAME, trying to create: " + r=`echo "create database $DBNAME" | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST` + if [ $? -eq 0 ]; then + echo "OK" + return 0 + fi + echo "Cannot create database $DBNAME on $DBUSER@$DBHOST:$DBPORT" + + return 1 + fi + + if [ "$DEBUG" == "1" ]; then + echo "Command: [echo 'select 1' | mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME]" + echo "Output: [$r]" + + traceroute $DBHOST + nmap $DBHOST -v -v -p $DBPORT + fi + + + return 1 +} + +# Load database +# +function db_load { + # Load DB + echo -n ">> Checking database state:" + r=`mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME -s -e 'show tables'| wc -l` + if [ "$DEBUG" == "1" ]; then + echo "Command: [mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST -A $DBNAME -s -e 'show tables'| wc -l]" + echo "Output: [$r]" + fi + + if [ "$r" -ge "$PANDORA_TABLES_MIN" ]; then + echo 'OK. Already exists, '$r' tables detected' + return 0 + fi + echo 'Empty database detected'; + + # Needs to be loaded. + echo -n "- Loading database schema: " + r=`mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb.sql` + if [ $? -ne 0 ]; then + echo "mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb.sql" + echo "ERROR" + echo "$r" + return 1; + fi + echo "OK" + + echo -n "- Loading database data: " + r=`mysql -u$DBUSER -p$DBPASS -P$DBPORT -h$DBHOST $DBNAME < $PANDORA_CONSOLE/pandoradb_data.sql` + if [ $? -ne 0 ]; then + echo "ERROR" + echo $r + return 2; + fi + echo "OK" + + # Loaded. + return 0 +} + +# +# Prepare & start Pandora FMS Console +# +function console_prepare { + CONSOLE_PATH=/var/www/html/pandora_console + + echo ">> Preparing console" + # Delete install and license files. + mv $CONSOLE_PATH/install.php $CONSOLE_PATH/install.done + rm -f $CONSOLE_PATH/enterprise/PandoraFMS_Enteprise_Licence.txt + + # Configure console. + cat > $CONSOLE_PATH/include/config.php << EO_CONFIG_F + /etc/httpd/conf.d/pandora.conf << EO_CONFIG_F + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +EO_CONFIG_F + + cat > /var/www/html/index.html << EOF_INDEX + +EOF_INDEX + + echo "- Fixing permissions" + chmod 600 $CONSOLE_PATH/include/config.php + chown -R apache. $CONSOLE_PATH + + # prepare php.ini + sed -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini + sed -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini + sed -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini + sed -i -e "s/^memory_limit.*/memory_limit = 500M/g" /etc/php.ini + + echo "- Setting Public URL: $PUBLICURL" + q=$(mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "select token from tconfig;" | grep public_url) + [[ ! "$q" ]] && mysql -u $DBUSER -p$DBPASS $DBNAME -P$DBPORT -h$DBHOST -sNe "INSERT INTO tconfig (token,value) VALUES ('public_url',\"$PUBLICURL\");" + mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "UPDATE tconfig SET value=\"$PUBLICURL\" WHERE token=\"public_url\";" + +#touch $CONSOLE_PATH/pandora_console.log +#chown apache. $CONSOLE_PATH/pandora_console.log + +} + +function check_mr { + ## geting MR + Package + CMR=$(mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "select value from tconfig where token = 'MR'") + CPK=$(mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "select value from tconfig where token = 'current_package_enterprise'") + + DPK=$(grep pandora_version $PANDORA_CONSOLE/include/config_process.php | awk '{print $3}' | tr -d "'" | tr -d ";" | cut -d . -f 3) + DMR=$(ls $PANDORA_CONSOLE/extras/mr/ | sort -n | tail -1 | cut -d . -f 1) + + if [[ $DMR -gt $CMR ]]; then + echo ">> Fixing DB: MR: $CMR Current Package: $CPK Desired MR: $DMR" + cd $PANDORA_CONSOLE/extras/mr/ + for i in $(ls | sort -n); do + cat $i | mysql -u$DBUSER -p$DBPASS $DBNAME -h$DBHOST + done + cd - + + echo ">> Updating DB: MR: $CMR Current Package: $CPK Desired MR: $DMR" + + mysql -u $DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "update tconfig set value = $DMR where token = 'MR';" + mysql -u $DBUSER -p$DBPASS $DBNAME -h$DBHOST -sNe "update tconfig set value = $DPK where token = 'current_package_enterprise';" + fi + + +} + +function server_prepare { + sed -i -e "s/^dbhost.*/dbhost $DBHOST/g" $PANDORA_SERVER_CONF + sed -i -e "s/^dbname.*/dbname $DBNAME/g" $PANDORA_SERVER_CONF + sed -i -e "s/^dbuser.*/dbuser $DBUSER/g" $PANDORA_SERVER_CONF + sed -i -e "s|^dbpass.*|dbpass $DBPASS|g" $PANDORA_SERVER_CONF + sed -i -e "s/^dbport.*/dbport $DBPORT/g" $PANDORA_SERVER_CONF + sed -i -e "s/^#servername.*/servername $INSTANCE_NAME/g" $PANDORA_SERVER_CONF + echo "pandora_service_cmd /etc/init.d/pandora_server" >> $PANDORA_SERVER_CONF + + # prepare snmptrapd + cat > /etc/snmp/snmptrapd.conf << EOF +authCommunity log public +disableAuthorization yes +EOF + + ## Enable WUX + if [ "$WUX_SERVER" == "1" ] && [ "$WUX_HOST" ]; then + if [ ! $WUX_PORT ]; then + WUX_PORT=4444 + fi + echo "Enabling WUX server HOST=$WUX_HOST PORT=$WUX_PORT" + sed -i -r "s/#?wuxserver.*/wuxserver 1/g" $PANDORA_SERVER_CONF + sed -i -r "s/#?wux_host.*/wux_host $WUX_HOST/g" $PANDORA_SERVER_CONF + sed -i -r "s/#?wux_port.*/wux_port $WUX_PORT/g" $PANDORA_SERVER_CONF + + fi +} + + +## +## MAIN +## + +if [ "$DBUSER" == "" ] || [ "$DBPASS" == "" ] || [ "$DBNAME" == "" ] || [ "$DBHOST" == "" ]; then + echo "Required environemntal variables DBUSER, DBPASS, DBNAME, DBHOST" + exit 1 +fi +if [ "$DBPORT" == "" ]; then + DBPORT=3306 +fi + +echo "" > /opt/pandora/crontasks || touch /opt/pandora/crontasks + + +#install pandora packages +echo "-> Istalling pandorafms" +cd /opt/pandora +useradd pandora + +if [[ $OPEN != 1 ]]; then + # install enterprise + dnf install -y /opt/pandora/pandorafms_console*.rpm + tar xvfz /opt/pandora/pandorafms_server_*tar* && cd pandora_server && ./pandora_server_installer --install ; rm -rf /opt/pandora/pandora_server + [[ -e /var/www/html/pandora_console/include/config.php ]] || yum reinstall -y /opt/pandora/pandorafms*.rpm + PANDORA_BIN="pandora_ha" + PANDORA_EXEC="/usr/bin/pandora_ha /etc/pandora/pandora_server.conf" +else + install only open + dnf install -y /opt/pandora/pandorafms_console-*.rpm /opt/pandora/pandorafms_server-*.rpm + dnf reinstall -y /opt/pandora/pandorafms_server-*.rpm + [[ -e /var/www/html/pandora_console/include/config.php ]] || dnf reinstall -y /opt/pandora/pandorafms_console-*.rpm + PANDORA_BIN="pandora_server" + PANDORA_EXEC="/usr/bin/pandora_server /etc/pandora/pandora_server.conf" +fi + + + +db_check && db_load + +# Sync to MC. +if [ "$META_DBNAME" != "" ] && [ "$META_DBHOST" != "" ]; then + if [ "$META_DBPORT" == "" ]; then + META_DBPORT=3306 + fi + register_mc +fi + +check_mr +console_prepare +server_prepare + +echo ">> Enable oracle env file cron: " +cat > /etc/pandora/pandora_server.env << 'EOF_ENV' +#!/bin/bash +VERSION=19.8 +export PATH=$PATH:$HOME/bin:/usr/lib/oracle/$VERSION/client64/bin +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/$VERSION/client64/lib +export ORACLE_HOME=/usr/lib/oracle/$VERSION/client64 +EOF_ENV + +echo ">> Enable discovery cron: " +#while true ; do wget -q -O - --no-check-certificate http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/pandora_console.log && sleep 60 ; done & +echo "*/5 * * * * wget -q -O - --no-check-certificate http://localhost/pandora_console/enterprise/cron.php >> /var/www/html/pandora_console/log/cron.log" >> /opt/pandora/crontasks + +echo ">> Enable pandora_db cron: " +/usr/bin/perl /usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_server.conf +#while true ; do sleep 1h && /usr/bin/pandora_db /etc/pandora/pandora_server.conf; done & +echo "0 */1 * * * /usr/bin/pandora_db /etc/pandora/pandora_server.conf" >> /opt/pandora/crontasks + +echo ">> Loading crontab tasks" +crontab -r +crontab /opt/pandora/crontasks && crontab -l + +ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -F '/' '{print "-> Go to http://"$1"/pandora_console to manage this server"}' + +# Check and launch supervisord +echo ">> Starting process: Running supervisord" +# Create supervisor.conf + +cat > /etc/supervisord.conf << EOF_CON +[unix_http_server] +file=/tmp/supervisor.sock + +[supervisord] +nodaemon=true +loglevel = debug + +[program:php-fpm] +command=/usr/sbin/php-fpm -F +riredirect_stderr=true + +[program:httpd] +command=/usr/sbin/apachectl -DFOREGROUND +riredirect_stderr=true + +[program:tentacle] +command=/etc/init.d/tentacle_serverd restart + +[program:$PANDORA_BIN] +command=$PANDORA_EXEC +riredirect_stderr=true + +[program:cron] +command=crond -n + +[group:allservices] +programs=httpd,cron,php-fpm,$PANDORA_BIN,tentacle + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///tmp/supervisor.sock + +EOF_CON + +# execute supervisor +touch /var/log/pandora/pandora_server.log ; tail -F /var/log/pandora/* & +su - -c supervisord diff --git a/extras/docker/percona/Dockerfile b/extras/docker/percona/Dockerfile new file mode 100644 index 0000000000..82b97401d6 --- /dev/null +++ b/extras/docker/percona/Dockerfile @@ -0,0 +1,31 @@ + +#docker build -t pandorafms/pandorafms-percona-base -f $HOME/code/pandorafms/extras/docker/percona/Dockerfile $HOME/code/pandorafms/extras/docker/percona + +FROM percona:5.7 + +RUN echo -e '#PandoraFMS configuration \n\ +[mysqld] \n\ +max_allowed_packet = 64M \n\ +innodb_buffer_pool_size = 500M \n\ +innodb_lock_wait_timeout = 90 \n\ +innodb_file_per_table \n\ +innodb_flush_log_at_trx_commit = 0 \n\ +innodb_flush_method = O_DIRECT \n\ +innodb_log_file_size = 64M \n\ +innodb_log_buffer_size = 16M \n\ +innodb_io_capacity = 100 \n\ +thread_cache_size = 8 \n\ +thread_stack = 256K \n\ +max_connections = 100 \n \n\ +key_buffer_size=4M \n\ +read_buffer_size=128K \n\ +read_rnd_buffer_size=128K \n\ +sort_buffer_size=128K \n\ +join_buffer_size=4M \n\n\ +query_cache_type = 1 \n\ +query_cache_size = 64M \n\ +query_cache_min_res_unit = 2k \n\ +query_cache_limit = 256K \n\n\ +sql_mode="" ' > /etc/my.cnf.d/pandora.cnf + +EXPOSE 3306 diff --git a/extras/docker/percona/README.MD b/extras/docker/percona/README.MD new file mode 100644 index 0000000000..036cf7e0f9 --- /dev/null +++ b/extras/docker/percona/README.MD @@ -0,0 +1,50 @@ +![Image of Pandora FMS](https://pandorafms.org/wp-content/uploads/2016/06/logo_pandora_community.png) + +# Pandora FMS database container + +This container image is designed for optimal performance using Pandora FMS. + +Is based on the official Percona database image turned to get the maximum performance on PandoraFMS + +## Official Gitgub repo + +Dockerfiles and more info in our official repository: https://github.com/pandorafms/pandorafms/tree/develop/extras/docker/percona + +## USAGE + +Similar to the official percona image: +Example: +``` +docker run --name Pandora_DB \ +-p 3306:3306 \ +-e MYSQL_ROOT_PASSWORD=pandora \ +-e MYSQL_DATABASE=pandora \ +-e MYSQL_USER=pandora \ +-e MYSQL_PASSWORD=pandora \ +-d pandorafms/pandorafms-percona-base +``` + +## Environment Variables +When you start the percona image, you can adjust the configuration of the instance by passing one or more environment variables on the docker run command line. Do note that none of the variables below will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup. + +__MYSQL_ROOT_PASSWORD__ : This variable is mandatory and specifies the password that will be set for the root superuser account. In the above example, it was set to my-secret-pw. + +__MYSQL_ROOT_HOST__ : By default, root can connect from anywhere. This option restricts root connections to be from the specified host only. Also localhost can be used here for the local-only root access. + +__MYSQL_DATABASE__ : +This variable is optional and allows you to specify the name of a database to be created on image startup. If a user/password was supplied (see below) then that user will be granted superuser access (corresponding to GRANT ALL) to this database. + +__MYSQL_USER, MYSQL_PASSWORD__ :These variables are optional, used in conjunction to create a new user and to set that user's password. This user will be granted superuser permissions (see above) for the database specified by the MYSQL_DATABASE variable. Both variables are required for a user to be created. +Do note that there is no need to use this mechanism to create the root superuser, that user gets created by default with the password specified by the MYSQL_ROOT_PASSWORD variable. + +__MYSQL_ALLOW_EMPTY_PASSWORD__ : This is an optional variable. Set to yes to allow the container to be started with a blank password for the root user. NOTE: Setting this variable to yes is not recommended unless you really know what you are doing, since this will leave your instance completely unprotected, allowing anyone to gain complete superuser access. + +__MYSQL_RANDOM_ROOT_PASSWORD__ : This is an optional variable. Set to yes to generate a random initial password for the root user (using pwgen). The generated root password will be printed to stdout (GENERATED ROOT PASSWORD: .....). + +__MYSQL_ONETIME_PASSWORD__ : Sets root (not the user specified in MYSQL_USER!) user as expired once init is complete, forcing a password change on first login. NOTE: This feature is supported on MySQL 5.6+ only. Using this option on MySQL 5.5 will throw an appropriate error during initialization. + +__MYSQL_INITDB_SKIP_TZINFO__ : At first run MySQL automatically loads from the local system the timezone information needed for the CONVERT_TZ() function. If it's is not what is intended, this option disables timezone loading. + +__INIT_TOKUDB__ : Tuns on TokuDB Engine. It can be activated only when transparent huge pages (THP) are disabled. + +__INIT_ROCKSDB__ : Tuns on RocksDB Engine. \ No newline at end of file diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh index 8a16e8e18d..23ea7a4627 100755 --- a/extras/pandora_update_version.sh +++ b/extras/pandora_update_version.sh @@ -143,7 +143,7 @@ done # Darwin dmg installer files echo "Updating DARWIN DMG files..." -sed -i -e "/VERSION/s/=.*/=\"$VERSION\"/" "$AGENT_DARWIN_BUILDER" +sed -i -e "/VERSION/s/=\"7.0NG.*/=\"$VERSION\"/" "$AGENT_DARWIN_BUILDER" sed -i -r "s/(version=\").*(\"\s+onConclusion=)/\1$VERSION\2/g" "$AGENT_DARWIN_DISTR" sed -i -r "s/(CFBundleVersion<\/key>\s*).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST" sed -i -r "s/(CFBundleShortVersionString<\/key>\s*).*(<\/string>)/\1$VERSION\2/g" "$AGENT_DARWIN_PLIST" diff --git a/pandora_agents/Dockerfile b/pandora_agents/Dockerfile index 69117e2ca7..0ee2515a75 100644 --- a/pandora_agents/Dockerfile +++ b/pandora_agents/Dockerfile @@ -1,20 +1,27 @@ -FROM centos:centos7 +FROM centos:centos8 MAINTAINER Pandora FMS Team # Add Pandora FMS agent installer -ADD unix /tmp/pandora_agent/unix +ADD unix /opt/pandora/pandora_agent/unix + +RUN export LC_ALL=C + +RUN dnf install -y dnf-plugins-core; dnf config-manager --set-enabled PowerTools # Install dependencies -RUN yum -y install \ +RUN dnf -y install \ epel-release \ unzip \ perl \ python3 \ sed \ - "perl(Sys::Syslog)" + perl-YAML-Tiny \ + "perl(Sys::Syslog)" \ + && dnf clean all + # Install Pandora FMS agent -RUN cd /tmp/pandora_agent/unix \ +RUN cd /opt/pandora/pandora_agent/unix \ && chmod +x pandora_agent_installer \ && ./pandora_agent_installer --install @@ -41,8 +48,7 @@ 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 \ -tail -f /var/log/pandora/pandora_agent.log' \ +tail -F /var/log/pandora/pandora_agent.log' \ >> /entrypoint.sh && \ chmod +x /entrypoint.sh diff --git a/pandora_agents/pc/AIX/pandora_agent.conf b/pandora_agents/pc/AIX/pandora_agent.conf index a8976d5b1d..cd13d53c4e 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.749, AIX version +# Version 7.0NG.750, 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 db354ce74e..07fc99958f 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.749, FreeBSD Version +# Version 7.0NG.750, 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 35ab968b83..9848b081b0 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.749, HP-UX Version +# Version 7.0NG.750, 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 d01aedfcb6..e2f3b686a4 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.749, GNU/Linux +# Version 7.0NG.750, 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 d3d6bbe3ad..7ba414f284 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.749, GNU/Linux +# Version 7.0NG.750, 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 a1c0730d7d..f2dd07f5e7 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.749, Solaris Version +# Version 7.0NG.750, 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 58f0273c5f..76f75a08b2 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.749 +# Version 7.0NG.750 # 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 0a03ed9406..fea0ce1041 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.749, AIX version +# Version 7.0NG.750, 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 960b5c6571..aa89b138b6 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.749 +# Version 7.0NG.750 # 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 06f9dad4e7..0401702d44 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.749, HPUX Version +# Version 7.0NG.750, HPUX Version # General Parameters # ================== diff --git a/pandora_agents/shellscript/linux/pandora_agent.conf b/pandora_agents/shellscript/linux/pandora_agent.conf index c648bdbc26..b0704ea7fd 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.749 +# Version 7.0NG.750 # 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 c8806e32c8..219df052e2 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.749 +# Version 7.0NG.750 # 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 c11692b728..7a655da9fc 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.749 +# Version 7.0NG.750 # 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 59db4e115a..c6ee8fddeb 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.749, Solaris version +# Version 7.0NG.750, Solaris version # General Parameters # ================== diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index 52c9ac9686..0b32587052 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.749, AIX version +# Version 7.0NG.750, 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 b7de7656f0..1a85f7efbc 100644 --- a/pandora_agents/unix/DEBIAN/control +++ b/pandora_agents/unix/DEBIAN/control @@ -1,5 +1,5 @@ package: pandorafms-agent-unix -Version: 7.0NG.749-201007 +Version: 7.0NG.750-201118 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 fed7f61ad6..6320af2c6a 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.749-201007" +pandora_version="7.0NG.750-201118" 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/dmg/build_darwin_dmg.sh b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh index d1bfdb860a..95878467ab 100644 --- a/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh +++ b/pandora_agents/unix/Darwin/dmg/build_darwin_dmg.sh @@ -22,9 +22,9 @@ fi # DMG package version if [ "$#" -ge 2 ]; then - VERSION="7.0NG.749" + VERSION="$2" else - VERSION="7.0NG.749" + VERSION="7.0NG.750" fi # Path for the generated DMG file @@ -37,7 +37,7 @@ fi BUILD_DMG="$BUILD_PATH/build" BUILD_TMP="$BUILD_PATH/buildtmp" -FULLNAME="7.0NG.749" +FULLNAME="$DMGNAME-$VERSION.dmg" echo "VERSION-"$VERSION" NAME-"$DMGNAME pushd . cd $LOCALINST diff --git a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml index 18a2823e8d..90ce4baef9 100644 --- a/pandora_agents/unix/Darwin/dmg/extras/distribution.xml +++ b/pandora_agents/unix/Darwin/dmg/extras/distribution.xml @@ -19,11 +19,11 @@ - pandorafms_src.pdk + pandorafms_src.pdk - pandorafms_uninstall.pdk + pandorafms_uninstall.pdk