├── Dynatrace-Server ├── build │ ├── scripts │ │ ├── run-server-process.sh │ │ ├── pull-license-key-file.sh │ │ └── create-user.sh │ ├── bin │ │ ├── glibc-2.21-r2.apk │ │ └── glibc-bin-2.21-r2.apk │ └── config │ │ ├── dtfrontendserver.ini │ │ ├── dtserver.ini │ │ └── server.config.xml ├── .env ├── run-dtserver-as-nonroot.sh ├── Dockerfile-debian ├── docker-compose.yml ├── docker-compose-debian.yml ├── Dockerfile └── README.md ├── Dynatrace-Collector ├── build │ ├── bin │ │ ├── glibc-2.21-r2.apk │ │ └── glibc-bin-2.21-r2.apk │ └── scripts │ │ ├── wait-for-cmd.sh │ │ ├── create-user.sh │ │ └── run-collector-process.sh ├── .env ├── run-dtcollector-as-nonroot.sh ├── docker-compose.yml ├── docker-compose-debian.yml ├── Dockerfile-debian ├── Dockerfile └── README.md ├── Dynatrace-Agent-Examples ├── httpd │ ├── .env │ └── docker-compose.yml ├── java │ ├── .env │ ├── build │ │ └── JavaTest.java │ ├── Dockerfile │ └── docker-compose.yml ├── nginx │ ├── .env │ └── docker-compose.yml ├── tomcat │ ├── .env │ └── docker-compose.yml └── glassfish │ ├── .env │ ├── docker-compose.yml │ └── Dockerfile ├── Dynatrace-Agent ├── build │ ├── bin │ │ └── dtnginx_offsets.json.tar.gz │ └── scripts │ │ ├── install-agent.sh │ │ ├── install-node-agent.sh │ │ ├── install-wsagent.sh │ │ ├── create-user.sh │ │ └── run-wsagent.sh ├── .env ├── docker-compose-debian.yml ├── docker-compose.yml ├── run-dtagent-as-nonroot.sh ├── Dockerfile ├── Dockerfile-debian └── README.md ├── Dynatrace-Agent-Win ├── scripts │ ├── StartScript.cmd │ ├── install-agent.ps1 │ ├── install-wsagent.ps1 │ └── run-wsagent.ps1 ├── .env ├── docker-compose.yml ├── Dockerfile └── README.md ├── LICENSE ├── .env ├── run-as-nonroot.sh ├── docker-compose-withoutCollector.yml ├── docker-compose-debian-withoutCollector.yml ├── docker-compose.yml ├── docker-compose-debian.yml └── README.md /Dynatrace-Server/build/scripts/run-server-process.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ${DT_HOME}/dtfrontendserver -bg 3 | ${DT_HOME}/dtserver -------------------------------------------------------------------------------- /Dynatrace-Server/build/bin/glibc-2.21-r2.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dynatrace/Dynatrace-AppMon-Docker/HEAD/Dynatrace-Server/build/bin/glibc-2.21-r2.apk -------------------------------------------------------------------------------- /Dynatrace-Collector/build/bin/glibc-2.21-r2.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dynatrace/Dynatrace-AppMon-Docker/HEAD/Dynatrace-Collector/build/bin/glibc-2.21-r2.apk -------------------------------------------------------------------------------- /Dynatrace-Server/build/bin/glibc-bin-2.21-r2.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dynatrace/Dynatrace-AppMon-Docker/HEAD/Dynatrace-Server/build/bin/glibc-bin-2.21-r2.apk -------------------------------------------------------------------------------- /Dynatrace-Collector/build/bin/glibc-bin-2.21-r2.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dynatrace/Dynatrace-AppMon-Docker/HEAD/Dynatrace-Collector/build/bin/glibc-bin-2.21-r2.apk -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/httpd/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=dynatracedocker 2 | DT_HOME=/opt/dynatrace 3 | DT_COLLECTOR_NAME=dtcollector 4 | AGENT_LIB64=/agent/lib64/libdtagent.so -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/java/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=dynatracedocker 2 | DT_HOME=/opt/dynatrace 3 | DT_COLLECTOR_NAME=dtcollector 4 | AGENT_LIB64=/agent/lib64/libdtagent.so -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/nginx/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=dynatracedocker 2 | DT_HOME=/opt/dynatrace 3 | DT_COLLECTOR_NAME=dtcollector 4 | AGENT_LIB64=/agent/lib64/libdtagent.so -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/tomcat/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=dynatracedocker 2 | DT_HOME=/opt/dynatrace 3 | DT_COLLECTOR_NAME=dtcollector 4 | AGENT_LIB64=/agent/lib64/libdtagent.so -------------------------------------------------------------------------------- /Dynatrace-Agent/build/bin/dtnginx_offsets.json.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dynatrace/Dynatrace-AppMon-Docker/HEAD/Dynatrace-Agent/build/bin/dtnginx_offsets.json.tar.gz -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/glassfish/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=dynatracedocker 2 | DT_HOME=/opt/dynatrace 3 | DT_COLLECTOR_NAME=dtcollector 4 | AGENT_LIB64=/agent/lib64/libdtagent.so -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/scripts/StartScript.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | IF [%DT_ENABLE_AGENT%] == [True] ( 3 | powershell -File C:\Scripts\run-wsagent.ps1 4 | ) 5 | net start w3svc 6 | C:\ServiceMonitor.exe w3svc -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/.env: -------------------------------------------------------------------------------- 1 | DT_HOME=c:\dynatrace 2 | DT_COLLECTOR_NAME=dtcollector 3 | DT_AGENT_NAME=dtagent 4 | DT_VERSION=7.0 5 | DT_BUILD_VERSION=7.0.0.2469 6 | DT_COLLECTOR_NAME=dtcollector 7 | DT_AGENT_NAME=dtagent 8 | DT_ENABLE_AGENT=True -------------------------------------------------------------------------------- /Dynatrace-Agent/build/scripts/install-agent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | INSTALLER_URL="$1" 3 | INSTALLER_FILE_NAME=`basename ${INSTALLER_URL}` 4 | 5 | cd /tmp 6 | curl ${CURL_INSECURE:+"--insecure"} -L -O ${INSTALLER_URL} 7 | java -jar ./${INSTALLER_FILE_NAME} -y 8 | cp -R ./dynatrace-${VERSION}/* ${DT_HOME} 9 | rm -rf /tmp/* 10 | -------------------------------------------------------------------------------- /Dynatrace-Server/build/scripts/pull-license-key-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ ${DT_SERVER_LICENSE_KEY_FILE_URL} ]; then 3 | DT_SERVER_LICENSE_KEY_FILE="${DT_HOME}/server/conf/dtlicense.lic" 4 | 5 | curl -L -o ${DT_SERVER_LICENSE_KEY_FILE} ${DT_SERVER_LICENSE_KEY_FILE_URL} 6 | chmod 0600 ${DT_SERVER_LICENSE_KEY_FILE} 7 | fi 8 | -------------------------------------------------------------------------------- /Dynatrace-Agent/build/scripts/install-node-agent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | INSTALLER_URL="$1" 3 | INSTALLER_FILE_NAME=`basename ${INSTALLER_URL}` 4 | 5 | cd /tmp 6 | curl ${CURL_INSECURE:+"--insecure"} -L -O ${INSTALLER_URL} 7 | tar -xvzf ./${INSTALLER_FILE_NAME} 8 | cp -R ./dynatrace-oneagent-${VERSION}/* ${DT_HOME} 9 | rm -rf /tmp/* 10 | -------------------------------------------------------------------------------- /Dynatrace-Agent/build/scripts/install-wsagent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | INSTALLER_URL="$1" 3 | INSTALLER_FILE_NAME=`basename ${INSTALLER_URL}` 4 | 5 | cd /tmp 6 | curl ${CURL_INSECURE:+"--insecure"} -L -O ${INSTALLER_URL} 7 | tar -xf ./${INSTALLER_FILE_NAME} 8 | sh ./dynatrace-wsagent-*.sh 9 | cp -R ./dynatrace-${VERSION}/* ${DT_HOME} 10 | rm -rf /tmp/* 11 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/java/build/JavaTest.java: -------------------------------------------------------------------------------- 1 | public class JavaTest { 2 | 3 | public static void main(String[] args) { 4 | try { 5 | while (true) { 6 | Thread.sleep(1000); 7 | } 8 | } 9 | catch (java.lang.InterruptedException e) { 10 | System.out.println("Exiting..."); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtagent: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - DT_VERSION=${DT_VERSION} 10 | - DT_BUILD_VERSION=${DT_BUILD_VERSION} 11 | container_name: "${DT_AGENT_NAME}" 12 | image: "dynatrace/agent-win:7.0" 13 | env_file: 14 | - .\.env 15 | 16 | networks: 17 | default: 18 | external: 19 | name: nat -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/java/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM java:7 2 | 3 | LABEL maintainer="Blazej Tomaszewski " 4 | 5 | ARG AGENT_LIB64_PATH 6 | ARG DT_COLLECTOR_NAME 7 | 8 | ENV DT_HOME_JAVA=${DT_HOME}/javaexample 9 | 10 | ENV JAVA_OPTS="-agentpath:${AGENT_LIB64_PATH}=name=java-agent,collector=${DT_COLLECTOR_NAME}" 11 | 12 | RUN mkdir -p ${DT_HOME_JAVA} 13 | 14 | COPY build/JavaTest.java ${DT_HOME_JAVA} 15 | 16 | WORKDIR ${DT_HOME_JAVA} 17 | 18 | RUN javac JavaTest.java 19 | CMD java ${JAVA_OPTS} JavaTest -------------------------------------------------------------------------------- /Dynatrace-Agent/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=dynatracedocker 2 | DT_HOME=/opt/dynatrace 3 | DT_AGENT_LOG_PATH_ON_HOST=/tmp/log/dynatrace/agents/dtagent 4 | DT_COLLECTOR_NAME=dtcollector 5 | DT_AGENT_NAME=dtagent 6 | AGENT_LIB32=/agent/lib/libdtagent.so 7 | AGENT_LIB64=/agent/lib64/libdtagent.so 8 | NODE_AGENT_LIB32=/agent/bin/linux-x86-32/liboneagentloader.so 9 | NODE_AGENT_LIB64=/agent/bin/linux-x86-64/liboneagentloader.so 10 | WSAGENT_BIN64=/agent/lib64/dtwsagent 11 | WSAGENT_INI=/agent/conf/dtwsagent.ini 12 | VERSION=7.0 13 | BUILD_VERSION=7.0.0.2469 14 | CUID=0 15 | CGID=0 16 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/Dockerfile: -------------------------------------------------------------------------------- 1 | #DOCKERFILE FOR DYNATRACE AGENT ON WINDOWS 2 | FROM microsoft/iis 3 | 4 | ARG DT_HOME 5 | ARG DT_BUILD_VERSION 6 | ARG DT_VERSION 7 | 8 | ENV AGENT_INSTALLER_NAME=dynatrace-agent-${BUILD_VERSION}-x86.msi 9 | ENV AGENT_INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${AGENT_INSTALLER_NAME} 10 | 11 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] 12 | COPY ["./Scripts","/Scripts"] 13 | RUN C:\Scripts\install-agent.ps1 14 | RUN C:\Scripts\install-wsagent.ps1 15 | 16 | ENTRYPOINT ["C:\\Scripts\\StartScript.cmd"] 17 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/nginx/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | services: 3 | nginx: 4 | container_name: nginx 5 | image: nginx 6 | ports: 7 | - 80 8 | env_file: 9 | - ../../.env 10 | environment: 11 | - COMPOSE_PROJECT_NAME 12 | - DT_AGENT_NAME=nginx-agent 13 | - LD_PRELOAD=${DT_HOME}${AGENT_LIB64} 14 | volumes_from: 15 | - container:dtagent 16 | command: sh -c "${DT_HOME}/run-wsagent.sh && nginx -g 'daemon off;'" 17 | 18 | networks: 19 | default: 20 | external: 21 | name: ${COMPOSE_PROJECT_NAME}_appmon 22 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/tomcat/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | services: 3 | tomcat: 4 | container_name: tomcat 5 | image: tomcat 6 | ports: 7 | - 8080 8 | env_file: 9 | - ../../.env 10 | environment: 11 | - COMPOSE_PROJECT_NAME 12 | - DT_AGENT_NAME=tomcat-agent 13 | - CATALINA_OPTS="-agentpath:${DT_HOME}${AGENT_LIB64}=name=tomcat-agent,collector=${DT_COLLECTOR_NAME}" 14 | volumes_from: 15 | - container:dtagent 16 | command: catalina.sh run 17 | 18 | networks: 19 | default: 20 | external: 21 | name: ${COMPOSE_PROJECT_NAME}_appmon 22 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/java/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | services: 3 | java: 4 | container_name: javaexample 5 | build: 6 | context: . 7 | args: 8 | - AGENT_LIB64_PATH=${DT_HOME}${AGENT_LIB64} 9 | - DT_COLLECTOR_NAME=${DT_COLLECTOR_NAME} 10 | image: "dynatrace/javaexample" 11 | env_file: 12 | - ../../.env 13 | environment: 14 | - COMPOSE_PROJECT_NAME 15 | - DT_AGENT_NAME=java-agent 16 | volumes_from: 17 | - container:dtagent 18 | 19 | networks: 20 | default: 21 | external: 22 | name: ${COMPOSE_PROJECT_NAME}_appmon 23 | -------------------------------------------------------------------------------- /Dynatrace-Collector/build/scripts/wait-for-cmd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | WAIT_CMD=$1 3 | WAIT_TIME_S=${2:-10} 4 | WAIT_INTERVAL_S=${WAIT_INTERVAL_S:-1} 5 | WAIT_NUM_LOOPS=$(($WAIT_TIME_S / $WAIT_INTERVAL_S)) 6 | 7 | if [ $WAIT_INTERVAL_S -gt $WAIT_TIME_S ]; then 8 | echo "Error: \$WAIT_INTERVAL_S must be <= \$WAIT_TIME_S" 9 | exit 1 10 | fi 11 | 12 | is_ready() { 13 | eval "$WAIT_CMD" 14 | } 15 | 16 | i=0 17 | while ! is_ready; do 18 | i=$(($i + 1)) 19 | if [ "$i" -ge "$WAIT_NUM_LOOPS" ]; then 20 | echo "Error: '${WAIT_CMD}' still not ready after ${WAIT_TIME_S}s" 21 | exit 1 22 | fi 23 | 24 | sleep $WAIT_INTERVAL_S 25 | done -------------------------------------------------------------------------------- /Dynatrace-Server/.env: -------------------------------------------------------------------------------- 1 | #if your url doesn't end with license filename, you should adjust pull-license-key-file.sh script 2 | DT_SERVER_LICENSE_KEY_FILE_URL= 3 | COMPOSE_PROJECT_NAME=dynatracedocker 4 | DT_HOME=/opt/dynatrace 5 | DT_SERVER_LOG_PATH_ON_HOST=/tmp/log/dynatrace/servers/dtserver 6 | DT_SERVER_NAME=dtserver 7 | APPMON_WEB_CLIENT_NONSSL_PORT=8020 8 | APPMON_WEB_CLIENT_SSL_PORT=8021 9 | APPMON_ONEAGENT_NONSSL_SERVER_PORT=8040 10 | APPMON_ONEAGENT_SSL_SERVER_PORT=8041 11 | APPMON_CLIENT_NONSSL_PORT=2021 12 | APPMON_CLIENT_SSL_PORT=8023 13 | APPMON_COLLECTOR_PORT=9998 14 | APPMON_COLLECTOR_SERVER_SSL_PORT=6699 15 | VERSION=7.0 16 | BUILD_VERSION=7.0.0.2469 17 | CUID=0 18 | CGID=0 -------------------------------------------------------------------------------- /Dynatrace-Collector/.env: -------------------------------------------------------------------------------- 1 | ###if your url doesn't end with license filename, you should adjust pull-license-key-file.sh script 2 | DT_SERVER_LICENSE_KEY_FILE_URL= 3 | COMPOSE_PROJECT_NAME=dynatracedocker 4 | DT_HOME=/opt/dynatrace 5 | DT_COLLECTOR_LOG_PATH_ON_HOST=/tmp/log/dynatrace/collectors/dtcollector 6 | DT_COLLECTOR_NAME=dtcollector 7 | DT_COLLECTOR_GROUP_NAME= 8 | DT_SERVER_NAME=dtserver 9 | DT_COLLECTOR_SERVER=dtserver:6699 10 | DT_AGENT_NAME=dtagent 11 | APPMON_ONEAGENT_NONSSL_SERVER_PORT=8040 12 | APPMON_ONEAGENT_SSL_SERVER_PORT=8041 13 | APPMON_COLLECTOR_PORT=9998 14 | APPMON_COLLECTOR_SERVER_SSL_PORT=6699 15 | VERSION=7.0 16 | BUILD_VERSION=7.0.0.2469 17 | CUID=0 18 | CGID=0 19 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/httpd/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | services: 3 | httpd: 4 | container_name: httpd 5 | image: httpd 6 | ports: 7 | - 80 8 | env_file: 9 | - ../../.env 10 | environment: 11 | - COMPOSE_PROJECT_NAME 12 | - DT_AGENT_NAME=httpd 13 | - DT_AGENT_COLLECTOR=${DT_COLLECTOR_NAME} 14 | volumes_from: 15 | - container:dtagent 16 | command: > 17 | sh -c " \ 18 | ${DT_HOME}/run-wsagent.sh && \ 19 | (echo LoadModule dtagent_module ${DT_HOME}${AGENT_LIB64} >> conf/httpd.conf) && \ 20 | httpd-foreground" 21 | 22 | 23 | networks: 24 | default: 25 | external: 26 | name: ${COMPOSE_PROJECT_NAME}_appmon 27 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/glassfish/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | services: 3 | glassfish: 4 | container_name: glassfish-agent 5 | build: 6 | context: . 7 | args: 8 | - DT_AGENT_PATH="-agentpath:${DT_HOME}${AGENT_LIB64}=name=glassfish-agent,collector=${DT_COLLECTOR_NAME}" 9 | image: glassfish-agent 10 | env_file: 11 | - ../../.env 12 | environment: 13 | - COMPOSE_PROJECT_NAME 14 | - DT_AGENT_NAME="glassfish-agent" 15 | - DT_HOME 16 | - AGENT_LIB64 17 | - DT_COLLECTOR_NAME 18 | volumes_from: 19 | - container:dtagent 20 | 21 | networks: 22 | default: 23 | external: 24 | name: ${COMPOSE_PROJECT_NAME}_appmon 25 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Examples/glassfish/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM glassfish:latest 2 | 3 | LABEL maintainer="Blazej Tomaszewski " 4 | 5 | ARG DT_AGENT_PATH 6 | 7 | ENV GF_DOMAIN_XML_FILE="glassfish/domains/domain1/config/domain.xml" 8 | ENV DT_AGENT_INSTALL_DEPS="xmlstarlet" 9 | ENV DT_AGENT_PATH=${DT_AGENT_PATH} 10 | 11 | RUN apt-get update && apt-get install -y ${DT_AGENT_INSTALL_DEPS} && \ 12 | xmlstarlet ed -L -s "//java-config" -t elem -n "jvm-options" -v ${DT_AGENT_PATH} ${GF_DOMAIN_XML_FILE} && \ 13 | xmlstarlet ed -L -d "//java-config/jvm-options[text()=${DT_AGENT_PATH}]" ${GF_DOMAIN_XML_FILE} && \ 14 | apt-get remove --purge -y ${DT_AGENT_INSTALL_DEPS} && \ 15 | rm -rf /var/lib/apt/lists/* /tmp/* 16 | 17 | CMD [ "sh", "-c", "asadmin start-domain -v"] -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/scripts/install-agent.ps1: -------------------------------------------------------------------------------- 1 | Invoke-WebRequest -Uri $env:AGENT_INSTALLER_URL -OutFile "$env:TEMP\$env:AGENT_INSTALLER_NAME" 2 | $process = Start-Process -FilePath msiexec -ArgumentList "/a $env:TEMP\$env:AGENT_INSTALLER_NAME /qn /l* $env:TEMP\dynatrace-agent.log TARGETDIR=$env:DT_HOME" -Wait -PassThru 3 | If ($process.ExitCode -ne 0) { 4 | $MSIlog = Get-Content "$env:TEMP\dynatrace-agent.log" 5 | $MSIlog 6 | throw "MSI install failed" 7 | } 8 | Remove-Item -Path "$env:TEMP\$env:AGENT_INSTALLER_NAME" -Confirm:$False 9 | 10 | $serviceinstall = Start-Process -FilePath "$env:DT_HOME\agent\lib\dtwsagent.exe" -ArgumentList "-service install" -Wait -PassThru 11 | If ($serviceinstall.ExitCode -ne 0) { throw "Service install failed" } 12 | 13 | Set-Service -ServiceName "Dynatrace Web Server Agent $env:DT_VERSION" -StartupType Manual 14 | Set-Service -ServiceName "W3SVC" -StartupType Manual -------------------------------------------------------------------------------- /Dynatrace-Agent/docker-compose-debian.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtagent: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile-debian 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | container_name: "${DT_AGENT_NAME}" 12 | image: "dynatrace/agent:7.0-debian" 13 | env_file: 14 | - ../.env 15 | environment: 16 | - COMPOSE_PROJECT_NAME 17 | - DT_HOME 18 | - DT_AGENT_COLLECTOR="${DT_COLLECTOR_NAME}:9998" 19 | - AGENT_LIB32 20 | - AGENT_LIB64 21 | - NODE_AGENT_LIB32 22 | - NODE_AGENT_LIB64 23 | - WSAGENT_BIN64 24 | - WSAGENT_INI 25 | volumes: 26 | - ${DT_HOME} 27 | - ${DT_HOME}/agent/lib64 28 | - "${DT_AGENT_LOG_PATH_ON_HOST}:${DT_HOME}/log/agent" 29 | networks: 30 | - appmon 31 | user: "${CUID}:${CGID}" 32 | 33 | networks: 34 | appmon: 35 | driver: bridge 36 | -------------------------------------------------------------------------------- /Dynatrace-Agent/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtagent: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | - CUID=${CUID} 12 | - CGID=${CGID} 13 | container_name: "${DT_AGENT_NAME}" 14 | image: "dynatrace/agent:7.0" 15 | env_file: 16 | - ../.env 17 | environment: 18 | - COMPOSE_PROJECT_NAME 19 | - DT_HOME 20 | - DT_AGENT_COLLECTOR="${DT_COLLECTOR_NAME}:9998" 21 | - AGENT_LIB32 22 | - AGENT_LIB64 23 | - NODE_AGENT_LIB32 24 | - NODE_AGENT_LIB64 25 | - WSAGENT_BIN64 26 | - WSAGENT_INI 27 | volumes: 28 | - ${DT_HOME} 29 | - ${DT_HOME}/agent/lib64 30 | - "${DT_AGENT_LOG_PATH_ON_HOST}:${DT_HOME}/log/agent" 31 | networks: 32 | - appmon 33 | user: "${CUID}:${CGID}" 34 | 35 | networks: 36 | appmon: 37 | driver: bridge 38 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/scripts/install-wsagent.ps1: -------------------------------------------------------------------------------- 1 | Import-Module WebAdministration 2 | New-WebGlobalModule -Name "dynaTrace IIS Webserver Agent" -Image "$env:DT_HOME\agent\lib\dtagent.dll" -Precondition "bitness32" 3 | New-WebGlobalModule -Name "dynaTrace IIS Webserver Agent (x64)" -Image "$env:DT_HOME\agent\lib64\dtagent.dll" -Precondition "bitness64" 4 | Disable-WebGlobalModule -Name "dynaTrace IIS Webserver Agent" 5 | Disable-WebGlobalModule -Name "dynaTrace IIS Webserver Agent (x64)" 6 | 7 | New-Item -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace 8 | New-Item -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent 9 | New-Item -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist 10 | New-Item -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist\1 11 | New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist\1 -PropertyType String -Name "active" -Value "true" 12 | New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist\1 -PropertyType String -Name "path" -Value "*" 13 | New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist\1 -PropertyType String -Name "exec" -Value "w3wp.exe" -------------------------------------------------------------------------------- /Dynatrace-Agent/run-dtagent-as-nonroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | REBUILD="false" 4 | FILENAME="" 5 | 6 | while getopts ":f:b" opt; do 7 | case $opt in 8 | f) 9 | FILENAME="$OPTARG" 10 | ;; 11 | b) 12 | REBUILD="true" 13 | ;; 14 | \?) 15 | echo "Invalid option: -$OPTARG" >&2 16 | exit 1 17 | ;; 18 | :) 19 | echo "Option -$OPTARG requires an argument." >&2 20 | exit 1 21 | ;; 22 | esac 23 | done 24 | 25 | DT_AGENT_LOG_PATH_ON_HOST=${DT_AGENT_LOG_PATH_ON_HOST:-"/tmp/log/dynatrace/agents/dtagent"} 26 | 27 | mkdir -p ${DT_AGENT_LOG_PATH_ON_HOST} 28 | 29 | OWNER=$(stat -c '%U' ${DT_AGENT_LOG_PATH_ON_HOST}) 30 | if [ "${OWNER}" != "${USER}" ] ; then 31 | echo "Directory has invalid ownership set to '${OWNER}', change it to current user or remove it: ${DT_AGENT_LOG_PATH_ON_HOST}" >&2 32 | echo "Aborting..." >&2 33 | exit 1 34 | fi 35 | 36 | PARAMS="" 37 | if [ ! -z "$FILENAME" ] ; then 38 | PARAMS="$PARAMS -f $FILENAME" 39 | fi 40 | PARAMS="$PARAMS up -d" 41 | if [ "$REBUILD" = "true" ] ; then 42 | PARAMS="$PARAMS --build" 43 | fi 44 | 45 | docker-compose ${PARAMS} -------------------------------------------------------------------------------- /Dynatrace-Server/run-dtserver-as-nonroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | REBUILD="false" 4 | FILENAME="" 5 | 6 | while getopts ":f:b" opt; do 7 | case $opt in 8 | f) 9 | FILENAME="$OPTARG" 10 | ;; 11 | b) 12 | REBUILD="true" 13 | ;; 14 | \?) 15 | echo "Invalid option: -$OPTARG" >&2 16 | exit 1 17 | ;; 18 | :) 19 | echo "Option -$OPTARG requires an argument." >&2 20 | exit 1 21 | ;; 22 | esac 23 | done 24 | 25 | DT_SERVER_LOG_PATH_ON_HOST=${DT_SERVER_LOG_PATH_ON_HOST:-"/tmp/log/dynatrace/servers/dtserver"} 26 | 27 | mkdir -p ${DT_SERVER_LOG_PATH_ON_HOST} 28 | 29 | OWNER=$(stat -c '%U' ${DT_SERVER_LOG_PATH_ON_HOST}) 30 | if [ "${OWNER}" != "${USER}" ] ; then 31 | echo "Directory has invalid ownership set to '${OWNER}', change it to current user or remove it: ${DT_SERVER_LOG_PATH_ON_HOST}" >&2 32 | echo "Aborting..." >&2 33 | exit 1 34 | fi 35 | 36 | PARAMS="" 37 | if [ ! -z "$FILENAME" ] ; then 38 | PARAMS="$PARAMS -f $FILENAME" 39 | fi 40 | PARAMS="$PARAMS up -d" 41 | if [ "$REBUILD" = "true" ] ; then 42 | PARAMS="$PARAMS --build" 43 | fi 44 | 45 | docker-compose ${PARAMS} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2015 Dynatrace Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /Dynatrace-Collector/run-dtcollector-as-nonroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | REBUILD="false" 4 | FILENAME="" 5 | 6 | while getopts ":f:b" opt; do 7 | case $opt in 8 | f) 9 | FILENAME="$OPTARG" 10 | ;; 11 | b) 12 | REBUILD="true" 13 | ;; 14 | \?) 15 | echo "Invalid option: -$OPTARG" >&2 16 | exit 1 17 | ;; 18 | :) 19 | echo "Option -$OPTARG requires an argument." >&2 20 | exit 1 21 | ;; 22 | esac 23 | done 24 | 25 | DT_COLLECTOR_LOG_PATH_ON_HOST=${DT_COLLECTOR_LOG_PATH_ON_HOST:-"/tmp/log/dynatrace/collectors/dtcollector"} 26 | 27 | mkdir -p ${DT_COLLECTOR_LOG_PATH_ON_HOST} 28 | 29 | OWNER=$(stat -c '%U' ${DT_COLLECTOR_LOG_PATH_ON_HOST}) 30 | if [ "${OWNER}" != "${USER}" ] ; then 31 | echo "Directory has invalid ownership set to '${OWNER}', change it to current user or remove it: ${DT_COLLECTOR_LOG_PATH_ON_HOST}" >&2 32 | echo "Aborting..." >&2 33 | exit 1 34 | fi 35 | 36 | PARAMS="" 37 | if [ ! -z "$FILENAME" ] ; then 38 | PARAMS="$PARAMS -f $FILENAME" 39 | fi 40 | PARAMS="$PARAMS up -d" 41 | if [ "$REBUILD" = "true" ] ; then 42 | PARAMS="$PARAMS --build" 43 | fi 44 | 45 | docker-compose ${PARAMS} -------------------------------------------------------------------------------- /Dynatrace-Agent/build/scripts/create-user.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ${CUID} -ne 0 ] ; then 4 | if [ "$(cat /etc/*release | grep ID=*alpine* | wc -l)" = "1" ] ; then 5 | if [ ! $(getent group ${CGID}) ] 6 | then 7 | addgroup -S -g ${CGID} dtuser && adduser -S -H -D -g dtuser -u ${CUID} -G dtuser dtuser 8 | else adduser -S -H -D -g dtuser -u ${CUID} dtuser 9 | fi 10 | echo "Setting ${DT_HOME} recursive ownership to user ${CGID}:${CUID}" 11 | chown -R ${CGID}:${CUID} ${DT_HOME} 12 | elif [ "$(cat /etc/*release | grep ID=*debian* | wc -l)" = "1" ] ; then 13 | if [ ! $(getent group ${CGID}) ] 14 | then 15 | addgroup --system --gecos dtuser --gid ${CGID} dtuser && adduser --system --no-create-home --disabled-password --gecos dtuser --uid ${CUID} --gid ${CGID} dtuser 16 | else adduser --system --no-create-home --disabled-password --gecos dtuser --uid ${CUID} dtuser 17 | fi 18 | echo "Setting ${DT_HOME} recursive ownership to user ${CGID}:${CUID}" 19 | chown -R ${CGID}:${CUID} ${DT_HOME} 20 | else echo "WARNING! Linux Distribution not recognized. New user not created!" 21 | fi 22 | fi -------------------------------------------------------------------------------- /Dynatrace-Collector/build/scripts/create-user.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ${CUID} -ne 0 ] ; then 4 | if [ "$(cat /etc/*release | grep ID=*alpine* | wc -l)" = "1" ] ; then 5 | if [ ! $(getent group ${CGID}) ] 6 | then 7 | addgroup -S -g ${CGID} dtuser && adduser -S -H -D -g dtuser -u ${CUID} -G dtuser dtuser 8 | else adduser -S -H -D -g dtuser -u ${CUID} dtuser 9 | fi 10 | echo "Setting ${DT_HOME} recursive ownership to user ${CGID}:${CUID}" 11 | chown -R ${CGID}:${CUID} ${DT_HOME} 12 | elif [ "$(cat /etc/*release | grep ID=*debian* | wc -l)" = "1" ] ; then 13 | if [ ! $(getent group ${CGID}) ] 14 | then 15 | addgroup --system --gecos dtuser --gid ${CGID} dtuser && adduser --system --no-create-home --disabled-password --gecos dtuser --uid ${CUID} --gid ${CGID} dtuser 16 | else adduser --system --no-create-home --disabled-password --gecos dtuser --uid ${CUID} dtuser 17 | fi 18 | echo "Setting ${DT_HOME} recursive ownership to user ${CGID}:${CUID}" 19 | chown -R ${CGID}:${CUID} ${DT_HOME} 20 | else echo "WARNING! Linux Distribution not recognized. New user not created!" 21 | fi 22 | fi -------------------------------------------------------------------------------- /Dynatrace-Server/build/scripts/create-user.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ${CUID} -ne 0 ] ; then 4 | if [ "$(cat /etc/*release | grep ID=*alpine* | wc -l)" = "1" ] ; then 5 | if [ ! $(getent group ${CGID}) ] 6 | then 7 | addgroup -S -g ${CGID} dtuser && adduser -S -H -D -g dtuser -u ${CUID} -G dtuser dtuser 8 | else adduser -S -H -D -g dtuser -u ${CUID} dtuser 9 | fi 10 | echo "Setting ${DT_HOME} recursive ownership to user ${CGID}:${CUID}" 11 | chown -R ${CGID}:${CUID} ${DT_HOME} 12 | elif [ "$(cat /etc/*release | grep ID=*debian* | wc -l)" = "1" ] ; then 13 | if [ ! $(getent group ${CGID}) ] 14 | then 15 | addgroup --system --gecos dtuser --gid ${CGID} dtuser && adduser --system --no-create-home --disabled-password --gecos dtuser --uid ${CUID} --gid ${CGID} dtuser 16 | else adduser --system --no-create-home --disabled-password --gecos dtuser --uid ${CUID} dtuser 17 | fi 18 | echo "Setting ${DT_HOME} recursive ownership to user ${CGID}:${CUID}" 19 | chown -R ${CGID}:${CUID} ${DT_HOME} 20 | else echo "WARNING! Linux Distribution not recognized. New user not created!" 21 | fi 22 | fi -------------------------------------------------------------------------------- /Dynatrace-Collector/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtcollector: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | - CUID=${CUID} 12 | - CGID=${CGID} 13 | container_name: "${DT_COLLECTOR_NAME}" 14 | image: "dynatrace/collector:7.0" 15 | environment: 16 | - COMPOSE_PROJECT_NAME 17 | - DT_HOME 18 | - DT_SERVER_LICENSE_KEY_FILE_URL 19 | - DT_SERVER_NAME 20 | - APPMON_COLLECTOR_PORT 21 | - APPMON_ONEAGENT_NONSSL_PORT 22 | - APPMON_ONEAGENT_SSL_PORT 23 | - APPMON_COLLECTOR_SERVER_SSL_PORT 24 | volumes: 25 | - "${DT_COLLECTOR_LOG_PATH_ON_HOST}:${DT_HOME}/log/collector/dtcollector" 26 | networks: 27 | - appmon 28 | ports: 29 | # 9998 - Legacy Agent to Collector 30 | - "${APPMON_COLLECTOR_PORT:-9998}:9998" 31 | # 8042 One Agent to Collector non SSL 32 | - "${APPMON_ONEAGENT_NONSSL_PORT:-8042}:8042" 33 | # 8043 One Agent to Collector SSL 34 | - "${APPMON_ONEAGENT_SSL_PORT:-8043}:8043" 35 | user: "${CUID}:${CGID}" 36 | 37 | networks: 38 | appmon: 39 | driver: bridge 40 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | ###if your url doesn't end with license filename, you should adjust pull-license-key-file.sh script 2 | DT_SERVER_LICENSE_KEY_FILE_URL= 3 | ###project details 4 | COMPOSE_PROJECT_NAME=dynatracedocker 5 | DT_HOME=/opt/dynatrace 6 | DT_COLLECTOR_NAME=dtcollector 7 | DT_SERVER_NAME=dtserver 8 | DT_AGENT_NAME=dtagent 9 | ###log paths 10 | DT_SERVER_LOG_PATH_ON_HOST=/tmp/log/dynatrace/servers/dtserver 11 | DT_COLLECTOR_LOG_PATH_ON_HOST=/tmp/log/dynatrace/collectors/dtcollector 12 | DT_AGENT_LOG_PATH_ON_HOST=/tmp/log/dynatrace/agents/dtagent 13 | ###library paths 14 | AGENT_LIB32=/agent/lib/libdtagent.so 15 | AGENT_LIB64=/agent/lib64/libdtagent.so 16 | NODE_AGENT_LIB32=/agent/bin/linux-x86-32/liboneagentloader.so 17 | NODE_AGENT_LIB64=/agent/bin/linux-x86-64/liboneagentloader.so 18 | WSAGENT_BIN64=/agent/lib64/dtwsagent 19 | WSAGENT_INI=/agent/conf/dtwsagent.ini 20 | ###ports 21 | APPMON_WEB_CLIENT_NONSSL_PORT=8020 22 | APPMON_WEB_CLIENT_SSL_PORT=8021 23 | APPMON_ONEAGENT_NONSSL_SERVER_PORT=8040 24 | APPMON_ONEAGENT_SSL_SERVER_PORT=8041 25 | APPMON_CLIENT_NONSSL_PORT=2021 26 | APPMON_CLIENT_SSL_PORT=8023 27 | APPMON_COLLECTOR_PORT=9998 28 | APPMON_COLLECTOR_SERVER_SSL_PORT=6699 29 | APPMON_ONEAGENT_NONSSL_PORT=8042 30 | APPMON_ONEAGENT_SSL_PORT=8043 31 | ###build information 32 | VERSION=7.0 33 | BUILD_VERSION=7.0.0.2469 34 | ###user 35 | CUID=0 36 | CGID=0 37 | -------------------------------------------------------------------------------- /Dynatrace-Collector/docker-compose-debian.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtcollector: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile-debian 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | - CUID=${CUID} 12 | - CGID=${CGID} 13 | container_name: "${DT_COLLECTOR_NAME}" 14 | image: "dynatrace/collector:7.0-debian" 15 | environment: 16 | - COMPOSE_PROJECT_NAME 17 | - DT_HOME 18 | - DT_SERVER_LICENSE_KEY_FILE_URL 19 | - DT_SERVER_NAME 20 | - APPMON_COLLECTOR_PORT 21 | - APPMON_ONEAGENT_NONSSL_PORT 22 | - APPMON_ONEAGENT_SSL_PORT 23 | - APPMON_COLLECTOR_SERVER_SSL_PORT 24 | volumes: 25 | - "${DT_COLLECTOR_LOG_PATH_ON_HOST}:${DT_HOME}/log/collector/dtcollector" 26 | networks: 27 | - appmon 28 | ports: 29 | # 9998 - Legacy Agent to Collector 30 | - "${APPMON_COLLECTOR_PORT:-9998}:9998" 31 | # 8042 One Agent to Collector non SSL 32 | - "${APPMON_ONEAGENT_NONSSL_PORT:-8042}:8042" 33 | # 8043 One Agent to Collector SSL 34 | - "${APPMON_ONEAGENT_SSL_PORT:-8043}:8043" 35 | user: "${CUID}:${CGID}" 36 | 37 | networks: 38 | appmon: 39 | driver: bridge 40 | -------------------------------------------------------------------------------- /Dynatrace-Collector/build/scripts/run-collector-process.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | NAME=${DT_COLLECTOR_NAME:-"dtcollector"} 4 | GROUP_NAME=${DT_COLLECTOR_GROUP_NAME} 5 | 6 | JVM_XMS=${DT_COLLECTOR_JVM_XMS:-"2G"} 7 | JVM_XMX=${DT_COLLECTOR_JVM_XMX:-"2G"} 8 | JVM_PERM_SIZE=${DT_COLLECTOR_JVM_PERM_SIZE:-"128m"} 9 | JVM_MAX_PERM_SIZE=${DT_COLLECTOR_JVM_MAX_PERM_SIZE:-"128m"} 10 | 11 | # We attempt to auto-discover the Dynatrace Server through the environment 12 | # when the container has been --linked to a 'dynatrace/server' container 13 | # instance with a link alias 'dtserver'. 14 | # 15 | # Example: docker run --link dtserver-1:dtserver dynatrace/collector 16 | # 17 | # Auto-discovery can be overridden by providing the $SERVER variable 18 | # through the environment. 19 | SERVER_HOST_NAME=${DT_SERVER_NAME:-"dtserver"} 20 | SERVER_COLLECTOR_PORT=${APPMON_COLLECTOR_SERVER_SSL_PORT:-"6699"} 21 | SERVER=${DT_COLLECTOR_SERVER:-"${SERVER_HOST_NAME}:${SERVER_COLLECTOR_PORT}"} 22 | 23 | #getent passwd ${CGUID} > /dev/null 2&>1 24 | #result=$?; 25 | # 26 | #if [ $result -nq 0 ]; then 27 | #fi 28 | 29 | # Wait for the server to start serving collectors. 30 | echo Wait command: "nc -z `echo ${SERVER} | sed 's/:/ /'`" 31 | wait-for-cmd.sh "nc -z `echo ${SERVER} | sed 's/:/ /'`" 360 32 | 33 | ${DT_HOME}/dtcollector -instance ${NAME} \ 34 | -listen ${APPMON_COLLECTOR_PORT} \ 35 | -server ${SERVER} \ 36 | -group ${GROUP_NAME} \ 37 | -Xms${JVM_XMS} \ 38 | -Xmx${JVM_XMX} \ 39 | -XX:PermSize=${JVM_PERM_SIZE} \ 40 | -XX:MaxPermSize=${JVM_MAX_PERM_SIZE} 41 | -------------------------------------------------------------------------------- /Dynatrace-Collector/Dockerfile-debian: -------------------------------------------------------------------------------- 1 | #DOCKERFILE FOR DYNATRACE COLLECTOR 2 | FROM debian:jessie 3 | 4 | LABEL maintainer="Blazej Tomaszewski " 5 | 6 | ARG DT_HOME 7 | ARG BUILD_VERSION 8 | ARG VERSION 9 | ARG CUID 10 | ARG CGID 11 | 12 | ENV INSTALLER_FILE_NAME=dynatrace-collector-${BUILD_VERSION}-linux-x86.jar 13 | ENV INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${INSTALLER_FILE_NAME} 14 | 15 | ENV DT_INSTALL_DEPS=openjdk-8-jre-headless 16 | ENV DT_RUNTIME_DEPS=curl\ procps 17 | 18 | RUN echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list && \ 19 | apt-get update -y && apt-get install -y --no-install-recommends -t jessie-backports ${DT_INSTALL_DEPS} ${DT_RUNTIME_DEPS} && \ 20 | curl ${CURL_INSECURE:+"--insecure"} -L -o /tmp/${INSTALLER_FILE_NAME} ${INSTALLER_URL} && \ 21 | java -jar /tmp/${INSTALLER_FILE_NAME} -b 64 -t ${DT_HOME} -y && \ 22 | mkdir -p ${DT_HOME}/log/collector/dtcollector && \ 23 | apt-get remove --purge -y ${DT_INSTALL_DEPS} && \ 24 | rm -rf /var/lib/apt/lists/* /tmp/* 25 | 26 | ENV WAIT_FOR_CMD_RUNTIME_DEPS=netcat 27 | 28 | COPY build/scripts/wait-for-cmd.sh /usr/local/bin 29 | 30 | RUN apt-get update && \ 31 | apt-get install -y ${WAIT_FOR_CMD_RUNTIME_DEPS} && \ 32 | rm -rf /var/lib/apt/lists/* /tmp/* 33 | 34 | COPY build/scripts/create-user.sh /tmp 35 | ENV CUID="${CUID:-0}" 36 | ENV CGID="${CGID:-0}" 37 | RUN /bin/sh -c /tmp/create-user.sh && rm -rf /tmp/* 38 | USER ${CUID}:${CGID} 39 | 40 | ENV DT_HOME=${DT_HOME} 41 | COPY build/scripts/run-collector-process.sh ${DT_HOME} 42 | CMD [ "sh", "-c", "${DT_HOME}/run-collector-process.sh" ] 43 | -------------------------------------------------------------------------------- /Dynatrace-Server/build/config/dtfrontendserver.ini: -------------------------------------------------------------------------------- 1 | # WARNING: 2 | # Manual changes in this file, except changes that are related to memory allocation, may cause severe problems and system instability. 3 | # Apply manual changes only if you have explicit instructions from dynaTrace Support. 4 | # Since dynaTrace 6.0 '-Xmx' and '-Xms' VM arguments are ignored. Please use the '-memory' parameter instead. 5 | # 6 | -basedir 7 | server 8 | -restartonfailure 9 | -memory 10 | demo 11 | -vmargs 12 | -Xmx512M 13 | -Xms512M 14 | -XX:+UseConcMarkSweepGC 15 | -XX:+DisableExplicitGC 16 | -XX:+UseCMSInitiatingOccupancyOnly 17 | -XX:CMSInitiatingOccupancyFraction=60 18 | -XX:CMSIncrementalSafetyFactor=40 19 | -XX:+CMSClassUnloadingEnabled 20 | -Djava.endorsed.dirs=lib/endorsed 21 | -Djava.awt.headless=true 22 | -Dosgi.configuration.area=osgi.frontend 23 | -Dosgi.checkConfiguration=true 24 | -Dosgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@2:start, org.eclipse.equinox.event@3:start, analysisstream-elasticsearch@4:start, com.dynatrace.diagnostics.serverbootstrap.jar@5:start, org.eclipse.equinox.ds@start 25 | -Declipse.ignoreApp=true 26 | -Dosgi.noShutdown=true 27 | -Djava.util.logging.manager=com.dynatrace.diagnostics.util.modern.logging.FrontendServerLogManager 28 | -Dorg.osgi.framework.language=en 29 | -Dosgi.framework.extensions=com.dynatrace.diagnostics.bootstrap.hook 30 | -Dosgi.nl=en_US 31 | -Dosgi.nl.user=en_US 32 | -Duser.country=US 33 | -Duser.language=en 34 | -DproxyHost= 35 | -DproxyPort= 36 | -Dhttp.proxyUser= 37 | -Dhttp.proxyPassword= 38 | -server 39 | -Dcom.dynatrace.diagnostics.sizingmodel=demo 40 | -Dcom.dynatrace.diagnostics.isp.preload=false 41 | -Dcom.dynatrace.diagnostics.analyzerMeasuresCacheSize=4096 42 | -Deof=eof 43 | -frontend -------------------------------------------------------------------------------- /Dynatrace-Server/Dockerfile-debian: -------------------------------------------------------------------------------- 1 | #DOCKERFILE FOR DYNATRACE SERVER 2 | FROM debian:jessie 3 | 4 | LABEL maintainer="Blazej Tomaszewski " 5 | 6 | ARG DT_HOME 7 | ARG BUILD_VERSION 8 | ARG VERSION 9 | ARG DT_SERVER_LICENSE_KEY_FILE_URL 10 | ARG CUID 11 | ARG CGID 12 | 13 | ENV INSTALLER_FILE_NAME=dynatrace-full-${BUILD_VERSION}-linux-x86-64.jar 14 | ENV INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${INSTALLER_FILE_NAME} 15 | 16 | ENV DT_INSTALL_DEPS=openjdk-8-jre-headless 17 | ENV DT_RUNTIME_DEPS=curl\ procps 18 | 19 | RUN echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list && \ 20 | apt-get update -y && apt-get install -y --no-install-recommends -t jessie-backports ${DT_INSTALL_DEPS} ${DT_RUNTIME_DEPS} && \ 21 | curl ${CURL_INSECURE:+"--insecure"} -L -o /tmp/${INSTALLER_FILE_NAME} ${INSTALLER_URL} && \ 22 | java -jar /tmp/${INSTALLER_FILE_NAME} -b 64 -t ${DT_HOME} -y && \ 23 | mkdir -p ${DT_HOME}/log/server/dtserver && \ 24 | apt-get remove --purge -y ${DT_INSTALL_DEPS} && \ 25 | rm -rf /var/lib/apt/lists/* /tmp/* 26 | 27 | COPY build/config/dtfrontendserver.ini ${DT_HOME} 28 | COPY build/config/dtserver.ini ${DT_HOME} 29 | COPY build/config/server.config.xml ${DT_HOME}/server/conf 30 | 31 | COPY build/scripts/pull-license-key-file.sh ${DT_HOME} 32 | COPY build/scripts/run-server-process.sh ${DT_HOME} 33 | COPY build/scripts/create-user.sh /tmp 34 | 35 | ENV CUID="${CUID:-0}" 36 | ENV CGID="${CGID:-0}" 37 | RUN /bin/sh -c /tmp/create-user.sh && rm -rf /tmp/* 38 | USER ${CUID}:${CGID} 39 | 40 | ENV DT_HOME=${DT_HOME} 41 | ENV DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 42 | CMD [ "sh", "-c", "${DT_HOME}/pull-license-key-file.sh ; ${DT_HOME}/run-server-process.sh" ] 43 | -------------------------------------------------------------------------------- /Dynatrace-Server/build/config/dtserver.ini: -------------------------------------------------------------------------------- 1 | # WARNING: 2 | # Manual changes in this file, except changes that are related to memory allocation, may cause severe problems and system instability. 3 | # Apply manual changes only if you have explicit instructions from dynaTrace Support. 4 | # Since version 6.0 '-Xmx' and '-Xms' VM arguments are ignored. Please use the '-memory' parameter instead. 5 | # 6 | -basedir 7 | server 8 | -restartonfailure 9 | -memory 10 | demo 11 | -vmargs 12 | -XX:CompileCommand=exclude,java/io/ObjectInputStream.readO* 13 | -Xmx768M 14 | -Xms768M 15 | -XX:+UseConcMarkSweepGC 16 | -XX:+DisableExplicitGC 17 | -XX:CMSInitiatingOccupancyFraction=60 18 | -XX:CMSIncrementalSafetyFactor=40 19 | -XX:+CMSClassUnloadingEnabled 20 | -Djava.endorsed.dirs=lib/endorsed 21 | -Djava.awt.headless=true 22 | -Dosgi.configuration.area=osgi 23 | -Dosgi.checkConfiguration=true 24 | -Dosgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@2:start, org.eclipse.equinox.event@3:start, com.dynatrace.diagnostics.rootpathcorrelation@4:start, com.dynatrace.diagnostics.subpathcorrelation@4:start, analysisstream-elasticsearch@4:start, com.dynatrace.diagnostics.serverbootstrap.jar@5:start, org.eclipse.equinox.ds@start 25 | -Declipse.ignoreApp=true 26 | -Dosgi.noShutdown=true 27 | -Djava.util.logging.manager=com.dynatrace.diagnostics.util.modern.logging.BackendServerLogManager 28 | -Dorg.osgi.framework.language=en 29 | -Dosgi.framework.extensions=com.dynatrace.diagnostics.bootstrap.hook 30 | -Dosgi.nl=en_US 31 | -Dosgi.nl.user=en_US 32 | -Duser.country=US 33 | -Duser.language=en 34 | -DproxyHost= 35 | -DproxyPort= 36 | -Dhttp.proxyUser= 37 | -Dhttp.proxyPassword= 38 | -server 39 | -Dcom.dynatrace.diagnostics.sizingmodel=demo 40 | -Dcom.dynatrace.diagnostics.analyzerMeasuresCacheSize=4096 41 | -Dcom.dynatrace.diagnostics.filestore.numStorageThreads=1 -------------------------------------------------------------------------------- /Dynatrace-Server/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtserver: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | - DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 12 | - CUID=${CUID} 13 | - CGID=${CGID} 14 | container_name: "${DT_SERVER_NAME}" 15 | image: "dynatrace/server:7.0" 16 | environment: 17 | - COMPOSE_PROJECT_NAME 18 | - DT_SERVER_LICENSE_KEY_FILE_URL 19 | ports: 20 | # Browser to server ports NonSSL 8020 SSL 8021 (to start the Webstart Client) 21 | - "${APPMON_WEB_CLIENT_NONSSL_PORT:-8020}:8020" 22 | - "${APPMON_WEB_CLIENT_SSL_PORT:-8021}:8021" 23 | # 9911 AppMon Web 24 | - "${APPMON_WEB_SSL_PORT:-9911}:9911" 25 | # 8040 Non SSL Collector to server port for Web Base Agents (or direct agent to server) 26 | # 8041 SSL Collector to server port for Web Base Agents (or direct agent to server) 27 | - "${APPMON_ONEAGENT_NONSSL_SERVER_PORT:-8040}:8040" 28 | - "${APPMON_ONEAGENT_SSL_SERVER_PORT:-8041}:8041" 29 | # 2021 Client to Frontend Server - non SSL 30 | - "${APPMON_CLIENT_NONSSL_PORT:-2021}:2021" 31 | # 8023 Client to Frontend Server - encrypted via HTTP tunnel 32 | - "${APPMON_CLIENT_SSL_PORT:-8023}:8023" 33 | # 6699 Collector to Server SSL 34 | - "${APPMON_COLLECTOR_SERVER_SSL_PORT:-6699}:6699" 35 | # 9998 - Legacy Agent to server embedded Collector (default) 36 | volumes: 37 | - "${DT_SERVER_LOG_PATH_ON_HOST}:${DT_HOME}/log/server/dtserver" 38 | networks: 39 | - appmon 40 | user: "${CUID}:${CGID}" 41 | 42 | networks: 43 | appmon: 44 | driver: bridge 45 | -------------------------------------------------------------------------------- /Dynatrace-Server/docker-compose-debian.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtserver: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile-debian 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | - DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 12 | - CUID=${CUID} 13 | - CGID=${CGID} 14 | container_name: "${DT_SERVER_NAME}" 15 | image: "dynatrace/server:7.0" 16 | environment: 17 | - COMPOSE_PROJECT_NAME 18 | - DT_SERVER_LICENSE_KEY_FILE_URL 19 | ports: 20 | # Browser to server ports NonSSL 8020 SSL 8021 (to start the Webstart Client) 21 | - "${APPMON_WEB_CLIENT_NONSSL_PORT:-8020}:8020" 22 | - "${APPMON_WEB_CLIENT_SSL_PORT:-8021}:8021" 23 | # 9911 AppMon Web 24 | - "${APPMON_WEB_SSL_PORT:-9911}:9911" 25 | # 8040 Non SSL Collector to server port for Web Base Agents (or direct agent to server) 26 | # 8041 SSL Collector to server port for Web Base Agents (or direct agent to server) 27 | - "${APPMON_ONEAGENT_NONSSL_SERVER_PORT:-8040}:8040" 28 | - "${APPMON_ONEAGENT_SSL_SERVER_PORT:-8041}:8041" 29 | # 2021 Client to Frontend Server - non SSL 30 | - "${APPMON_CLIENT_NONSSL_PORT:-2021}:2021" 31 | # 8023 Client to Frontend Server - encrypted via HTTP tunnel 32 | - "${APPMON_CLIENT_SSL_PORT:-8023}:8023" 33 | # 6699 Collector to Server SSL 34 | - "${APPMON_COLLECTOR_SERVER_SSL_PORT:-6699}:6699" 35 | # 9998 - Legacy Agent to server embedded Collector (default) 36 | volumes: 37 | - "${DT_SERVER_LOG_PATH_ON_HOST}:${DT_HOME}/log/server/dtserver" 38 | networks: 39 | - appmon 40 | user: "${CUID}:${CGID}" 41 | 42 | networks: 43 | appmon: 44 | driver: bridge 45 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/scripts/run-wsagent.ps1: -------------------------------------------------------------------------------- 1 | If (!($env:DT_HOME)) { $env:DT_HOME = "c:\dynatrace" } 2 | If (!($env:DT_AGENT_NAME)) { $env:DT_AGENT_NAME = "dtagent" } 3 | If (!($env:DT_AGENT_LOG_LEVEL)) { $env:DT_AGENT_LOG_LEVEL = "info" } 4 | 5 | # Attempt to auto-discover the Dynatrace Collector through the environment when 6 | # the container has been --linked to a 'dynatrace/collector' container instance 7 | # with a link alias 'dtcollector'. 8 | # 9 | # Example: docker run --link dtcollector-1:dtcollector httpd 10 | # 11 | # Auto-discovery can be overridden by providing the $COLLECTOR variable through 12 | # the environment. 13 | If (!($env:DT_COLLECTOR_NAME)) { $env:DT_COLLECTOR_NAME = "dtcollector" } 14 | If (!($env:APPMON_COLLECTOR_PORT)) { $env:APPMON_COLLECTOR_PORT = "9998" } 15 | $COLLECTOR = $env:DT_COLLECTOR_NAME + ":" + $env:APPMON_COLLECTOR_PORT 16 | 17 | $WSAGENT_INI = $env:DT_HOME + "\agent\conf\dtwsagent.ini" 18 | 19 | $dtwsagent = Get-Content $WSAGENT_INI 20 | $dtwsagent = $dtwsagent -replace "Name dtwsagent","Name $env:DT_AGENT_NAME" 21 | $dtwsagent = $dtwsagent -replace "Server localhost","Server $COLLECTOR" 22 | $dtwsagent = $dtwsagent -replace "Loglevel info","Loglevel $env:DT_AGENT_LOG_LEVEL" 23 | $dtwsagent | Out-File $WSAGENT_INI -Encoding UTF8 24 | 25 | New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist\1 -PropertyType String -Name "name" -Value "$env:DT_AGENT_NAME" 26 | New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist\1 -PropertyType String -Name "server" -Value "$env:DT_COLLECTOR_NAME" 27 | New-ItemProperty -Path HKLM:\SOFTWARE\Wow6432Node\dynaTrace\Agent\Whitelist\1 -PropertyType String -Name "port" -Value "$env:APPMON_COLLECTOR_PORT" 28 | 29 | Import-Module WebAdministration 30 | Enable-WebGlobalModule -Name "dynaTrace IIS Webserver Agent" 31 | Enable-WebGlobalModule -Name "dynaTrace IIS Webserver Agent (x64)" 32 | 33 | Start-Service -Name "Dynatrace Web Server Agent $env:VERSION" -------------------------------------------------------------------------------- /Dynatrace-Collector/Dockerfile: -------------------------------------------------------------------------------- 1 | #DOCKERFILE FOR DYNATRACE COLLECTOR 2 | FROM alpine:3.5 3 | 4 | LABEL maintainer="Blazej Tomaszewski " 5 | 6 | ARG DT_HOME 7 | ARG BUILD_VERSION 8 | ARG VERSION 9 | ARG CUID 10 | ARG CGID 11 | 12 | ENV INSTALLER_FILE_NAME=dynatrace-collector-${BUILD_VERSION}-linux-x86.jar 13 | ENV INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${INSTALLER_FILE_NAME} 14 | 15 | ENV DT_INSTALL_DEPS=curl\ openjdk8-jre-base 16 | ENV DT_RUNTIME_DEPS=bash 17 | 18 | RUN apk update && apk add --no-cache ${DT_INSTALL_DEPS} ${DT_RUNTIME_DEPS} && \ 19 | curl ${CURL_INSECURE:+"--insecure"} -L -o /tmp/${INSTALLER_FILE_NAME} ${INSTALLER_URL} && \ 20 | java -jar /tmp/${INSTALLER_FILE_NAME} -b 64 -t ${DT_HOME} -y && \ 21 | mkdir -p ${DT_HOME}/log/collector/dtcollector && \ 22 | apk del ${DT_INSTALL_DEPS} && \ 23 | rm -rf /tmp/* 24 | 25 | ENV GLIBC_RUNTIME_DEPS=libgcc 26 | 27 | COPY build/bin/glibc-2.21-r2.apk /tmp 28 | COPY build/bin/glibc-bin-2.21-r2.apk /tmp 29 | 30 | RUN apk add --no-cache ${GLIBC_RUNTIME_DEPS} && \ 31 | apk add --allow-untrusted /tmp/glibc-2.21-r2.apk && \ 32 | apk add --allow-untrusted /tmp/glibc-bin-2.21-r2.apk && \ 33 | /usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib && \ 34 | rm -rf /tmp/* 35 | 36 | # Make sure that hostname resolution looks up /etc/hosts prior to /etc/resolv.conf 37 | RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf 38 | 39 | ENV WAIT_FOR_CMD_RUNTIME_DEPS=netcat-openbsd 40 | COPY build/scripts/wait-for-cmd.sh /usr/local/bin 41 | RUN apk add --no-cache ${WAIT_FOR_CMD_RUNTIME_DEPS} 42 | 43 | COPY build/scripts/create-user.sh /tmp 44 | ENV CUID="${CUID:-0}" 45 | ENV CGID="${CGID:-0}" 46 | RUN /bin/sh -c /tmp/create-user.sh && rm -rf /tmp/* 47 | USER ${CUID}:${CGID} 48 | 49 | ENV DT_HOME=${DT_HOME} 50 | COPY build/scripts/run-collector-process.sh ${DT_HOME} 51 | CMD [ "sh", "-c", "${DT_HOME}/run-collector-process.sh" ] 52 | -------------------------------------------------------------------------------- /run-as-nonroot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | REBUILD="false" 4 | FILENAME="" 5 | 6 | while getopts ":f:b" opt; do 7 | case $opt in 8 | f) 9 | FILENAME="$OPTARG" 10 | ;; 11 | b) 12 | REBUILD="true" 13 | ;; 14 | \?) 15 | echo "Invalid option: -$OPTARG" >&2 16 | exit 1 17 | ;; 18 | :) 19 | echo "Option -$OPTARG requires an argument." >&2 20 | exit 1 21 | ;; 22 | esac 23 | done 24 | 25 | DT_SERVER_LOG_PATH_ON_HOST=${DT_SERVER_LOG_PATH_ON_HOST:-"/tmp/log/dynatrace/servers/dtserver"} 26 | DT_COLLECTOR_LOG_PATH_ON_HOST=${DT_COLLECTOR_LOG_PATH_ON_HOST:-"/tmp/log/dynatrace/collectors/dtcollector"} 27 | DT_AGENT_LOG_PATH_ON_HOST=${DT_AGENT_LOG_PATH_ON_HOST:-"/tmp/log/dynatrace/agents/dtagent"} 28 | 29 | mkdir -p ${DT_SERVER_LOG_PATH_ON_HOST} 30 | mkdir -p ${DT_COLLECTOR_LOG_PATH_ON_HOST} 31 | mkdir -p ${DT_AGENT_LOG_PATH_ON_HOST} 32 | 33 | OWNER=$(stat -c '%U' ${DT_SERVER_LOG_PATH_ON_HOST}) 34 | if [ "${OWNER}" != "${USER}" ] ; then 35 | echo "Directory has invalid ownership set to '${OWNER}', change it to current user or remove it: ${DT_SERVER_LOG_PATH_ON_HOST}" >&2 36 | echo "Aborting..." >&2 37 | exit 1 38 | fi 39 | 40 | OWNER=$(stat -c '%U' ${DT_COLLECTOR_LOG_PATH_ON_HOST}) 41 | if [ "${OWNER}" != "${USER}" ] ; then 42 | echo "Directory has invalid ownership set to '${OWNER}', change it to current user or remove it: ${DT_COLLECTOR_LOG_PATH_ON_HOST}" >&2 43 | echo "Aborting..." >&2 44 | exit 1 45 | fi 46 | 47 | OWNER=$(stat -c '%U' ${DT_AGENT_LOG_PATH_ON_HOST}) 48 | if [ "${OWNER}" != "${USER}" ] ; then 49 | echo "Directory has invalid ownership set to '${OWNER}', change it to current user or remove it: ${DT_AGENT_LOG_PATH_ON_HOST}" >&2 50 | echo "Aborting..." >&2 51 | exit 1 52 | fi 53 | 54 | PARAMS="" 55 | if [ ! -z "$FILENAME" ] ; then 56 | PARAMS="$PARAMS -f $FILENAME" 57 | fi 58 | PARAMS="$PARAMS up -d" 59 | if [ "$REBUILD" = "true" ] ; then 60 | PARAMS="$PARAMS --build" 61 | fi 62 | 63 | docker-compose ${PARAMS} -------------------------------------------------------------------------------- /Dynatrace-Agent/build/scripts/run-wsagent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | AGENT_NAME=${DT_AGENT_NAME:-"dtagent"} 3 | LOG_LEVEL=${DT_AGENT_LOG_LEVEL:-"info"} 4 | 5 | # Attempt to auto-discover the Dynatrace Collector through the environment when 6 | # the container has been --linked to a 'dynatrace/collector' container instance 7 | # with a link alias 'dtcollector'. 8 | # 9 | # Example: docker run --link dtcollector-1:dtcollector httpd 10 | # 11 | # Auto-discovery can be overridden by providing the $COLLECTOR variable through 12 | # the environment. 13 | COLLECTOR_HOST_NAME=${DT_COLLECTOR_NAME:-"dtcollector"} 14 | COLLECTOR_PORT=${APPMON_COLLECTOR_PORT:-"9998"} 15 | COLLECTOR=${DT_AGENT_COLLECTOR:-"${COLLECTOR_HOST_NAME}:${COLLECTOR_PORT}"} 16 | 17 | # Attempt to auto-discover the Dynatrace Web Server Agent binary through 18 | # the environment when the container has been --linked to a 'dynatrace/agent' 19 | # container instance with a link alias 'dtagent'. 20 | # 21 | # Example: docker run --link dtagent-1:dtagent httpd 22 | # 23 | # Auto-discovery can be overridden by providing the $WSAGENT_BIN variable 24 | # through the environment, or as the first argument to this script. 25 | WSAGENT_BIN=${1:-"${DTAGENT_ENV_WSAGENT_BIN64}"} 26 | if [ -z ${WSAGENT_BIN} ]; then 27 | WSAGENT_BIN=${DT_HOME}/agent/lib64/dtwsagent 28 | fi 29 | 30 | # Attempt to auto-discover the Dynatrace Web Server Agent configuration through 31 | # the environment when the container has been --linked to a 'dynatrace/agent' 32 | # container instance with a link alias 'dtagent'. 33 | # 34 | # Example: docker run --link dtagent-1:dtagent httpd 35 | # 36 | # Auto-discovery can be overridden by providing the $WSAGENT_INI variable 37 | # through the environment, or as the second argument to this script. 38 | WSAGENT_INI=${2:-"${DTAGENT_ENV_WSAGENT_INI}"} 39 | if [ -z ${WSAGENT_INI} ]; then 40 | WSAGENT_INI=${DT_HOME}/agent/conf/dtwsagent.ini 41 | fi 42 | 43 | sed -i -r "s/^#?Name.*/Name ${AGENT_NAME}/;s/^#?Server.*/Server ${COLLECTOR}/;s/^#?Loglevel.*/Loglevel ${LOG_LEVEL}/;s/^#?ConsoleLoglevel.*/ConsoleLoglevel ${LOG_LEVEL}/" ${WSAGENT_INI} 44 | 45 | ${WSAGENT_BIN} & 46 | -------------------------------------------------------------------------------- /Dynatrace-Agent/Dockerfile: -------------------------------------------------------------------------------- 1 | #DOCKERFILE FOR DYNATRACE AGENT 2 | FROM alpine:3.5 3 | 4 | LABEL maintainer="Blazej Tomaszewski " 5 | 6 | ARG DT_HOME 7 | ARG BUILD_VERSION 8 | ARG VERSION 9 | ARG CUID 10 | ARG CGID 11 | 12 | ENV AGENT_INSTALLER_NAME=dynatrace-agent-${BUILD_VERSION}-unix.jar 13 | ENV WSAGENT_INSTALLER32_NAME=dynatrace-wsagent-${BUILD_VERSION}-linux-x86-32.tar 14 | ENV WSAGENT_INSTALLER64_NAME=dynatrace-wsagent-${BUILD_VERSION}-linux-x86-64.tar 15 | ENV NODE_AGENT_INSTALLER_NAME=dynatrace-one-agent-nodejs-${BUILD_VERSION}-linux-x86.tgz 16 | ENV AGENT_INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${AGENT_INSTALLER_NAME} 17 | ENV WSAGENT_INSTALLER32_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${WSAGENT_INSTALLER32_NAME} 18 | ENV WSAGENT_INSTALLER64_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${WSAGENT_INSTALLER64_NAME} 19 | ENV NODE_AGENT_INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${NODE_AGENT_INSTALLER_NAME} 20 | 21 | ENV SLAVE_AGENT_PORT=8001 22 | 23 | ENV DT_INSTALL_DEPS=curl\ openjdk8-jre-base 24 | ENV DT_RUNTIME_DEPS=bash 25 | 26 | COPY build/scripts/install-agent.sh /usr/bin 27 | COPY build/scripts/install-node-agent.sh /usr/bin 28 | COPY build/scripts/install-wsagent.sh /usr/bin 29 | 30 | RUN apk update && apk add --no-cache ${DT_INSTALL_DEPS} ${DT_RUNTIME_DEPS} && \ 31 | mkdir -p ${DT_HOME} && \ 32 | /usr/bin/install-agent.sh ${AGENT_INSTALLER_URL} && \ 33 | /usr/bin/install-wsagent.sh ${WSAGENT_INSTALLER32_URL} && \ 34 | /usr/bin/install-wsagent.sh ${WSAGENT_INSTALLER64_URL} && \ 35 | /usr/bin/install-node-agent.sh ${NODE_AGENT_INSTALLER_URL} && \ 36 | mkdir -p ${DT_HOME}/log/agent && \ 37 | apk del ${DT_INSTALL_DEPS} 38 | 39 | ADD build/bin/dtnginx_offsets.json.tar.gz ${DT_HOME}/agent/conf 40 | COPY build/scripts/run-wsagent.sh ${DT_HOME} 41 | 42 | COPY build/scripts/create-user.sh /tmp 43 | ENV CUID="${CUID:-0}" 44 | ENV CGID="${CGID:-0}" 45 | RUN /bin/sh -c /tmp/create-user.sh && rm -rf /tmp/* 46 | USER ${CUID}:${CGID} 47 | 48 | CMD while true; do sleep 1; done 49 | -------------------------------------------------------------------------------- /Dynatrace-Agent/Dockerfile-debian: -------------------------------------------------------------------------------- 1 | #DOCKERFILE FOR DYNATRACE AGENT 2 | FROM debian:jessie 3 | 4 | LABEL maintainer="Blazej Tomaszewski " 5 | 6 | ARG DT_HOME 7 | ARG BUILD_VERSION 8 | ARG VERSION 9 | 10 | ENV AGENT_INSTALLER_NAME=dynatrace-agent-${BUILD_VERSION}-unix.jar 11 | ENV WSAGENT_INSTALLER32_NAME=dynatrace-wsagent-${BUILD_VERSION}-linux-x86-32.tar 12 | ENV WSAGENT_INSTALLER64_NAME=dynatrace-wsagent-${BUILD_VERSION}-linux-x86-64.tar 13 | ENV NODE_AGENT_INSTALLER_NAME=dynatrace-one-agent-nodejs-${BUILD_VERSION}-linux-x86.tgz 14 | ENV AGENT_INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${AGENT_INSTALLER_NAME} 15 | ENV WSAGENT_INSTALLER32_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${WSAGENT_INSTALLER32_NAME} 16 | ENV WSAGENT_INSTALLER64_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${WSAGENT_INSTALLER64_NAME} 17 | ENV NODE_AGENT_INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${NODE_AGENT_INSTALLER_NAME} 18 | 19 | ENV SLAVE_AGENT_PORT=8001 20 | 21 | ENV DT_INSTALL_DEPS=curl\ default-jre-headless 22 | ENV DT_RUNTIME_DEPS=procps 23 | 24 | COPY build/scripts/install-agent.sh /usr/bin 25 | COPY build/scripts/install-node-agent.sh /usr/bin 26 | COPY build/scripts/install-wsagent.sh /usr/bin 27 | 28 | RUN apt-get update -y && apt-get install -y --no-install-recommends ${DT_INSTALL_DEPS} ${DT_RUNTIME_DEPS} && \ 29 | mkdir -p ${DT_HOME} && \ 30 | /usr/bin/install-agent.sh ${AGENT_INSTALLER_URL} && \ 31 | /usr/bin/install-wsagent.sh ${WSAGENT_INSTALLER32_URL} && \ 32 | /usr/bin/install-wsagent.sh ${WSAGENT_INSTALLER64_URL} && \ 33 | /usr/bin/install-node-agent.sh ${NODE_AGENT_INSTALLER_URL} && \ 34 | mkdir -p ${DT_HOME}/log/agent && \ 35 | rm -rf /tmp/* && \ 36 | apt-get remove --purge -y ${DT_INSTALL_DEPS} && \ 37 | rm -rf /var/lib/apt/lists/* 38 | ADD build/bin/dtnginx_offsets.json.tar.gz ${DT_HOME}/agent/conf 39 | COPY build/scripts/run-wsagent.sh ${DT_HOME} 40 | 41 | COPY build/scripts/create-user.sh /tmp 42 | ENV CUID="${CUID:-0}" 43 | ENV CGID="${CGID:-0}" 44 | RUN /bin/sh -c /tmp/create-user.sh && rm -rf /tmp/* 45 | USER ${CUID}:${CGID} 46 | 47 | CMD while true; do sleep 1; done 48 | -------------------------------------------------------------------------------- /Dynatrace-Server/Dockerfile: -------------------------------------------------------------------------------- 1 | #DOCKERFILE FOR DYNATRACE SERVER 2 | FROM alpine:3.5 3 | 4 | LABEL maintainer="Blazej Tomaszewski " 5 | 6 | ARG DT_HOME 7 | ARG BUILD_VERSION 8 | ARG VERSION 9 | ARG DT_SERVER_LICENSE_KEY_FILE_URL 10 | ARG CUID 11 | ARG CGID 12 | 13 | ENV INSTALLER_FILE_NAME=dynatrace-full-${BUILD_VERSION}-linux-x86-64.jar 14 | ENV INSTALLER_URL=https://files.dynatrace.com/downloads/OnPrem/dynaTrace/${VERSION}/${BUILD_VERSION}/${INSTALLER_FILE_NAME} 15 | 16 | ENV DT_INSTALL_DEPS=openjdk8-jre-base 17 | ENV DT_RUNTIME_DEPS=bash\ curl 18 | 19 | RUN apk update && apk add --no-cache ${DT_INSTALL_DEPS} ${DT_RUNTIME_DEPS} && \ 20 | curl ${CURL_INSECURE:+"--insecure"} -L -o /tmp/${INSTALLER_FILE_NAME} ${INSTALLER_URL} && \ 21 | java -jar /tmp/${INSTALLER_FILE_NAME} -b 64 -t ${DT_HOME} -y && \ 22 | mkdir -p ${DT_HOME}/log/server/dtserver && \ 23 | apk del ${DT_INSTALL_DEPS} && \ 24 | rm -rf /tmp/* 25 | RUN sed -i '/^-memory/,/^unsupported/c\-memory\ndemo' ${DT_HOME}/dtserver.ini && \ 26 | sed -i '/^-memory/,/^unsupported/c\-memory\ndemo' ${DT_HOME}/dtfrontendserver.ini && \ 27 | echo '-Dcom.dynatrace.diagnostics.filestore.numStorageThreads=1' >> ${DT_HOME}/dtserver.ini 28 | 29 | COPY build/config/server.config.xml ${DT_HOME}/server/conf 30 | 31 | ENV GLIBC_RUNTIME_DEPS=libgcc 32 | 33 | COPY build/bin/glibc-2.21-r2.apk /tmp 34 | COPY build/bin/glibc-bin-2.21-r2.apk /tmp 35 | 36 | RUN apk add --no-cache ${GLIBC_RUNTIME_DEPS} && \ 37 | apk add --allow-untrusted /tmp/glibc-2.21-r2.apk && \ 38 | apk add --allow-untrusted /tmp/glibc-bin-2.21-r2.apk && \ 39 | /usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib && \ 40 | rm -rf /tmp/* 41 | 42 | # Make sure that hostname resolution looks up /etc/hosts prior to /etc/resolv.conf 43 | RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf 44 | 45 | COPY build/scripts/pull-license-key-file.sh ${DT_HOME} 46 | COPY build/scripts/run-server-process.sh ${DT_HOME} 47 | COPY build/scripts/create-user.sh /tmp 48 | 49 | ENV CUID="${CUID:-0}" 50 | ENV CGID="${CGID:-0}" 51 | RUN /bin/sh -c /tmp/create-user.sh && rm -rf /tmp/* 52 | USER ${CUID}:${CGID} 53 | 54 | ENV DT_HOME=${DT_HOME} 55 | ENV DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 56 | CMD [ "sh", "-c", "${DT_HOME}/pull-license-key-file.sh ; ${DT_HOME}/run-server-process.sh" ] 57 | -------------------------------------------------------------------------------- /docker-compose-withoutCollector.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtserver: 4 | build: 5 | context: ./Dynatrace-Server 6 | args: 7 | - DT_HOME=${DT_HOME} 8 | - VERSION=${VERSION} 9 | - BUILD_VERSION=${BUILD_VERSION} 10 | - DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 11 | - CUID=${CUID} 12 | - CGID=${CGID} 13 | container_name: "${DT_SERVER_NAME}" 14 | image: "dynatrace/server:7.0" 15 | environment: 16 | - COMPOSE_PROJECT_NAME 17 | - DT_HOME 18 | - DT_SERVER_LICENSE_KEY_FILE_URL 19 | - APPMON_COLLECTOR_SERVER_SSL_PORT 20 | ports: 21 | # Browser to server ports NonSSL 8020 SSL 8021 (to start the Webstart Client) 22 | - "${APPMON_WEB_CLIENT_NONSSL_PORT:-8020}:8020" 23 | - "${APPMON_WEB_CLIENT_SSL_PORT:-8021}:8021" 24 | # 9911 AppMon Web 25 | - "${APPMON_WEB_SSL_PORT:-9911}:9911" 26 | # 8040 Non SSL Collector to server port for Web Base Agents (or direct agent to server) 27 | # 8041 SSL Collector to server port for Web Base Agents (or direct agent to server) 28 | - "${APPMON_ONEAGENT_NONSSL_SERVER_PORT:-8040}:8040" 29 | - "${APPMON_ONEAGENT_SSL_SERVER_PORT:-8041}:8041" 30 | # 2021 Client to Frontend Server - non SSL 31 | - "${APPMON_CLIENT_NONSSL_PORT:-2021}:2021" 32 | # 8023 Client to Frontend Server - encrypted via HTTP tunnel 33 | - "${APPMON_CLIENT_SSL_PORT:-8023}:8023" 34 | # 6699 Collector to Server SSL 35 | - "${APPMON_COLLECTOR_SERVER_SSL_PORT:-6699}:6699" 36 | # 9998 - Legacy Agent to server embedded Collector (default) 37 | volumes: 38 | - "${DT_SERVER_LOG_PATH_ON_HOST}:${DT_HOME}/log/server/dtserver" 39 | networks: 40 | - appmon 41 | user: "${CUID}:${CGID}" 42 | 43 | dtagent: 44 | build: 45 | context: ./Dynatrace-Agent 46 | args: 47 | - DT_HOME=${DT_HOME} 48 | - VERSION=${VERSION} 49 | - BUILD_VERSION=${BUILD_VERSION} 50 | container_name: "${DT_AGENT_NAME}" 51 | image: "dynatrace/agent:7.0" 52 | environment: 53 | - COMPOSE_PROJECT_NAME 54 | - DT_HOME 55 | - DT_AGENT_COLLECTOR="${DT_COLLECTOR_NAME}:9998" 56 | - AGENT_LIB32 57 | - AGENT_LIB64 58 | - NODE_AGENT_LIB32 59 | - NODE_AGENT_LIB64 60 | - WSAGENT_BIN64 61 | - WSAGENT_INI 62 | volumes: 63 | - ${DT_HOME} 64 | - ${DT_HOME}/agent/lib64 65 | - "${DT_AGENT_LOG_PATH_ON_HOST}:${DT_HOME}/log/agent" 66 | networks: 67 | - appmon 68 | 69 | networks: 70 | appmon: 71 | driver: bridge 72 | -------------------------------------------------------------------------------- /docker-compose-debian-withoutCollector.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtserver: 4 | build: 5 | context: ./Dynatrace-Server 6 | dockerfile: Dockerfile-debian 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | - DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 12 | - CUID=${CUID} 13 | - CGID=${CGID} 14 | container_name: "${DT_SERVER_NAME}" 15 | image: "dynatrace/server:7.0-debian" 16 | environment: 17 | - COMPOSE_PROJECT_NAME 18 | - DT_HOME 19 | - DT_SERVER_LICENSE_KEY_FILE_URL 20 | - APPMON_COLLECTOR_SERVER_SSL_PORT 21 | ports: 22 | # Browser to server ports NonSSL 8020 SSL 8021 (to start the Webstart Client) 23 | - "${APPMON_WEB_CLIENT_NONSSL_PORT:-8020}:8020" 24 | - "${APPMON_WEB_CLIENT_SSL_PORT:-8021}:8021" 25 | # 9911 AppMon Web 26 | - "${APPMON_WEB_SSL_PORT:-9911}:9911" 27 | # 8040 Non SSL Collector to server port for Web Base Agents (or direct agent to server) 28 | # 8041 SSL Collector to server port for Web Base Agents (or direct agent to server) 29 | - "${APPMON_ONEAGENT_NONSSL_SERVER_PORT:-8040}:8040" 30 | - "${APPMON_ONEAGENT_SSL_SERVER_PORT:-8041}:8041" 31 | # 2021 Client to Frontend Server - non SSL 32 | - "${APPMON_CLIENT_NONSSL_PORT:-2021}:2021" 33 | # 8023 Client to Frontend Server - encrypted via HTTP tunnel 34 | - "${APPMON_CLIENT_SSL_PORT:-8023}:8023" 35 | # 6699 Collector to Server SSL 36 | - "${APPMON_COLLECTOR_SERVER_SSL_PORT:-6699}:6699" 37 | # 9998 - Legacy Agent to server embedded Collector (default) 38 | volumes: 39 | - "${DT_SERVER_LOG_PATH_ON_HOST}:${DT_HOME}/log/server/dtserver" 40 | networks: 41 | - appmon 42 | user: "${CUID}:${CGID}" 43 | 44 | dtagent: 45 | build: 46 | context: ./Dynatrace-Agent 47 | dockerfile: Dockerfile-debian 48 | args: 49 | - DT_HOME=${DT_HOME} 50 | - VERSION=${VERSION} 51 | - BUILD_VERSION=${BUILD_VERSION} 52 | container_name: "${DT_AGENT_NAME}" 53 | image: "dynatrace/agent:7.0-debian" 54 | environment: 55 | - COMPOSE_PROJECT_NAME 56 | - DT_HOME 57 | - DT_AGENT_COLLECTOR="${DT_COLLECTOR_NAME}:9998" 58 | - AGENT_LIB32 59 | - AGENT_LIB64 60 | - NODE_AGENT_LIB32 61 | - NODE_AGENT_LIB64 62 | - WSAGENT_BIN64 63 | - WSAGENT_INI 64 | volumes: 65 | - ${DT_HOME} 66 | - ${DT_HOME}/agent/lib64 67 | - "${DT_AGENT_LOG_PATH_ON_HOST}:${DT_HOME}/log/agent" 68 | networks: 69 | - appmon 70 | 71 | networks: 72 | appmon: 73 | driver: bridge 74 | -------------------------------------------------------------------------------- /Dynatrace-Agent-Win/README.md: -------------------------------------------------------------------------------- 1 | ![Docker Logo](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-logo.png) 2 | 3 | # Dynatrace-Agent 4 | 5 | This project contains files for building and running the Dynatrace Agent component of the [Dynatrace Application Monitoring](http://www.dynatrace.com/docker) enterprise solution for deep end-to-end application monitoring in Docker. Ready-made images are available on the [Docker Hub](https://hub.docker.com/r/dynatrace/agent/). Please refer to the [Dynatrace Agent Examples](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Agent-Examples) project for exemplary integrations into Dockerized application processes. 6 | 7 | ## Build image 8 | 9 | In order to build slim version: 10 | ``` 11 | docker-compose build 12 | ``` 13 | 14 | ## Run a container 15 | 16 | [Docker Compose](https://docs.docker.com/compose/) is a tool for defining and running multi-container applications, where an application's services are configured in `docker-compose.yml` files. Typically, you want to use: 17 | 18 | ``` 19 | docker-compose up -d 20 | ``` 21 | or 22 | ``` 23 | docker-compose up -d --build 24 | ``` 25 | 26 | ### Configuration 27 | 28 | Configuration relies on supplying docker-compose with environment variables defined in .env file. Some variables need to be passed to Dockerfile via ARG for correct building an Server image, that's way it is recommended to change variables only in .env file. 29 | 30 | | Environment Variable | Defaults | Description 31 | |:----------------------|:------------------------------------------------|:----------- 32 | | COMPOSE_PROJECT_NAME | "dynatracedocker" | A name of the Project. Also used for network naming. 33 | | DT_HOME | "c:\dynatrace" | Path to dynatrace installation directory 34 | | DT_AGENT_NAME | "dtagent" | A name that applies to both the agent and the container instance. 35 | | DT_COLLECTOR_NAME | "dtcollector" | A name that applies to both the collector and the container instance. 36 | | DT_VERSION | "7.0" | GA version 37 | | DT_BUILD_VERSION | "7.0.0.2469" | Build version 38 | | DT_ENABLE_AGENT | "True" | Enable/Disable agent on container. 39 | 40 | 41 | 42 | ## Problems? Questions? Suggestions? 43 | 44 | This offering is [Dynatrace Community Supported](https://community.dynatrace.com/community/display/DL/Support+Levels#SupportLevels-Communitysupported/NotSupportedbyDynatrace(providedbyacommunitymember)). Feel free to share any problems, questions and suggestions with your peers on the Dynatrace Community's [Application Monitoring & UEM Forum](https://answers.dynatrace.com/spaces/146/index.html). 45 | 46 | ## License 47 | 48 | Licensed under the MIT License. See the [LICENSE](https://github.com/Dynatrace/Dynatrace-Docker/blob/master/LICENSE) file for details. 49 | [![analytics](https://www.google-analytics.com/collect?v=1&t=pageview&_s=1&dl=https%3A%2F%2Fgithub.com%2FdynaTrace&dp=%2FDynatrace-Docker%2FDynatrace-Agent&dt=Dynatrace-Docker%2FDynatrace-Agent&_u=Dynatrace~&cid=github.com%2FdynaTrace&tid=UA-54510554-5&aip=1)]() 50 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtserver: 4 | build: 5 | context: ./Dynatrace-Server 6 | args: 7 | - DT_HOME=${DT_HOME} 8 | - VERSION=${VERSION} 9 | - BUILD_VERSION=${BUILD_VERSION} 10 | - DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 11 | - CUID=${CUID} 12 | - CGID=${CGID} 13 | container_name: "${DT_SERVER_NAME}" 14 | image: "dynatrace/server:7.0" 15 | environment: 16 | - COMPOSE_PROJECT_NAME 17 | - DT_HOME 18 | - DT_SERVER_LICENSE_KEY_FILE_URL 19 | - APPMON_COLLECTOR_SERVER_SSL_PORT 20 | ports: 21 | # Browser to server ports NonSSL 8020 SSL 8021 (to start the Webstart Client) 22 | - "${APPMON_WEB_CLIENT_NONSSL_PORT:-8020}:8020" 23 | - "${APPMON_WEB_CLIENT_SSL_PORT:-8021}:8021" 24 | # 9911 AppMon Web 25 | - "${APPMON_WEB_SSL_PORT:-9911}:9911" 26 | # 8040 Non SSL Collector to server port for Web Base Agents (or direct agent to server) 27 | # 8041 SSL Collector to server port for Web Base Agents (or direct agent to server) 28 | - "${APPMON_ONEAGENT_NONSSL_SERVER_PORT:-8040}:8040" 29 | - "${APPMON_ONEAGENT_SSL_SERVER_PORT:-8041}:8041" 30 | # 2021 Client to Frontend Server - non SSL 31 | - "${APPMON_CLIENT_NONSSL_PORT:-2021}:2021" 32 | # 8023 Client to Frontend Server - encrypted via HTTP tunnel 33 | - "${APPMON_CLIENT_SSL_PORT:-8023}:8023" 34 | # 6699 Collector to Server SSL 35 | - "${APPMON_COLLECTOR_SERVER_SSL_PORT:-6699}:6699" 36 | # 9998 - Legacy Agent to server embedded Collector (default) 37 | volumes: 38 | - "${DT_SERVER_LOG_PATH_ON_HOST}:${DT_HOME}/log/server/dtserver" 39 | networks: 40 | - appmon 41 | user: "${CUID}:${CGID}" 42 | 43 | dtcollector: 44 | build: 45 | context: ./Dynatrace-Collector 46 | args: 47 | - DT_HOME=${DT_HOME} 48 | - VERSION=${VERSION} 49 | - BUILD_VERSION=${BUILD_VERSION} 50 | - CUID=${CUID} 51 | - CGID=${CGID} 52 | container_name: "${DT_COLLECTOR_NAME}" 53 | image: "dynatrace/collector:7.0" 54 | environment: 55 | - COMPOSE_PROJECT_NAME 56 | - DT_HOME 57 | - DT_SERVER_LICENSE_KEY_FILE_URL 58 | - DT_SERVER_NAME 59 | - APPMON_COLLECTOR_PORT 60 | - APPMON_ONEAGENT_NONSSL_PORT 61 | - APPMON_ONEAGENT_SSL_PORT 62 | - APPMON_COLLECTOR_SERVER_SSL_PORT 63 | ports: 64 | # 9998 - Legacy Agent to Collector 65 | - "${APPMON_COLLECTOR_PORT:-9998}:9998" 66 | # 8042 One Agent to Collector non SSL 67 | - "${APPMON_ONEAGENT_NONSSL_PORT:-8042}:8042" 68 | # 8043 One Agent to Collector SSL 69 | - "${APPMON_ONEAGENT_SSL_PORT:-8043}:8043" 70 | volumes: 71 | - "${DT_COLLECTOR_LOG_PATH_ON_HOST}:${DT_HOME}/log/collector/dtcollector" 72 | networks: 73 | - appmon 74 | user: "${CUID}:${CGID}" 75 | 76 | dtagent: 77 | build: 78 | context: ./Dynatrace-Agent 79 | args: 80 | - DT_HOME=${DT_HOME} 81 | - VERSION=${VERSION} 82 | - BUILD_VERSION=${BUILD_VERSION} 83 | - CUID=${CUID} 84 | - CGID=${CGID} 85 | container_name: "${DT_AGENT_NAME}" 86 | image: "dynatrace/agent:7.0" 87 | environment: 88 | - COMPOSE_PROJECT_NAME 89 | - DT_HOME 90 | - DT_AGENT_COLLECTOR="${DT_COLLECTOR_NAME}:9998" 91 | - AGENT_LIB32 92 | - AGENT_LIB64 93 | - NODE_AGENT_LIB32 94 | - NODE_AGENT_LIB64 95 | - WSAGENT_BIN64 96 | - WSAGENT_INI 97 | volumes: 98 | - ${DT_HOME} 99 | - ${DT_HOME}/agent/lib64 100 | - "${DT_AGENT_LOG_PATH_ON_HOST}:${DT_HOME}/log/agent" 101 | networks: 102 | - appmon 103 | user: "${CUID}:${CGID}" 104 | 105 | networks: 106 | appmon: 107 | driver: bridge 108 | -------------------------------------------------------------------------------- /docker-compose-debian.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | dtserver: 4 | build: 5 | context: ./Dynatrace-Server 6 | dockerfile: Dockerfile-debian 7 | args: 8 | - DT_HOME=${DT_HOME} 9 | - VERSION=${VERSION} 10 | - BUILD_VERSION=${BUILD_VERSION} 11 | - DT_SERVER_LICENSE_KEY_FILE_URL=${DT_SERVER_LICENSE_KEY_FILE_URL} 12 | - CUID=${CUID} 13 | - CGID=${CGID} 14 | container_name: "${DT_SERVER_NAME}" 15 | image: "dynatrace/server:7.0-debian" 16 | environment: 17 | - COMPOSE_PROJECT_NAME 18 | - DT_HOME 19 | - DT_SERVER_LICENSE_KEY_FILE_URL 20 | - APPMON_COLLECTOR_SERVER_SSL_PORT 21 | ports: 22 | # Browser to server ports NonSSL 8020 SSL 8021 (to start the Webstart Client) 23 | - "${APPMON_WEB_CLIENT_NONSSL_PORT:-8020}:8020" 24 | - "${APPMON_WEB_CLIENT_SSL_PORT:-8021}:8021" 25 | # 9911 AppMon Web 26 | - "${APPMON_WEB_SSL_PORT:-9911}:9911" 27 | # 8040 Non SSL Collector to server port for Web Base Agents (or direct agent to server) 28 | # 8041 SSL Collector to server port for Web Base Agents (or direct agent to server) 29 | - "${APPMON_ONEAGENT_NONSSL_SERVER_PORT:-8040}:8040" 30 | - "${APPMON_ONEAGENT_SSL_SERVER_PORT:-8041}:8041" 31 | # 2021 Client to Frontend Server - non SSL 32 | - "${APPMON_CLIENT_NONSSL_PORT:-2021}:2021" 33 | # 8023 Client to Frontend Server - encrypted via HTTP tunnel 34 | - "${APPMON_CLIENT_SSL_PORT:-8023}:8023" 35 | # 6699 Collector to Server SSL 36 | - "${APPMON_COLLECTOR_SERVER_SSL_PORT:-6699}:6699" 37 | # 9998 - Legacy Agent to server embedded Collector (default) 38 | volumes: 39 | - "${DT_SERVER_LOG_PATH_ON_HOST}:${DT_HOME}/log/server/dtserver" 40 | networks: 41 | - appmon 42 | user: "${CUID}:${CGID}" 43 | 44 | dtcollector: 45 | build: 46 | context: ./Dynatrace-Collector 47 | dockerfile: Dockerfile-debian 48 | args: 49 | - DT_HOME=${DT_HOME} 50 | - VERSION=${VERSION} 51 | - BUILD_VERSION=${BUILD_VERSION} 52 | - CUID=${CUID} 53 | - CGID=${CGID} 54 | container_name: "${DT_COLLECTOR_NAME}" 55 | image: "dynatrace/collector:7.0-debian" 56 | environment: 57 | - COMPOSE_PROJECT_NAME 58 | - DT_HOME 59 | - DT_SERVER_LICENSE_KEY_FILE_URL 60 | - DT_SERVER_NAME 61 | - APPMON_COLLECTOR_PORT 62 | - APPMON_ONEAGENT_NONSSL_PORT 63 | - APPMON_ONEAGENT_SSL_PORT 64 | - APPMON_COLLECTOR_SERVER_SSL_PORT 65 | ports: 66 | # 9998 - Legacy Agent to Collector 67 | - "${APPMON_COLLECTOR_PORT:-9998}:9998" 68 | # 8042 One Agent to Collector non SSL 69 | - "${APPMON_ONEAGENT_NONSSL_PORT:-8042}:8042" 70 | # 8043 One Agent to Collector SSL 71 | - "${APPMON_ONEAGENT_SSL_PORT:-8043}:8043" 72 | volumes: 73 | - "${DT_COLLECTOR_LOG_PATH_ON_HOST}:${DT_HOME}/log/collector/dtcollector" 74 | networks: 75 | - appmon 76 | user: "${CUID}:${CGID}" 77 | 78 | dtagent: 79 | build: 80 | context: ./Dynatrace-Agent 81 | dockerfile: Dockerfile-debian 82 | args: 83 | - DT_HOME=${DT_HOME} 84 | - VERSION=${VERSION} 85 | - BUILD_VERSION=${BUILD_VERSION} 86 | container_name: "${DT_AGENT_NAME}" 87 | image: "dynatrace/agent:7.0-debian" 88 | environment: 89 | - COMPOSE_PROJECT_NAME 90 | - DT_HOME 91 | - DT_AGENT_COLLECTOR="${DT_COLLECTOR_NAME}:9998" 92 | - AGENT_LIB32 93 | - AGENT_LIB64 94 | - NODE_AGENT_LIB32 95 | - NODE_AGENT_LIB64 96 | - WSAGENT_BIN64 97 | - WSAGENT_INI 98 | volumes: 99 | - ${DT_HOME} 100 | - ${DT_HOME}/agent/lib64 101 | - "${DT_AGENT_LOG_PATH_ON_HOST}:${DT_HOME}/log/agent" 102 | networks: 103 | - appmon 104 | user: "${CUID}:${CGID}" 105 | 106 | networks: 107 | appmon: 108 | driver: bridge 109 | -------------------------------------------------------------------------------- /Dynatrace-Agent/README.md: -------------------------------------------------------------------------------- 1 | ![Docker Logo](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-logo.png) 2 | 3 | # Dynatrace-Agent 4 | 5 | This project contains files for building and running the Dynatrace Master Agent component of the [Dynatrace Application Monitoring](http://www.dynatrace.com/docker) enterprise solution for deep end-to-end application monitoring in Docker. Ready-made images are available on the [Docker Hub](https://hub.docker.com/r/dynatrace/agent/). Please refer to the [Dynatrace Agent Examples](https://github.com/Dynatrace/Dynatrace-AppMon-Docker/tree/master/Dynatrace-Agent-Examples) project for exemplary integrations into Dockerized application processes. 6 | 7 | ## How to install Dynatrace AppMon Master Agent? 8 | 9 | *By default, we use root user for running containers. It is a bad practice so, if you can, you should run them as non-root. Go to the `Running Dynatrace Appmon Master Agent as non-root` paragraph for running and configuration instructions.* 10 | 11 | ### Running Dynatrace Appmon Master Agent as root 12 | 13 | If you don't need to use a non-root or dedicated user to run Dynatrace Appmon Master Agent, you can quickly bring up an entire Dockerized Dynatrace AppMon environment by using [Docker Compose](https://docs.docker.com/compose/) with the provided `docker-compose.yml` file like so : 14 | 15 | ``` 16 | git clone https://github.com/Dynatrace/Dynatrace-AppMon-Docker.git 17 | cd Dynatrace-AppMon-Docker/Dynatrace-Agent 18 | docker-compose up -d 19 | ``` 20 | In order to browse logs produced by the service you can use: 21 | ``` 22 | docker-compose logs -f 23 | ``` 24 | 25 | ### Running Dynatrace Appmon Master Agent as non-root 26 | 27 | For the security reasons, as Docker co-uses the host kernel, all Dynatrace Appmon services are recommended to be run as non-root user. Therefore, you should operate on dedicated user on your host machine and **set `CUID` (User ID) and `CGID` (Group ID) variables in `.env` file for your user**. By default it uses root. During image builds, user with the same ids will be created and used for running containers. 28 | 29 | After you change user/group id variables, you may run Dynatrace Appmon Master Agent in two ways: 30 | * executing `run-dtagent-as-nonroot.sh` script as dedicated user. This user should be able to run docker services (he should be added to the docker group). Example: `./run-dtagent-as-nonroot.sh -f docker-compose-debian.yml -b`, where `-b` states for docker-compose's `--build` 31 | 32 | or 33 | * running `docker-compose up` **after** making sure that host directory for `DT_AGENT_LOG_PATH_ON_HOST` is created and ownership is set to your dedicated user. Otherwise logs will not be available for you on host machine and service might not run due to permission denied error. 34 | 35 | 36 | ### Configuration 37 | 38 | Configuration relies on supplying docker-compose with environment variables defined in .env file. Some variables need to be passed to Dockerfile via ARG for correct building an Server image, that's way it is recommended to change variables only in .env file. 39 | 40 | | Environment Variable | Defaults | Description 41 | |:----------------------|:------------------------------------------------|:----------- 42 | | COMPOSE_PROJECT_NAME | "dynatracedocker" | A name of the Project. Also used for network naming. 43 | | DT_HOME | "/opt/dynatrace" | Path to dynatrace installation directory 44 | | DT_AGENT_NAME | "dtagent" | A name that applies to both the agent and the container instance. 45 | | DT_COLLECTOR_NAME | "dtcollector" | A name that applies to both the collector and the container instance. 46 | | AGENT_LIB32 | "/agent/lib/libdtagent.so" | Relative path to 32 bit libdtagent.so 47 | | AGENT_LIB64 | "/agent/lib64/libdtagent.so" | Relative path to 64 bit libdtagent.so 48 | | NODE_AGENT_LIB32 | "/agent/bin/linux-x86-32/liboneagentloader.so" | Relative path to 32 bit liboneagentloader.so 49 | | NODE_AGENT_LIB64 | "/agent/bin/linux-x86-64/liboneagentloader.so" | Relative path to 64 bit liboneagentloader.so 50 | | WSAGENT_BIN64 | "/agent/lib64/dtwsagent" | Relative path to dtwsagent 51 | | WSAGENT_INI | "/agent/conf/dtwsagent.ini" | Relative path to dtwsagent.ini 52 | | VERSION | "7.0" | GA version 53 | | BUILD_VERSION | "7.0.0.2469" | Build version 54 | | CUID | 0 | User ID of the user that is used in the docker container 55 | | CGID | 0 | Group ID of the user that is used in the docker container 56 | | DT_AGENT_LOG_PATH_ON_HOST | /tmp/log/dynatrace/agents/dtagent | Log path on the host 57 | 58 | 59 | **Master Agent** (`dtagent`) service only prepares required libraries and installation scripts for triggering agents. Running and configuring agents is manual action done by the user. Examples are [here](https://github.com/Dynatrace/Dynatrace-AppMon-Docker/tree/master/Dynatrace-Agent-Examples). 60 | If you are not familiar with Appmon Agents concept, please read: [Agents Overview](https://www.dynatrace.com/support/doc/appmon/application-monitoring/agents/), [Agents Installation](https://www.dynatrace.com/support/doc/appmon/installation/install-agents/), [Agents Configuration](https://www.dynatrace.com/support/doc/appmon/installation/set-up-agents/) 61 | 62 | 63 | ## Problems? Questions? Suggestions? 64 | 65 | This offering is [Dynatrace Community Supported](https://community.dynatrace.com/community/display/DL/Support+Levels#SupportLevels-Communitysupported/NotSupportedbyDynatrace(providedbyacommunitymember)). Feel free to share any problems, questions and suggestions with your peers on the Dynatrace Community's [Application Monitoring & UEM Forum](https://answers.dynatrace.com/spaces/146/index.html). 66 | 67 | ## License 68 | 69 | Licensed under the MIT License. See the [LICENSE](https://github.com/Dynatrace/Dynatrace-Docker/blob/master/LICENSE) file for details. 70 | [![analytics](https://www.google-analytics.com/collect?v=1&t=pageview&_s=1&dl=https%3A%2F%2Fgithub.com%2FdynaTrace&dp=%2FDynatrace-Docker%2FDynatrace-Agent&dt=Dynatrace-Docker%2FDynatrace-Agent&_u=Dynatrace~&cid=github.com%2FdynaTrace&tid=UA-54510554-5&aip=1)]() 71 | -------------------------------------------------------------------------------- /Dynatrace-Server/README.md: -------------------------------------------------------------------------------- 1 | ![Docker Logo](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-logo.png) 2 | 3 | # Dynatrace-Server 4 | 5 | This project contains files for building and running the Dynatrace Server component of the [Dynatrace Application Monitoring](http://www.dynatrace.com/docker) enterprise solution for deep end-to-end application monitoring in Docker. Ready-made images are available on the [Docker Hub](https://hub.docker.com/r/dynatrace/server/). 6 | 7 | **Note**: the `dynatrace/server` image has been designed to run in low-traffic, resource-constrained **demo and trial environments**. Dynatrace does not support its use in production or pre-production grade environments of any kind. 8 | 9 | ## How to install Dynatrace AppMon Server? 10 | 11 | *By default, we use root user for running containers. It is a bad practice so, if you can, you should run them as non-root. Go to the `Running Dynatrace Appmon Server as non-root` paragraph for running and configuration instructions.* 12 | 13 | ### Running Dynatrace Appmon Server as root 14 | 15 | If you don't need to use a non-root or dedicated user to run Dynatrace Appmon Server, you can quickly bring up an entire Dockerized Dynatrace AppMon environment by using [Docker Compose](https://docs.docker.com/compose/) with the provided `docker-compose.yml` file like so : 16 | 17 | ``` 18 | git clone https://github.com/Dynatrace/Dynatrace-AppMon-Docker.git 19 | cd Dynatrace-AppMon-Docker/Dynatrace-Server 20 | docker-compose up -d 21 | ``` 22 | In order to browse logs produced by the service you can use: 23 | ``` 24 | docker-compose logs -f 25 | ``` 26 | 27 | ### Running Dynatrace Appmon Server as non-root 28 | 29 | For the security reasons, as Docker co-uses the host kernel, all Dynatrace Appmon services are recommended to be run as non-root user. Therefore, you should operate on dedicated user on your host machine and **set `CUID` (User ID) and `CGID` (Group ID) variables in `.env` file for your user**. By default it uses root. During image builds, user with the same ids will be created and used for running containers. 30 | 31 | After you change user/group id variables, you may run Dynatrace Appmon Server in two ways: 32 | * executing `run-dtserver-as-nonroot.sh` script as dedicated user. This user should be able to run docker services (he should be added to the docker group). Example: `./run-dtserver-as-nonroot.sh -f docker-compose-debian.yml -b`, where `-b` states for docker-compose's `--build` 33 | 34 | or 35 | * running `docker-compose up` **after** making sure that host directory for `DT_SERVER_LOG_PATH_ON_HOST` is created and ownership is set to your dedicated user. Otherwise logs will not be available for you on host machine and service might not run due to permission denied error. 36 | 37 | 38 | ### Configuration 39 | 40 | Configuration relies on supplying docker-compose with environment variables defined in .env file. Some variables need to be passed to Dockerfile via ARG for correct building an Server image, that's way it is recommended to change variables only in .env file. 41 | 42 | | Environment Variable | Defaults | Description 43 | |:------------------------------|:----------------------------|:----------- 44 | | COMPOSE_PROJECT_NAME | "dynatracedocker" | A name of the Project. Also used for network naming. 45 | | DT_HOME | "/opt/dynatrace" | Path to dynatrace installation directory 46 | | DT_SERVER_NAME | "dtserver" | A name that applies to both the server and the container instance. 47 | | DT_SERVER_LICENSE_KEY_FILE_URL | N/A | A URL to a Dynatrace License Key file (optional). If the variable remains unset, a license key has to be provided through the Dynatrace Client. 48 | | VERSION | "7.0" | GA version 49 | | BUILD_VERSION | "7.0.0.2469" | Build version 50 | | CUID | 0 | User ID of the user that is used in the docker container 51 | | CGID | 0 | Group ID of the user that is used in the docker container 52 | | DT_SERVER_LOG_PATH_ON_HOST | /tmp/log/dynatrace/servers/dtserver | Log path on the host 53 | 54 | Ports are also defined in .env file based on current [Communication Connections](https://community-staging.dynalabs.io/support/doc/appmon/installation/set-up-communication-connections/) 55 | 56 | List of used ports for server: 57 | ``` 58 | APPMON_WEB_CLIENT_NONSSL_PORT=8020 59 | APPMON_WEB_CLIENT_SSL_PORT=8021 60 | APPMON_WEB_SSL_PORT=9911 61 | APPMON_ONEAGENT_NONSSL_SERVER_PORT=8040 62 | APPMON_ONEAGENT_SSL_SERVER_PORT=8041 63 | APPMON_CLIENT_NONSSL_PORT=2021 64 | APPMON_CLIENT_SSL_PORT=8023 65 | APPMON_COLLECTOR_PORT=9998 66 | APPMON_COLLECTOR_SERVER_SSL_PORT=6699 67 | ``` 68 | 69 | ### Licensing 70 | 71 | The examples above leave your Dynatrace environment without a proper license. However, you can conveniently have a license provisioned at container runtime by specifying a URL to a [Dynatrace License Key File](http://bit.ly/dttrial-docker-github) in the `DT_SERVER_LICENSE_KEY_FILE_URL` environment variable. If you don't happen to have a web server available to serve the license file to you, [Netcat](https://en.wikipedia.org/wiki/Netcat) can conveniently serve it from your command line, exactly once, via `nc -l 1337 < dtlicense.key`, where `1337` is an available port on your local machine. A `sudo` may be required depending on which port you eventually decide to choose. 72 | 73 | ## Dockerized Dynatrace Components 74 | 75 | See the following Dockerized Dynatrace components and examples for more information: 76 | 77 | - [Dockerized Dynatrace Agent](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Agent) and [Examples](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Agent-Examples) 78 | - [Dockerized Dynatrace Collector](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Collector) 79 | - [Dockerized Dynatrace Server](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Server) 80 | 81 | ## Problems? Questions? Suggestions? 82 | 83 | This offering is [Dynatrace Community Supported](https://community.dynatrace.com/community/display/DL/Support+Levels#SupportLevels-Communitysupported/NotSupportedbyDynatrace(providedbyacommunitymember)). Feel free to share any problems, questions and suggestions with your peers on the Dynatrace Community's [Application Monitoring & UEM Forum](https://answers.dynatrace.com/spaces/146/index.html). 84 | 85 | ## License 86 | 87 | Licensed under the MIT License. See the [LICENSE](https://github.com/Dynatrace/Dynatrace-Docker/blob/master/LICENSE) file for details. 88 | [![analytics](https://www.google-analytics.com/collect?v=1&t=pageview&_s=1&dl=https%3A%2F%2Fgithub.com%2FdynaTrace&dp=%2FDynatrace-Docker%2FDynatrace-Server&dt=Dynatrace-Docker%2FDynatrace-Server&_u=Dynatrace~&cid=github.com%2FdynaTrace&tid=UA-54510554-5&aip=1)]() 89 | -------------------------------------------------------------------------------- /Dynatrace-Collector/README.md: -------------------------------------------------------------------------------- 1 | ![Docker Logo](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-logo.png) 2 | 3 | # Dynatrace-Collector 4 | 5 | This project contains files for building and running the Dynatrace Collector component of the [Dynatrace Application Monitoring](http://www.dynatrace.com/docker) enterprise solution for deep end-to-end application monitoring in Docker. Ready-made images are available on the [Docker Hub](https://hub.docker.com/r/dynatrace/collector/). 6 | 7 | ## How to install Dynatrace AppMon Collector? 8 | 9 | *By default, we use root user for running containers. It is a bad practice so, if you can, you should run them as non-root. Go to the `Running Dynatrace Appmon Collector as non-root` paragraph for running and configuration instructions.* 10 | 11 | ### Running Dynatrace Appmon Collector as root 12 | 13 | If you don't need to use a non-root or dedicated user to run Dynatrace Appmon Collector, you can quickly bring up an entire Dockerized Dynatrace AppMon environment by using [Docker Compose](https://docs.docker.com/compose/) with the provided `docker-compose.yml` file like so : 14 | 15 | ``` 16 | git clone https://github.com/Dynatrace/Dynatrace-AppMon-Docker.git 17 | cd Dynatrace-AppMon-Docker/Dynatrace-Collector 18 | docker-compose up -d 19 | ``` 20 | In order to browse logs produced by the service you can use: 21 | ``` 22 | docker-compose logs -f 23 | ``` 24 | 25 | ### Running Dynatrace Appmon Collector as non-root 26 | 27 | For the security reasons, as Docker co-uses the host kernel, all Dynatrace Appmon services are recommended to be run as non-root user. Therefore, you should operate on dedicated user on your host machine and **set `CUID` (User ID) and `CGID` (Group ID) variables in `.env` file for your user**. By default it uses root. During image builds, user with the same ids will be created and used for running containers. 28 | 29 | After you change user/group id variables, you may run Dynatrace Appmon Collector in two ways: 30 | * executing `run-dtcollector-as-nonroot.sh` script as dedicated user. This user should be able to run docker services (he should be added to the docker group). Example: `./run-dtcollector-as-nonroot.sh -f docker-compose-debian.yml -b`, where `-b` states for docker-compose's `--build` 31 | 32 | or 33 | * running `docker-compose up` **after** making sure that host directory for `DT_COLLECTOR_LOG_PATH_ON_HOST` is created and ownership is set to your dedicated user. Otherwise logs will not be available for you on host machine and service might not run due to permission denied error. 34 | 35 | ### Configuration 36 | 37 | Configuration relies on supplying docker-compose with environment variables defined in .env file. Some variables need to be passed to Dockerfile via ARG for correct building an Server image, that's way it is recommended to change variables only in .env file. 38 | Please examine the [Dynatrace Collector Configuration](https://community-staging.dynalabs.io/support/doc/appmon/installation/set-up-system-components/set-up-collectors/) page for more information on the various settings. 39 | 40 | 41 | | Environment Variable | Defaults | Description 42 | |:----------------------|:----------------------------|:----------- 43 | | COMPOSE_PROJECT_NAME | "dynatracedocker" | A name of the Project. Also used for network naming. 44 | | DT_HOME | "/opt/dynatrace" | Path to dynatrace installation directory 45 | | DT_AGENT_NAME | "dtagent" | A name that applies to both the agent and the container instance. 46 | | DT_COLLECTOR_NAME | "dtcollector" | A name that applies to both the collector and the container instance. 47 | | DT_SERVER_NAME | "dtserver" | A name that applies to both the server and the container instance. 48 | | DT_SERVER_LICENSE_KEY_FILE_URL | N/A | A URL to a Dynatrace License Key file (optional). If the variable remains unset, a license key has to be provided through the Dynatrace Client. 49 | | VERSION | "7.0" | GA version 50 | | BUILD_VERSION | "7.0.0.2469" | Build version 51 | | CUID | 0 | User ID of the user that is used in the docker container 52 | | CGID | 0 | Group ID of the user that is used in the docker container 53 | | DT_COLLECTOR_LOG_PATH_ON_HOST | /tmp/log/dynatrace/collectors/dtcollector | Log path on the host 54 | 55 | 56 | Ports are also defined in .env file based on current [Communication Connections](https://community-staging.dynalabs.io/support/doc/appmon/installation/set-up-communication-connections/) 57 | 58 | List of used ports for collector: 59 | ``` 60 | APPMON_ONEAGENT_NONSSL_SERVER_PORT=8040 61 | APPMON_ONEAGENT_SSL_SERVER_PORT=8041 62 | APPMON_COLLECTOR_PORT=9998 63 | APPMON_COLLECTOR_SERVER_SSL_PORT=6699 64 | ``` 65 | 66 | 67 | The following *environment variables* together form the memory configuration of the Dynatrace Collector, as described in the [Memory Configuration](https://community-staging.dynalabs.io/support/doc/appmon/installation/set-up-system-components/set-up-collectors/#configure-memory) section of the [Dynatrace Collector Configuration](https://community-staging.dynalabs.io/support/doc/appmon/installation/set-up-system-components/set-up-collectors/) page: 68 | 69 | | Environment Variable | Defaults | Description 70 | |:-------------------------------|:---------|:----------- 71 | | DT_COLLECTOR_JVM_XMS | "2G" | The collector's minimum Java heap size. 72 | | DT_COLLECTOR_JVM_XMX | "2G" | The collector's maximum Java heap size. 73 | | DT_COLLECTOR_JVM_PERM_SIZE | "128m" | The collector's minimum Java permanent generation size. 74 | | DT_COLLECTOR_JVM_MAX_PERM_SIZE | "128m" | The collector's maximum Java permanent generation size. 75 | 76 | 77 | ## Running container with docker run 78 | 79 | You can reuse .env file to run containter directly using docker run command. 80 | DT_SERVER_NAME and DT_COLLECTOR_SERVER should point to your AppMon server. 81 | 82 | ``` 83 | export DT_COLLECTOR_NAME=dt-collector-docker1 84 | 85 | docker run -d --name ${DT_COLLECTOR_NAME} \ 86 | --env DT_COLLECTOR_NAME=${DT_COLLECTOR_NAME} \ 87 | --env-file .env \ 88 | --hostname dt-collector-docker.cloud \ 89 | -p 9998:9998 \ 90 | --volume /opt/dynatrace/${DT_COLLECTOR_NAME}/log:/opt/dynatrace/log/collector/ \ 91 | --volume /opt/dynatrace/${DT_COLLECTOR_NAME}/instances:/opt/dynatrace/collector/instances/${DT_COLLECTOR_NAME} \ 92 | --publish-all \ 93 | dynatrace/collector:7.0 94 | 95 | ``` 96 | 97 | ## Dockerized Dynatrace Components 98 | 99 | See the following Dockerized Dynatrace components and examples for more information: 100 | 101 | - [Dockerized Dynatrace Agent](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Agent) and [Examples](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Agent-Examples) 102 | - [Dockerized Dynatrace Collector](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Collector) 103 | - [Dockerized Dynatrace Server](https://github.com/Dynatrace/Dynatrace-Docker/tree/7.0_GA/Dynatrace-Server) 104 | 105 | ## Problems? Questions? Suggestions? 106 | 107 | This offering is [Dynatrace Community Supported](https://community.dynatrace.com/community/display/DL/Support+Levels#SupportLevels-Communitysupported/NotSupportedbyDynatrace(providedbyacommunitymember)). Feel free to share any problems, questions and suggestions with your peers on the Dynatrace Community's [Application Monitoring & UEM Forum](https://answers.dynatrace.com/spaces/146/index.html). 108 | 109 | ## License 110 | 111 | Licensed under the MIT License. See the [LICENSE](https://github.com/Dynatrace/Dynatrace-Docker/blob/master/LICENSE) file for details. 112 | [![analytics](https://www.google-analytics.com/collect?v=1&t=pageview&_s=1&dl=https%3A%2F%2Fgithub.com%2FdynaTrace&dp=%2FDynatrace-Docker%2FDynatrace-Collector&dt=Dynatrace-Docker%2FDynatrace-Collector&_u=Dynatrace~&cid=github.com%2FdynaTrace&tid=UA-54510554-5&aip=1)]() 113 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Docker Logo](https://github.com/Dynatrace/Dynatrace-AppMon-Docker/blob/images/docker-logo.png) 2 | 3 | # Dynatrace-AppMon-Docker for AppMon 4 | 5 | The home of Dockerized components of the [Dynatrace Application Monitoring](http://www.dynatrace.com/en/products/application-monitoring.html) enterprise solution. All components are available on the [Docker Hub](https://hub.docker.com/u/dynatrace/). 6 | 7 | ## What is Dynatrace AppMon? 8 | 9 | [Dynatrace Application Monitoring](http://www.dynatrace.com/en/products/application-monitoring.html), with its [PurePath technology](http://www.dynatrace.com/en_us/application-performance-management/products/purepath-technology.html), is the world's leading application monitoring solution - trusted by more than 7500 customers around the globe. It supports all your major technology stacks and integrates into your Continuous Delivery pipelines to allow you to build world-class, high-quality software. 10 | 11 | If you are looking for monitoring containerized applications in dynamic Docker environments, please visit [Dynatrace SaaS Docker monitoring](https://www.dynatrace.com/technologies/cloud-and-microservices/docker-monitoring). 12 | 13 | ## How to install Dynatrace AppMon? 14 | 15 | *By default, we use root user for running containers. It is a bad practice so, if you can, you should run them as non-root. Go to the `Running Dynatrace Appmon containers as non-root` paragraph for running and configuration instructions.* 16 | 17 | ### Running Dynatrace Appmon services as root 18 | 19 | If you don't need to use a non-root or dedicated user to run Dynatrace Appmon docker containers, you can quickly bring up an entire Dockerized Dynatrace AppMon environment by using [Docker Compose](https://docs.docker.com/compose/) with any of the provided `docker-compose.yml` files like so : 20 | 21 | ``` 22 | git clone https://github.com/Dynatrace/Dynatrace-AppMon-Docker.git 23 | cd Dynatrace-AppMon-Docker 24 | docker-compose up -d 25 | ``` 26 | This will install and run all Appmon services like Server, Collector and Master Agent in daemon mode in single containers joined the same subnetwork. Then, you can install your [Agents](https://github.com/Dynatrace/Dynatrace-AppMon-Docker/tree/master/Dynatrace-Agent-Examples) (see Configuration part for further details). 27 | In order to browse logs produced by these services you can use: 28 | ``` 29 | docker-compose logs -f 30 | ``` 31 | 32 | ### Running Dynatrace Appmon services as non-root 33 | 34 | For the security reasons, as Docker co-uses the host kernel, all Dynatrace Appmon services are recommended to be run as non-root user. Therefore, you should operate on dedicated user on your host machine and **set `CUID` (User ID) and `CGID` (Group ID) variables in `.env` file for your user**. By default it uses root. During image builds, user with the same ids will be created and used for running containers. 35 | 36 | After you change user/group id variables, you may run Dynatrace Appmon in two ways: 37 | * executing `run-as-nonroot.sh` script as dedicated user. This user should be able to run docker services (he should be added to the docker group). Example: `./run-as-nonroot.sh -f docker-compose-debian.yml -b`, where `-b` states for docker-compose's `--build` 38 | 39 | 40 | 41 | 42 | or 43 | * running `docker-compose up` **after** making sure that host directories for `DT_SERVER_LOG_PATH_ON_HOST`, `DT_COLLECTOR_LOG_PATH_ON_HOST` and `DT_AGENT_LOG_PATH_ON_HOST` are created and ownerships are set to your dedicated user. Otherwise logs will not be available for you on host machine and/or some service might not run due to permission denied error. 44 | 45 | #### Configuration 46 | 47 | Configuration relies on supplying `docker-compose` with environment variables defined in `.env` file. Some .env files variables need to be passed to `Dockerfile` via `ARG` for correct building component images, that's way it is recommended to change variables only from `.env` file. 48 | 49 | **Ports** can be also configured in .env file. By default it uses values from [Communication Connections Documentation](https://www.dynatrace.com/support/doc/appmon/installation/set-up-communication-connections/). 50 | 51 | **Master Agent** (`dtagent`) service only prepares required libraries and installation scripts for triggering agents. Running and configuring agents is manual action done by the user. Examples are [here](https://github.com/Dynatrace/Dynatrace-AppMon-Docker/tree/master/Dynatrace-Agent-Examples). 52 | If you are not familiar with Appmon Agents concept, please read: [Agents Overview](https://www.dynatrace.com/support/doc/appmon/application-monitoring/agents/), [Agents Installation](https://www.dynatrace.com/support/doc/appmon/installation/install-agents/), [Agents Configuration](https://www.dynatrace.com/support/doc/appmon/installation/set-up-agents/) 53 | 54 | If you *don't* want to validate CA certificate for curl commands, you may want to initialize `CURL_INSECURE` variable to any value for image build. 55 | 56 | Please see each component's README file for more specific details about configuration. 57 | 58 | ### Licensing 59 | 60 | The example above leaves your Dynatrace AppMon environment without a proper license. However, you can add your license by editing .env file and put it as value for DT_SERVER_LICENSE_KEY_FILE_URL variable. 61 | 62 | Also, you can conveniently have a license provisioned at container runtime by specifying a URL to a [Dynatrace License Key File](http://bit.ly/dttrial-docker-github) in the `DT_SERVER_LICENSE_KEY_FILE_URL` environment variable. If you don't happen to have a web server available to serve the license file to you, [Netcat](https://en.wikipedia.org/wiki/Netcat) can conveniently serve it from your command line, exactly once, via `nc -l 1337 < dtlicense.key`, where `1337` is an available port on your local machine. A `sudo` may be required depending on which port you eventually decide to choose. 63 | 64 | ``` 65 | git clone https://github.com/Dynatrace/Dynatrace-Docker.git 66 | cd Dynatrace-Docker 67 | DT_SERVER_LICENSE_KEY_FILE_URL=http://$YOUR_IP:1337 docker-compose up 68 | ``` 69 | 70 | ### Obtaining a License 71 | 72 | In the example above, you have to let `DT_SERVER_LICENSE_KEY_FILE_URL` point to a valid Dynatrace AppMon License Key file. If you don't have a license yet, you can [obtain a Dynatrace AppMon Free Trial License here](http://bit.ly/dttrial-docker-github). However, you don't need to have your license file hosted by a server: if you can run a console, [Netcat](https://en.wikipedia.org/wiki/Netcat) can conveniently serve it for you on port `80` via `sudo nc -l 80 < dtlicense.key`. 73 | 74 | ## How to Monitor your Dockerized Application? 75 | [Performance Clinic - Agents](https://www.youtube.com/watch?v=B_oWkBjH-Uk&list=PLqt2rd0eew1bmDn54E2_M2uvbhm_WxY_6&index=37) 76 | [Performance Clinic - Collector](https://www.youtube.com/watch?v=UyRCJ-Xi3a4&list=PLqt2rd0eew1bmDn54E2_M2uvbhm_WxY_6&index=74) 77 | 78 | See the following integrations for more information: 79 | 80 | - [Dockerized AppMon Agent: Examples](https://github.com/Dynatrace/Dynatrace-AppMon-Docker/tree/master/Dynatrace-Agent-Examples) 81 | - [Dockerized easyTravel Application](https://github.com/Dynatrace-Innovationlab/easyTravel-Docker) 82 | 83 | ![Dockerized Application](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/dockerized-application.png) 84 | 85 | ## How to Monitor your Docker Containers? 86 | 87 | Want to see all your Docker Metrics in one place? See the [Dynatrace Docker Monitor Plugin](https://community.dynatrace.com/community/display/DL/Docker+Monitor+Plugin) for more information. 88 | 89 | ![Docker Monitor Plugin](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-monitor-plugin.png) 90 | 91 | ## Resource Requirements 92 | 93 | When running Docker on Windows or a Mac via the [Docker Toolbox](https://www.docker.com/products/docker-toolbox), make sure your [Docker Machine](https://docs.docker.com/machine/overview/) has sufficient resources available to run Dynatrace AppMon together with your Dockerized application: 94 | 95 | 1) Stop the Docker Machine in VirtualBox 96 | 97 | ![Power off Docker Machine](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-machine-power-off.png) 98 | 99 | 2) Give your Docker Machine at least 2 CPUs 100 | 101 | ![Configure Docker Machine CPUs](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-machine-cpu-settings.png) 102 | 103 | 3) Give your Docker Machine at least 4 GB of RAM 104 | 105 | ![Configure Docker Machine RAM](https://github.com/Dynatrace/Dynatrace-Docker/blob/images/docker-machine-mem-settings.png) 106 | 107 | 4) Finally, start your Docker Quickstart Terminal for the changes to take effect. 108 | 109 | ## Problems? Questions? Suggestions? 110 | 111 | This offering is [Dynatrace Community Supported](https://community.dynatrace.com/community/display/DL/Support+Levels#SupportLevels-Communitysupported/NotSupportedbyDynatrace(providedbyacommunitymember)). Feel free to share any problems, questions and suggestions with your peers on the Dynatrace Community's [Application Monitoring & UEM Forum](https://answers.dynatrace.com/spaces/146/index.html). 112 | 113 | ## License 114 | 115 | Licensed under the MIT License. See the [LICENSE](https://github.com/Dynatrace/Dynatrace-Docker/blob/master/LICENSE) file for details. 116 | [![analytics](https://www.google-analytics.com/collect?v=1&t=pageview&_s=1&dl=https%3A%2F%2Fgithub.com%2FdynaTrace&dp=%2FDynatrace-Docker&dt=Dynatrace-Docker&_u=Dynatrace~&cid=github.com%2FdynaTrace&tid=UA-54510554-5&aip=1)]() 117 | -------------------------------------------------------------------------------- /Dynatrace-Server/build/config/server.config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 |
26 |
27 | 28 |
29 |
30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
78 |
79 |
80 |
81 |
82 | 83 | 84 |
85 |
86 |
87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 |
245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 |
253 |
254 | 255 |
256 |
257 | 258 | 259 | 260 | 261 | 262 | --------------------------------------------------------------------------------