mirror of
https://github.com/wahyd4/docker-pinpoint.git
synced 2026-08-09 04:46:24 +10:00
Initial version
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# DESCRIPTION Pinpoint APM Agent Volume
|
||||
# TO_BUILD docker build -t pinpoint-agent .
|
||||
# TO_RUN docker run --name=pinpoint-agent pinpoint-agent
|
||||
|
||||
#FROM progrium/busybox:latest
|
||||
FROM java:8-jdk
|
||||
|
||||
ENV PINPOINT_VERSION 1.1.0
|
||||
|
||||
#RUN opkg-install bash curl
|
||||
|
||||
RUN mkdir -p /opt/app \
|
||||
&& curl -L -O -k "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-agent-$PINPOINT_VERSION.tar.gz" -o pinpoint-agent.tar.gz \
|
||||
&& gunzip pinpoint-agent-$PINPOINT_VERSION.tar.gz \
|
||||
&& tar -xf pinpoint-agent-$PINPOINT_VERSION.tar -C /opt/app \
|
||||
&& rm pinpoint-agent-$PINPOINT_VERSION.tar
|
||||
|
||||
RUN sed -i 's/profiler.collector.ip=127.0.0.1/profiler.collector.ip=192.168.59.103/' /opt/app/pinpoint-agent/pinpoint.config
|
||||
@@ -0,0 +1,209 @@
|
||||
#
|
||||
# Pinpoint agent configuration
|
||||
#
|
||||
|
||||
###########################################################
|
||||
# Collector server #
|
||||
###########################################################
|
||||
profiler.collector.ip=collector
|
||||
|
||||
# placeHolder support "${key}"
|
||||
profiler.collector.span.ip=${profiler.collector.ip}
|
||||
profiler.collector.span.port=9996
|
||||
|
||||
# placeHolder support "${key}"
|
||||
profiler.collector.stat.ip=${profiler.collector.ip}
|
||||
profiler.collector.stat.port=9995
|
||||
|
||||
# placeHolder support "${key}"
|
||||
profiler.collector.tcp.ip=${profiler.collector.ip}
|
||||
profiler.collector.tcp.port=9994
|
||||
|
||||
|
||||
###########################################################
|
||||
# Profiler Global Configuration #
|
||||
###########################################################
|
||||
profiler.enable=true
|
||||
|
||||
profiler.jvm.collect.interval=1000
|
||||
|
||||
profiler.sampling.enable=true
|
||||
|
||||
# Set sampling rate. If you set it to 10, 1 out of 10 transaction will be sampled.
|
||||
profiler.sampling.rate=1
|
||||
|
||||
profiler.io.buffering.enable=true
|
||||
profiler.io.buffering.buffersize=20
|
||||
|
||||
profiler.spandatasender.write.queue.size=5120
|
||||
#profiler.spandatasender.socket.sendbuffersize=1048576
|
||||
#profiler.spandatasender.socket.timeout=3000
|
||||
profiler.spandatasender.chunk.size=16384
|
||||
|
||||
profiler.statdatasender.write.queue.size=5120
|
||||
#profiler.statdatasender.socket.sendbuffersize=1048576
|
||||
#profiler.statdatasender.socket.timeout=3000
|
||||
profiler.statdatasender.chunk.size=16384
|
||||
|
||||
profiler.agentInfo.send.retry.interval=300000
|
||||
|
||||
# Allows TCP data command
|
||||
profiler.tcpdatasender.command.accept.enable=true
|
||||
|
||||
###########################################################
|
||||
# application type #
|
||||
###########################################################
|
||||
#profiler.applicationservertype=TOMCAT
|
||||
#profiler.applicationservertype=BLOC
|
||||
|
||||
|
||||
###########################################################
|
||||
# user defined classes #
|
||||
###########################################################
|
||||
profiler.include=
|
||||
|
||||
###########################################################
|
||||
# TOMCAT #
|
||||
###########################################################
|
||||
profiler.tomcat.hidepinpointheader=true
|
||||
profiler.tomcat.excludeurl=/aa/test.html, /bb/exclude.html
|
||||
|
||||
###########################################################
|
||||
# JDBC #
|
||||
###########################################################
|
||||
profiler.jdbc=true
|
||||
profiler.jdbc.sqlcachesize=1024
|
||||
profiler.jdbc.maxsqlbindvaluesize=1024
|
||||
|
||||
#
|
||||
# MYSQL
|
||||
#
|
||||
profiler.jdbc.mysql=true
|
||||
profiler.jdbc.mysql.setautocommit=true
|
||||
profiler.jdbc.mysql.commit=true
|
||||
profiler.jdbc.mysql.rollback=true
|
||||
|
||||
#
|
||||
# MSSQL Jtds
|
||||
#
|
||||
profiler.jdbc.jtds=true
|
||||
profiler.jdbc.jtds.setautocommit=true
|
||||
profiler.jdbc.jtds.commit=true
|
||||
profiler.jdbc.jtds.rollback=true
|
||||
|
||||
#
|
||||
# Oracle
|
||||
#
|
||||
profiler.jdbc.oracle=true
|
||||
profiler.jdbc.oracle.setautocommit=true
|
||||
profiler.jdbc.oracle.commit=true
|
||||
profiler.jdbc.oracle.rollback=true
|
||||
|
||||
#
|
||||
# CUBRID
|
||||
#
|
||||
profiler.jdbc.cubrid=true
|
||||
profiler.jdbc.cubrid.setautocommit=true
|
||||
profiler.jdbc.cubrid.commit=true
|
||||
profiler.jdbc.cubrid.rollback=true
|
||||
|
||||
#
|
||||
# DBCP
|
||||
#
|
||||
profiler.jdbc.dbcp=true
|
||||
profiler.jdbc.dbcp.connectionclose=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# Apache HTTP Client 3.x #
|
||||
###########################################################
|
||||
profiler.apache.httpclient3=true
|
||||
profiler.apache.httpclient3.cookie=true
|
||||
|
||||
# When cookies should be dumped. It could be ALWAYS or EXCEPTION.
|
||||
profiler.apache.httpclient3.cookie.dumptype=ALWAYS
|
||||
profiler.apache.httpclient3.cookie.sampling.rate=1
|
||||
|
||||
# Dump entities of POST or PUT request. limited to entities which is HttpEtity.isRepeatable() == true.
|
||||
profiler.apache.httpclient3.entity=true
|
||||
|
||||
# When entities should be dumped. ALWAYS or EXCEPTION.
|
||||
profiler.apache.httpclient3.entity.dumptype=ALWAYS
|
||||
profiler.apache.httpclient3.entity.sampling.rate=1
|
||||
|
||||
|
||||
###########################################################
|
||||
# Apache HTTP Client 4.x #
|
||||
###########################################################
|
||||
profiler.apache.httpclient4=true
|
||||
profiler.apache.httpclient4.cookie=true
|
||||
|
||||
# When cookies should be dumped. It could be ALWAYS or EXCEPTION.
|
||||
profiler.apache.httpclient4.cookie.dumptype=ALWAYS
|
||||
profiler.apache.httpclient4.cookie.sampling.rate=1
|
||||
|
||||
# Dump entities of POST or PUT request. limited to entities which is HttpEtity.isRepeatable() == true.
|
||||
profiler.apache.httpclient4.entity=true
|
||||
|
||||
# When entities should be dumped. ALWAYS or EXCEPTION.
|
||||
profiler.apache.httpclient4.entity.dumptype=ALWAYS
|
||||
profiler.apache.httpclient4.entity.sampling.rate=1
|
||||
|
||||
# Can profile status code value
|
||||
profiler.apache.httpclient4.entity.statuscode=true
|
||||
|
||||
# Not supported yet
|
||||
#profiler.apache.nio.httpclient4=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# Ning Async HTTP Client #
|
||||
###########################################################
|
||||
profiler.ning.asynchttpclient=true
|
||||
profiler.ning.asynchttpclient.cookie=true
|
||||
profiler.ning.asynchttpclient.cookie.dumptype=ALWAYS
|
||||
profiler.ning.asynchttpclient.cookie.dumpsize=1024
|
||||
profiler.ning.asynchttpclient.cookie.sampling.rate=1
|
||||
profiler.ning.asynchttpclient.entity=true
|
||||
profiler.ning.asynchttpclient.entity.dumptype=ALWAYS
|
||||
profiler.ning.asynchttpclient.entity.dumpsize=1024
|
||||
profiler.ning.asynchttpclient.entity.sampling.rate=1
|
||||
profiler.ning.asynchttpclient.param=true
|
||||
profiler.ning.asynchttpclient.param.dumptype=ALWAYS
|
||||
profiler.ning.asynchttpclient.param.dumpsize=1024
|
||||
profiler.ning.asynchttpclient.param.sampling.rate=1
|
||||
|
||||
|
||||
###########################################################
|
||||
# Arcus #
|
||||
###########################################################
|
||||
profiler.arcus=true
|
||||
profiler.arcus.keytrace=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# Memcached #
|
||||
###########################################################
|
||||
profiler.memcached=true
|
||||
profiler.memcached.keytrace=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# ibatis #
|
||||
###########################################################
|
||||
profiler.orm.ibatis=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# mybatis #
|
||||
###########################################################
|
||||
profiler.orm.mybatis=true
|
||||
|
||||
|
||||
###########################################################
|
||||
# spring-beans
|
||||
###########################################################
|
||||
profiler.spring.beans=true
|
||||
profiler.spring.beans.name.pattern=
|
||||
profiler.spring.beans.class.pattern=
|
||||
profiler.spring.beans.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository
|
||||
@@ -0,0 +1,25 @@
|
||||
# DESCRIPTION Pinpoint APM Collector
|
||||
# TO_BUILD docker build -t pinpoint-collector .
|
||||
# TO_RUN docker run -d --net=host -e HBASE_HOST=<HOST_IP> -e HBASE_PORT=2181 -e COLLECTOR_TCP_PORT=9994 -e COLLECTOR_UDP_STAT_LISTEN_PORT=9995 -e COLLECTOR_UDP_SPAN_LISTEN_PORT=9996 -p 9994:9994 -p 9995:9995/udp -p 9996:9996/udp --name=pinpoint-collector pinpoint-collector
|
||||
|
||||
FROM tomcat:8-jre8
|
||||
|
||||
ENV PINPOINT_VERSION 1.1.0
|
||||
|
||||
RUN curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-collector-$PINPOINT_VERSION.war" -o pinpoint-collector.war && \
|
||||
rm -rf /usr/local/tomcat/webapps && \
|
||||
mkdir -p /usr/local/tomcat/webapps && \
|
||||
sed -i -e 's/8005/9005/' /usr/local/tomcat/conf/server.xml && \
|
||||
sed -i -e 's/8080/9080/' /usr/local/tomcat/conf/server.xml && \
|
||||
sed -i -e 's/8009/9009/' /usr/local/tomcat/conf/server.xml && \
|
||||
sed -i -e 's/8443/9443/' /usr/local/tomcat/conf/server.xml && \
|
||||
unzip pinpoint-collector.war -d /usr/local/tomcat/webapps/ROOT && \
|
||||
rm -rf pinpoint-collector.war
|
||||
|
||||
ADD start.sh /usr/local/tomcat/start.sh
|
||||
RUN chmod a+x /usr/local/tomcat/start.sh
|
||||
|
||||
ADD hbase.properties /assets/hbase.properties
|
||||
ADD pinpoint-collector.properties /assets/pinpoint-collector.properties
|
||||
|
||||
CMD ["/usr/local/tomcat/start.sh"]
|
||||
@@ -0,0 +1,22 @@
|
||||
hbase.client.host=HBASE_HOST
|
||||
hbase.client.port=HBASE_PORT
|
||||
|
||||
# hbase timeout option==================================================================================
|
||||
# hbase default:true
|
||||
hbase.ipc.client.tcpnodelay=true
|
||||
# hbase default:60000
|
||||
hbase.rpc.timeout=10000
|
||||
# hbase default:Integer.MAX_VALUE
|
||||
hbase.client.operation.timeout=10000
|
||||
|
||||
# hbase socket read timeout. default: 200000
|
||||
hbase.ipc.client.socket.timeout.read=20000
|
||||
# socket write timeout. hbase default: 600000
|
||||
hbase.ipc.client.socket.timeout.write=60000
|
||||
|
||||
# ==================================================================================
|
||||
# hbase client thread pool option
|
||||
hbase.client.thread.max=128
|
||||
hbase.client.threadPool.queueSize=5120
|
||||
# prestartAllCoreThreads
|
||||
hbase.client.threadPool.prestart=false
|
||||
@@ -0,0 +1,30 @@
|
||||
# tcp listen ip
|
||||
collector.tcpListenIp=0.0.0.0
|
||||
collector.tcpListenPort=COLLECTOR_TCP_PORT
|
||||
|
||||
# udp listen ip
|
||||
collector.udpStatListenIp=0.0.0.0
|
||||
collector.udpStatListenPort=COLLECTOR_UDP_STAT_LISTEN_PORT
|
||||
|
||||
collector.l4.ip=
|
||||
|
||||
collector.udpStatWorkerThread=16
|
||||
collector.udpStatWorkerQueueSize=512
|
||||
|
||||
collector.udpStatSocketReceiveBufferSize=4194304
|
||||
|
||||
|
||||
# span listen port ---------------------------------------------------------------------
|
||||
collector.udpSpanListenIp=0.0.0.0
|
||||
collector.udpSpanListenPort=COLLECTOR_UDP_SPAN_LISTEN_PORT
|
||||
|
||||
collector.udpSpanWorkerThread=32
|
||||
collector.udpSpanWorkerQueueSize=1024
|
||||
|
||||
collector.udpSpanSocketReceiveBufferSize=4194304
|
||||
|
||||
statistics.flushPeriod=1000
|
||||
|
||||
cluster.enable=false
|
||||
cluster.zookeeper.address=
|
||||
cluster.zookeeper.sessiontimeout=
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT:-}
|
||||
COLLECTOR_UDP_STAT_LISTEN_PORT=${COLLECTOR_UDP_STAT_LISTEN_PORT:-}
|
||||
COLLECTOR_UDP_SPAN_LISTEN_PORT=${COLLECTOR_UDP_SPAN_LISTEN_PORT:-}
|
||||
HBASE_HOST=${HBASE_HOST:-}
|
||||
HBASE_PORT=${HBASE_PORT:-}
|
||||
|
||||
cp /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties.bck
|
||||
cp /assets/pinpoint-collector.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
cp /assets/hbase.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
|
||||
sed 's/COLLECTOR_TCP_PORT/'"${COLLECTOR_TCP_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed 's/COLLECTOR_UDP_STAT_LISTEN_PORT/'"${COLLECTOR_UDP_STAT_LISTEN_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed 's/COLLECTOR_UDP_SPAN_LISTEN_PORT/'"${COLLECTOR_UDP_SPAN_LISTEN_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed 's/HBASE_HOST/'"${HBASE_HOST}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
sed 's/HBASE_PORT/'"${HBASE_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
|
||||
/usr/local/tomcat/bin/catalina.sh run
|
||||
@@ -0,0 +1,40 @@
|
||||
# DESCRIPTION Pinpoint APM HBase (Data Storage)
|
||||
# TO_BUILD docker build -t pinpoint-hbase .
|
||||
# TO_RUN docker run -d --net=host -p 2181:2181 -p 60000:60000 -p 60010:60010 -p 60020:60020 -p 60030:60030 --name=pinpoint-hbase pinpoint-hbase
|
||||
|
||||
FROM java:8-jdk
|
||||
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
||||
ENV HBASE_VERSION 1.0.1.1
|
||||
ENV HBASE_HOME /opt/hbase/hbase-$HBASE_VERSION
|
||||
ENV PINPOINT_VERSION 1.1.0
|
||||
|
||||
RUN mkdir -p /opt/hbase && \
|
||||
cd /opt/hbase && \
|
||||
curl -SL "http://apache.mirrors.pair.com/hbase/$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz" -o hbase.tar.gz && \
|
||||
tar xfvz hbase.tar.gz && \
|
||||
rm -rf hbase.tar.gz
|
||||
|
||||
ADD hbase-site.xml /opt/hbase/hbase-$HBASE_VERSION/conf/hbase-site.xml
|
||||
|
||||
RUN curl -SL "https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/scripts/hbase-create.hbase" -o /opt/hbase/hbase-create.hbase && \
|
||||
$HBASE_HOME/bin/start-hbase.sh && \
|
||||
sleep 10 && \
|
||||
$HBASE_HOME/bin/hbase shell /opt/hbase/hbase-create.hbase && \
|
||||
$HBASE_HOME/bin/stop-hbase.sh
|
||||
|
||||
VOLUME /home/pinpoint/hbase
|
||||
VOLUME /home/pinpoint/zookeeper
|
||||
|
||||
# zookeeper
|
||||
EXPOSE 2181
|
||||
# HBase Master API port
|
||||
EXPOSE 60000
|
||||
# HBase Master Web UI
|
||||
EXPOSE 60010
|
||||
# Regionserver API port
|
||||
EXPOSE 60020
|
||||
# HBase Regionserver web UI
|
||||
EXPOSE 60030
|
||||
|
||||
CMD /opt/hbase/hbase-$HBASE_VERSION/bin/hbase master start
|
||||
@@ -0,0 +1,18 @@
|
||||
<configuration>
|
||||
<property>
|
||||
<name>hbase.rootdir</name>
|
||||
<value>file:///home/pinpoint/hbase</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.zookeeper.property.dataDir</name>
|
||||
<value>/home/pinpoint/zookeeper</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.master.port</name>
|
||||
<value>60000</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.regionserver.port</name>
|
||||
<value>60020</value>
|
||||
</property>
|
||||
</configuration>
|
||||
@@ -0,0 +1,21 @@
|
||||
# DESCRIPTION Pinpoint APM Web (User Interface)
|
||||
# TO_BUILD docker build -t pinpoint-web .
|
||||
# TO_RUN docker run -d -p 8080:8080 --net=host -e HBASE_HOST=<HOST_IP> -e HBASE_PORT=2181 --name=pinpoint-web pinpoint-web
|
||||
|
||||
FROM tomcat:8-jre8
|
||||
|
||||
ENV PINPOINT_VERSION 1.1.0
|
||||
|
||||
RUN curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-web-$PINPOINT_VERSION.war" -o pinpoint-web.war && \
|
||||
rm -rf /usr/local/tomcat/webapps && \
|
||||
mkdir -p /usr/local/tomcat/webapps && \
|
||||
unzip pinpoint-web.war -d /usr/local/tomcat/webapps/ROOT && \
|
||||
rm -rf pinpoint-web.war
|
||||
|
||||
ADD start.sh /usr/local/tomcat/start.sh
|
||||
RUN chmod a+x /usr/local/tomcat/start.sh
|
||||
|
||||
ADD hbase.properties /assets/hbase.properties
|
||||
ADD pinpoint-web.properties /assets/pinpoint-web.properties
|
||||
|
||||
CMD ["/usr/local/tomcat/start.sh"]
|
||||
@@ -0,0 +1,22 @@
|
||||
hbase.client.host=HBASE_HOST
|
||||
hbase.client.port=HBASE_PORT
|
||||
|
||||
# hbase timeout option==================================================================================
|
||||
# hbase default:true
|
||||
hbase.ipc.client.tcpnodelay=true
|
||||
# hbase default:60000
|
||||
hbase.rpc.timeout=10000
|
||||
# hbase default:Integer.MAX_VALUE
|
||||
hbase.client.operation.timeout=10000
|
||||
|
||||
# hbase socket read timeout. default: 200000
|
||||
hbase.ipc.client.socket.timeout.read=20000
|
||||
# socket write timeout. hbase default: 600000
|
||||
hbase.ipc.client.socket.timeout.write=60000
|
||||
|
||||
# ==================================================================================
|
||||
# hbase client thread pool option
|
||||
hbase.client.thread.max=128
|
||||
hbase.client.threadPool.queueSize=5120
|
||||
# prestartAllCoreThreads
|
||||
hbase.client.threadPool.prestart=false
|
||||
@@ -0,0 +1,14 @@
|
||||
# local
|
||||
cluster.enable=false
|
||||
cluster.web.tcp.port=9995
|
||||
cluster.zookeeper.address=127.0.0.1:22213
|
||||
cluster.zookeeper.sessiontimeout=3000
|
||||
cluster.zookeeper.retry.interval=5000
|
||||
|
||||
# FIXME - should be removed for proper authentication
|
||||
admin.password=admin
|
||||
|
||||
#log site link
|
||||
#log.enable=false
|
||||
#log.page.url=
|
||||
#log.button.name=
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
HBASE_HOST=${HBASE_HOST:-}
|
||||
HBASE_PORT=${HBASE_PORT:-}
|
||||
|
||||
cp /assets/pinpoint-web.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
|
||||
cp /assets/hbase.properties /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
|
||||
sed 's/HBASE_HOST/'"${HBASE_HOST}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
sed 's/HBASE_PORT/'"${HBASE_PORT}"'/g' -i /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
|
||||
/usr/local/tomcat/bin/catalina.sh run
|
||||
Reference in New Issue
Block a user