mirror of
https://github.com/wahyd4/docker-pinpoint.git
synced 2026-08-09 21:06:20 +10:00
Compare commits
@@ -0,0 +1 @@
|
||||
/.project
|
||||
@@ -1 +1,60 @@
|
||||
# docker-pinpoint
|
||||
|
||||
This repo contains the docker images for [Pinpoint](https://github.com/naver/pinpoint), or you can just use the docker compose file run pinpoint in seconds.
|
||||
|
||||
### To build the images
|
||||
* Go to a folder
|
||||
* `docker build -t repo-name:latest .` to build the image
|
||||
|
||||
### To run all the containers
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Open your browser and then go to <http://localhost:28080>
|
||||
|
||||
|
||||
### Add your own Java based application to be monitored.
|
||||
|
||||
* Modify the `pinpoint.config` if you need.
|
||||
|
||||
```
|
||||
###########################################################
|
||||
# Collector server #
|
||||
###########################################################
|
||||
profiler.collector.ip=127.0.0.1
|
||||
|
||||
# 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
|
||||
|
||||
```
|
||||
|
||||
|
||||
* The following script is a example for a spring boot application.
|
||||
|
||||
```shell
|
||||
java -javaagent:/some-absolute-path/pinpoint-agent-1.6.2/pinpoint-bootstrap-1.6.2.jar -Dpinpoint.agentId=some-union-id -Dpinpoint.applicationName=some-name -jar build/libs/wise-log-1.0.0-SNAPSHOT.jar
|
||||
|
||||
```
|
||||
|
||||
### More Examples
|
||||
|
||||
[See more examples of monitoring](examples) using docker-compose, image docker, monitoring tests with selenium, ...
|
||||
|
||||
You can find more samples at: <https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples>
|
||||
|
||||
If you plan to use external volumes for hbase you should fill hbase first.
|
||||
Please run this script inside hbase container
|
||||
```
|
||||
${HBASE_HOME}/bin/hbase shell /opt/hbase/hbase-create.hbase; ${HBASE_HOME}/bin/stop-hbase.sh
|
||||
```
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
version: '2'
|
||||
services:
|
||||
pinpoint-hbase:
|
||||
container_name: pinpoint-hbase
|
||||
image: marcosamm/pinpoint-hbase:1.6.2
|
||||
restart: always
|
||||
expose:
|
||||
- "2181"
|
||||
- "16010"
|
||||
ports:
|
||||
- "2181:2181"
|
||||
- "16010:16010"
|
||||
environment:
|
||||
TZ: "America/Recife"
|
||||
volumes:
|
||||
- hbase_data:/home/pinpoint/hbase
|
||||
- hbase_zookeeper_data:/home/pinpoint/zookeeper
|
||||
|
||||
pinpoint-mysql:
|
||||
container_name: pinpoint-mysql
|
||||
restart: always
|
||||
image: marcosamm/pinpoint-mysql:1.6.2
|
||||
ports:
|
||||
- "13306:3306"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root123
|
||||
MYSQL_USER: admin
|
||||
MYSQL_PASSWORD: admin
|
||||
MYSQL_DATABASE: pinpoint
|
||||
TZ: "America/Recife"
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
|
||||
pinpoint-collector:
|
||||
depends_on:
|
||||
- pinpoint-hbase
|
||||
container_name: pinpoint-collector
|
||||
image: marcosamm/pinpoint-collector:1.6.2
|
||||
restart: always
|
||||
expose:
|
||||
- "9994"
|
||||
- "9995"
|
||||
- "9996"
|
||||
ports:
|
||||
- "9994:9994"
|
||||
- "9995:9995/tcp"
|
||||
- "9996:9996/tcp"
|
||||
- "9995:9995/udp"
|
||||
- "9996:9996/udp"
|
||||
environment:
|
||||
HBASE_HOST: pinpoint-hbase
|
||||
HBASE_PORT: 2181
|
||||
COLLECTOR_TCP_PORT: 9994
|
||||
COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
|
||||
COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
|
||||
CLUSTER_ENABLE: 'true'
|
||||
CLUSTER_ZOOKEEPER_ADDRESS: pinpoint-hbase
|
||||
# CLUSTER_LISTEN_IP:
|
||||
# CLUSTER_LISTEN_PORT
|
||||
DISABLE_DEBUG: 'true'
|
||||
TZ: "America/Recife"
|
||||
|
||||
pinpoint-web:
|
||||
depends_on:
|
||||
- pinpoint-hbase
|
||||
- pinpoint-mysql
|
||||
container_name: pinpoint-web
|
||||
image: marcosamm/pinpoint-web:1.6.2
|
||||
restart: always
|
||||
expose:
|
||||
- "8080"
|
||||
- "9997"
|
||||
ports:
|
||||
- "9997:9997/tcp"
|
||||
- "28080:8080"
|
||||
environment:
|
||||
HBASE_HOST: pinpoint-hbase
|
||||
HBASE_PORT: 2181
|
||||
CLUSTER_ENABLE: 'true'
|
||||
CLUSTER_ZOOKEEPER_ADDRESS: pinpoint-hbase
|
||||
CLUSTER_WEB_TCP_PORT: 9997
|
||||
# CLUSTER_CONNECT_ADDRESS:
|
||||
# CONFIG_SENDUSAGE: 'false'
|
||||
ADMIN_PASSWORD: admin123
|
||||
DISABLE_DEBUG: 'true'
|
||||
JDBC_DRIVER: com.mysql.jdbc.Driver
|
||||
JDBC_URL: jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8
|
||||
JDBC_USERNAME: admin
|
||||
JDBC_PASSWORD: admin
|
||||
BATCH_ENABLE: 'true'
|
||||
# BATCH_SERVER_IP: 127.0.0.1
|
||||
MAIL_HOST: stmp.test.com
|
||||
MAIL_PORT: 123
|
||||
MAIL_USERNAME: user
|
||||
MAIL_PASSWORD: pass
|
||||
# MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL: smtp
|
||||
MAIL_PROPERTIES_MAIL_SMTP_AUTH: 'true'
|
||||
MAIL_PROPERTIES_MAIL_SMTP_PORT: 587
|
||||
# MAIL_PROPERTIES_MAIL_SMTP_FROM: test@example.com
|
||||
MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE: 'true'
|
||||
# MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED: 'true'
|
||||
# MAIL_PROPERTIES_MAIL_DEBUG: 'true'
|
||||
TZ: "America/Recife"
|
||||
|
||||
volumes:
|
||||
mysql_data:
|
||||
hbase_data:
|
||||
hbase_zookeeper_data:
|
||||
|
||||
# only example
|
||||
# pinpoint-agent:
|
||||
# image: marcosamm/pinpoint-agent:1.6.2
|
||||
# net: "none"
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - /var/container_data/pinpoint-agent/log:/opt/app/pinpoint-agent/log:rw
|
||||
# environment:
|
||||
# COLLECTOR_IP: 192.168.99.100
|
||||
# COLLECTOR_TCP_PORT: 9994
|
||||
# COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
|
||||
# COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
|
||||
# DISABLE_DEBUG: 'true'
|
||||
@@ -0,0 +1,5 @@
|
||||
* [Rancher server with docker-compose.yml](rancher-server-with-docker-compose)
|
||||
|
||||
* [Using docker image with embedded pinpoint-agent](joinfaces-example-with-docker-image)
|
||||
|
||||
* [Monitoring application with pinpoint during automated testing](joinfaces-example-with-selenium-test)
|
||||
@@ -0,0 +1,11 @@
|
||||
# DESCRIPTION Monitoring JoinFaces-example with pinpoint-agent
|
||||
# TO_BUILD docker build -t joinfaces-example-with-pinpoint-agent .
|
||||
# TO_RUN docker run -d -p 8080:8080 joinfaces-example-with-pinpoint-agent
|
||||
FROM marcosamm/pinpointagent-oraclejre:latest
|
||||
|
||||
COPY app/joinfaces-example/ /opt/joinfaces-example
|
||||
COPY app/pinpoint-agent/ /opt/pinpoint-agent
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["java", "-javaagent:/opt/pinpoint-agent/pinpoint-bootstrap.jar", "-Dpinpoint.agentId=dockerfile", "-Dpinpoint.applicationName=joinfaces-example", "-jar", "/opt/joinfaces-example/joinfaces-example-2.4.0-SNAPSHOT.jar"]
|
||||
@@ -0,0 +1,41 @@
|
||||
# Monitoring joinfaces-example application with docker image
|
||||
This example shows how to run and monitor the joinfaces-example application with pinpoint-agent
|
||||
|
||||
## Running with [Dockerfile](Dockerfile)
|
||||
### - To build the image
|
||||
```
|
||||
docker build -t joinfaces-example-with-pinpoint-agent .
|
||||
```
|
||||
|
||||
### - To run container
|
||||
```
|
||||
docker run -d -p 8080:8080 joinfaces-example-with-pinpoint-agent
|
||||
```
|
||||
|
||||
## Running without Dockerfile
|
||||
```
|
||||
docker run -it --rm \
|
||||
-e COLLECTOR_IP="192.168.0.18" \
|
||||
-p 8080:8080 \
|
||||
-v /home/marcosamm/apps/joinfaces-example-2.4.0-SNAPSHOT.jar:/opt/apps/app.jar \
|
||||
marcosamm/pinpointagent-oraclejre \
|
||||
/bin/sh -c "java -javaagent:/opt/pinpoint-agent/pinpoint-bootstrap.jar -Dpinpoint.agentId=agent1 -Dpinpoint.applicationName=joinfaces-example -jar /opt/apps/app.jar"
|
||||
```
|
||||
See too:
|
||||
* [marcosamm/pinpointagent-oraclejre](https://hub.docker.com/r/marcosamm/pinpointagent-oraclejre/)
|
||||
* [marcosamm/pinpointagent-openjre](https://hub.docker.com/r/marcosamm/pinpointagent-openjre/)
|
||||
|
||||
## To access
|
||||
http://localhost:8080
|
||||
|
||||
## Notes
|
||||
* The following environment variables can be used to set pinpoint-agent configuration properties (pinpoint.config):
|
||||
- COLLECTOR_IP
|
||||
- PROFILER_APPLICATIONSERVERTYPE
|
||||
- PROFILER_TOMCAT_CONDITIONAL_TRANSFORM
|
||||
- PROFILER_SAMPLING_RATE
|
||||
- PROFILER_JSON_JSONLIB
|
||||
- PROFILER_JSON_JACKSON
|
||||
- PROFILER_JSON_GSON
|
||||
* You can map a custom configuration file as a volume with the option: -v /path/to/pinpoint.config:/opt/pinpoint-agent/pinpoint.config:rw
|
||||
* If the pinpoint.config file is mapped only with read permission (ro), do not use any environment variable to modify pinpoint-agent configuration parameters, this will cause errors.
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,429 @@
|
||||
#
|
||||
# Pinpoint agent configuration
|
||||
#
|
||||
|
||||
###########################################################
|
||||
# Collector server #
|
||||
###########################################################
|
||||
profiler.collector.ip=192.168.0.18
|
||||
|
||||
# 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.spandatasender.socket.type=OIO
|
||||
|
||||
profiler.statdatasender.write.queue.size=5120
|
||||
#profiler.statdatasender.socket.sendbuffersize=1048576
|
||||
#profiler.statdatasender.socket.timeout=3000
|
||||
profiler.statdatasender.chunk.size=16384
|
||||
profiler.statdatasender.socket.type=OIO
|
||||
|
||||
profiler.agentInfo.send.retry.interval=300000
|
||||
|
||||
# Allows TCP data command
|
||||
profiler.tcpdatasender.command.accept.enable=true
|
||||
profiler.tcpdatasender.command.activethread.enable=true
|
||||
profiler.tcpdatasender.command.activethread.count.enable=true
|
||||
profiler.tcpdatasender.command.activethread.threaddump.enable=true
|
||||
profiler.tcpdatasender.command.activethread.threadlightdump.enable=true
|
||||
|
||||
# Trace Agent active thread info
|
||||
profiler.pinpoint.activethread=true
|
||||
|
||||
# Trace DataSource
|
||||
profiler.pinpoint.datasource=true
|
||||
|
||||
## Call Stack
|
||||
# Set max depth, if -1 is unlimited and min is 2.
|
||||
profiler.callstack.max.depth=64
|
||||
|
||||
# weather or not to propagate exceptions occurred at interceptor
|
||||
profiler.interceptor.exception.propagate=false
|
||||
|
||||
# Allow bytecode framework (JAVASSIST or ASM)
|
||||
profiler.instrument.engine=ASM
|
||||
|
||||
# bytecode dump option
|
||||
# java bytecode debug option
|
||||
bytecode.dump.enable=false
|
||||
#bytecode.dump.classlist=com.naver.user.UserService,com.pinpoint.debug.TestClass
|
||||
bytecode.dump.classlist=
|
||||
bytecode.dump.bytecode=false
|
||||
bytecode.dump.verify=false
|
||||
bytecode.dump.asm=false
|
||||
|
||||
###########################################################
|
||||
# application type #
|
||||
###########################################################
|
||||
#profiler.applicationservertype=TOMCAT
|
||||
#profiler.applicationservertype=BLOC
|
||||
|
||||
|
||||
###########################################################
|
||||
# user defined classes #
|
||||
###########################################################
|
||||
profiler.include=
|
||||
profiler.entrypoint=
|
||||
|
||||
###########################################################
|
||||
# TOMCAT #
|
||||
###########################################################
|
||||
profiler.tomcat.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.tomcat.bootstrap.main=org.apache.catalina.startup.Bootstrap
|
||||
# Check pre-conditions when registering class file transformers mainly due to JBoss plugin transforming the same class.
|
||||
# Setting this to true currently adds transformers only if the application was launched via org.apache.catalina.startup.Bootstrap,
|
||||
# or SpringBoot's launchers.
|
||||
# Set this to false to bypass this check entirely (such as when launching standalone applications running embedded Tomcat).
|
||||
profiler.tomcat.conditional.transform=false
|
||||
# Hide pinpoint headers.
|
||||
profiler.tomcat.hidepinpointheader=true
|
||||
# URLs to exclude from tracing
|
||||
profiler.tomcat.excludeurl=/aa/test.html, /bb/exclude.html
|
||||
profiler.tomcat.tracerequestparam=true
|
||||
|
||||
# original IP address header
|
||||
# https://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
#profiler.tomcat.realipheader=X-Forwarded-For
|
||||
# nginx real ip header
|
||||
#profiler.tomcat.realipheader=X-Real-IP
|
||||
# optional parameter, If the header value is ${profiler.tomcat.realipemptyvalue}, Ignore header value.
|
||||
#profiler.tomcat.realipemptyvalue=unknown
|
||||
|
||||
|
||||
###########################################################
|
||||
# JETTY #
|
||||
###########################################################
|
||||
profiler.jetty.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.jetty.bootstrap.main=org.eclipse.jetty.start.Main
|
||||
# URLs to exclude from tracing
|
||||
profiler.jetty.excludeurl=
|
||||
|
||||
|
||||
###########################################################
|
||||
# DUBBO #
|
||||
###########################################################
|
||||
profiler.dubbo.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.dubbo.bootstrap.main=com.alibaba.dubbo.container.Main
|
||||
|
||||
|
||||
###########################################################
|
||||
# JBOSS #
|
||||
###########################################################
|
||||
profiler.jboss.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.jboss.bootstrap.main=org.jboss.modules.Main
|
||||
# Check pre-conditions when registering class file transformers mainly due to Tomcat plugin transforming the same class.
|
||||
# Setting this to true currently adds transformers only if the application was launched via org.jboss.modules.Main.
|
||||
# Set this to false to bypass this check entirely.
|
||||
profiler.jboss.conditional.transform=true
|
||||
# Hide pinpoint headers.
|
||||
profiler.jboss.hidepinpointheader=true
|
||||
# URLs to exclude from tracing
|
||||
profiler.jboss.excludeurl=
|
||||
# HTTP Request methods to exclude from tracing
|
||||
#profiler.jboss.excludemethod=
|
||||
profiler.jboss.tracerequestparam=true
|
||||
|
||||
# original IP address header
|
||||
# https://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
#profiler.jboss.realipheader=X-Forwarded-For
|
||||
# nginx real ip header
|
||||
#profiler.jboss.realipheader=X-Real-IP
|
||||
# optional parameter, If the header value is ${profiler.jboss.realipemptyvalue}, Ignore header value.
|
||||
#profiler.jboss.realipemptyvalue=unknown
|
||||
|
||||
###########################################################
|
||||
# Vert.x(Reliability and stability can not be guaranteed) #
|
||||
###########################################################
|
||||
profiler.vertx.enable=false
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.vertx.bootstrap.main=io.vertx.core.Starter
|
||||
# Track Vertx.runOnContext() & Vertx.executeBlocking().
|
||||
# Sets the class name that implements io.vertx.core.Handler.
|
||||
# Improvement is in progress.
|
||||
profiler.vertx.handlers=
|
||||
|
||||
# HTTP server
|
||||
profiler.vertx.http.server.enable=false
|
||||
profiler.vertx.http.server.tracerequestparam=true
|
||||
# URLs to exclude from tracing
|
||||
profiler.vertx.http.server.excludeurl=
|
||||
# original IP address header
|
||||
# https://en.wikipedia.org/wiki/X-Forwarded-For
|
||||
#profiler.vertx.http.server.realipheader=X-Forwarded-For
|
||||
# nginx real ip header
|
||||
#profiler.vertx.http.realipheader=X-Real-IP
|
||||
# optional parameter, If the header value is ${profiler.vertx.http.server.realipemptyvalue}, Ignore header value.
|
||||
#profiler.vertx.http.server.realipemptyvalue=unknown
|
||||
# HTTP Request methods to exclude from tracing
|
||||
#profiler.vertx.http.server.excludemethod=
|
||||
|
||||
# HTTP client
|
||||
profiler.vertx.http.client.enable=false
|
||||
profiler.vertx.http.client.param=true
|
||||
profiler.vertx.http.client.cookie=true
|
||||
# When to dump cookies. Either ALWAYS or EXCEPTION.
|
||||
profiler.vertx.http.client.cookie.dumptype=ALWAYS
|
||||
# 1 out of n cookies will be sampled where n is the rate. (1: 100%)
|
||||
profiler.vertx.http.client.cookie.sampling.rate=1
|
||||
profiler.vertx.http.client.entity.statuscode=true
|
||||
|
||||
###########################################################
|
||||
# SPRING BOOT #
|
||||
###########################################################
|
||||
profiler.springboot.enable=true
|
||||
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
|
||||
profiler.springboot.bootstrap.main=org.springframework.boot.loader.JarLauncher, org.springframework.boot.loader.WarLauncher, org.springframework.boot.loader.PropertiesLauncher
|
||||
|
||||
|
||||
###########################################################
|
||||
# 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
|
||||
|
||||
#
|
||||
# DBCP2
|
||||
#
|
||||
profiler.jdbc.dbcp2=true
|
||||
profiler.jdbc.dbcp2.connectionclose=true
|
||||
|
||||
#
|
||||
# HIKARICP
|
||||
#
|
||||
profiler.jdbc.hikaricp=true
|
||||
profiler.jdbc.hikaricp.connectionclose=true
|
||||
|
||||
###########################################################
|
||||
# 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
|
||||
|
||||
|
||||
###########################################################
|
||||
# JDK HTTPURLConnection #
|
||||
###########################################################
|
||||
profiler.jdk.httpurlconnection=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
|
||||
|
||||
|
||||
###########################################################
|
||||
# LINE+ baseframework #
|
||||
###########################################################
|
||||
profiler.line.game.netty.param.dumpsize=512
|
||||
profiler.line.game.netty.entity.dumpsize=512
|
||||
|
||||
|
||||
###########################################################
|
||||
# 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
|
||||
###########################################################
|
||||
# Profile spring-beans
|
||||
profiler.spring.beans=true
|
||||
|
||||
# filters
|
||||
# filter
|
||||
# filter OR filters
|
||||
# filter
|
||||
# value
|
||||
# value AND filter
|
||||
# value
|
||||
# token
|
||||
# token OR token
|
||||
# token
|
||||
# profiler.spring.beans.n.scope= [component-scan | post-processor] default is component-scan.
|
||||
# profiler.spring.beans.n.base-packages= [package name, ...]
|
||||
# profiler.spring.beans.n.name.pattern= [regex pattern, regex:regex pattern, antstyle:antstyle pattern, ...]
|
||||
# profiler.spring.beans.n.class.pattern= [regex pattern, regex:regex pattern, antstyle:antstyle pattern, ...]
|
||||
# profiler.spring.beans.n.annotation= [annotation name, ...]
|
||||
#
|
||||
# Scope:
|
||||
# component-scan: <context:component-scan ... /> or @ComponentScan
|
||||
# post-processor: BeanPostProcessor - Slow!!!
|
||||
#
|
||||
# ANT Style pattern rules:
|
||||
# ? - matches on character
|
||||
# * - matches zero or more characters
|
||||
# ** - matches zero or more 'directories' in a path
|
||||
|
||||
# Examples
|
||||
# profiler.spring.beans.1.scope=component-scan
|
||||
# profiler.spring.beans.1.base-packages=com.foo, com.bar
|
||||
# profiler.spring.beans.1.name.pattern=.*Foo, regex:.*Bar, antstyle:*Controller
|
||||
# profiler.spring.beans.1.class.pattern=
|
||||
# profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository
|
||||
#
|
||||
# profiler.spring.beans.2.scope=post-processor
|
||||
# profiler.spring.beans.2.base-packages=com.foo
|
||||
# profiler.spring.beans.2.name.pattern=
|
||||
# profiler.spring.beans.2.class.pattern=antstyle:com.foo.repository.*Repository, antstyle:com.foo.Service.Main*
|
||||
# profiler.spring.beans.2.annotation=
|
||||
|
||||
profiler.spring.beans.1.scope=component-scan
|
||||
profiler.spring.beans.1.base-packages=
|
||||
profiler.spring.beans.1.name.pattern=
|
||||
profiler.spring.beans.1.class.pattern=
|
||||
profiler.spring.beans.1.annotation=org.springframework.stereotype.Controller,org.springframework.stereotype.Service,org.springframework.stereotype.Repository
|
||||
|
||||
profiler.spring.beans.mark.error=false
|
||||
###########################################################
|
||||
# log4j
|
||||
###########################################################
|
||||
profiler.log4j.logging.transactioninfo=false
|
||||
|
||||
###########################################################
|
||||
# logback
|
||||
###########################################################
|
||||
profiler.logback.logging.transactioninfo=false
|
||||
|
||||
###########################################################
|
||||
# gson
|
||||
###########################################################
|
||||
profiler.json.gson=true
|
||||
|
||||
###########################################################
|
||||
# jackson
|
||||
###########################################################
|
||||
profiler.json.jackson=true
|
||||
|
||||
###########################################################
|
||||
# json-lib
|
||||
###########################################################
|
||||
profiler.json.jsonlib=true
|
||||
|
||||
###########################################################
|
||||
# cxf
|
||||
###########################################################
|
||||
profiler.cxf.client=true
|
||||
#profiler.cxf.client.hiddenParams=
|
||||
@@ -0,0 +1,24 @@
|
||||
# DESCRIPTION joinjaces-example + pinpoint-agent
|
||||
# TO_BUILD docker build -t joinfaces-exemple-with-pinpoint-agent .
|
||||
# TO_RUN docker run -it \
|
||||
# -e COLLECTOR_IP="198.162.0.18" \
|
||||
# -e PROFILER_APPLICATIONSERVERTYPE="TOMCAT" \
|
||||
# -e PROFILER_TOMCAT_CONDITIONAL_TRANSFORM="false" \
|
||||
# -e PROFILER_SAMPLING_RATE="1" \
|
||||
# -e PROFILER_JSON_JSONLIB="true" \
|
||||
# -e PROFILER_JSON_JACKSON="true" \
|
||||
# -e PROFILER_JSON_GSON="true" \
|
||||
# -v /home/marcosamm/.m2/repository:/root/.m2/repository \
|
||||
# joinfaces-exemple-with-pinpoint-agent \
|
||||
# /bin/sh -c "xvfb-run mvn -DwebDriverType=chrome install verify"
|
||||
|
||||
FROM marcosamm/pinpointagent-chrome-maven-oraclejdk:latest
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
RUN wget https://github.com/marcosamm/joinfaces-example/archive/master.zip \
|
||||
&& unzip master.zip \
|
||||
&& mv joinfaces-example-master joinfaces-example \
|
||||
&& rm master.zip
|
||||
|
||||
WORKDIR /opt/joinfaces-example
|
||||
@@ -0,0 +1,54 @@
|
||||
# Monitoring joinfaces-example application with selenium tests
|
||||
This example shows how to monitor the joinfaces-example application while running automated tests
|
||||
|
||||
## Running with [Dockerfile](Dockerfile)
|
||||
### - To build the image
|
||||
```
|
||||
docker build -t joinfaces-exemple-with-pinpoint-agent .
|
||||
```
|
||||
|
||||
### - To run container
|
||||
```
|
||||
docker run -it \
|
||||
-e COLLECTOR_IP="198.162.0.18" \
|
||||
-e PROFILER_APPLICATIONSERVERTYPE="TOMCAT" \
|
||||
-e PROFILER_TOMCAT_CONDITIONAL_TRANSFORM="false" \
|
||||
-e PROFILER_SAMPLING_RATE="1" \
|
||||
-e PROFILER_JSON_JSONLIB="true" \
|
||||
-e PROFILER_JSON_JACKSON="true" \
|
||||
-e PROFILER_JSON_GSON="true" \
|
||||
-v /home/marcosamm/.m2/repository:/root/.m2/repository \
|
||||
joinfaces-exemple-with-pinpoint-agent \
|
||||
/bin/sh -c "xvfb-run mvn -DwebDriverType=chrome install verify"
|
||||
```
|
||||
|
||||
## Running without Dockerfile
|
||||
```
|
||||
docker run -it --rm \
|
||||
-e COLLECTOR_IP="192.168.0.18" \
|
||||
-e PROFILER_APPLICATIONSERVERTYPE="TOMCAT" \
|
||||
-e PROFILER_TOMCAT_CONDITIONAL_TRANSFORM="false" \
|
||||
-v /home/marcosamm/git/joinfaces-example/:/opt/app/ \
|
||||
-v /home/marcosamm/.m2/repository:/root/.m2/repository \
|
||||
marcosamm/pinpointagent-firefox-maven-oraclejdk \
|
||||
/bin/sh -c "cd /opt/app/; xvfb-run mvn clean install verify"
|
||||
```
|
||||
See too:
|
||||
* [marcosamm/pinpointagent-chrome-maven-openjdk](https://hub.docker.com/r/marcosamm/pinpointagent-chrome-maven-openjdk/)
|
||||
* [marcosamm/pinpointagent-chrome-maven-oraclejdk](https://hub.docker.com/r/marcosamm/pinpointagent-chrome-maven-oraclejdk/)
|
||||
* [marcosamm/pinpointagent-chromium-maven-openjdk](https://hub.docker.com/r/marcosamm/pinpointagent-chromium-maven-openjdk/)
|
||||
* [marcosamm/pinpointagent-chromium-maven-oraclejdk](https://hub.docker.com/r/marcosamm/pinpointagent-chromium-maven-oraclejdk/)
|
||||
* [marcosamm/pinpointagent-firefox-maven-openjdk](https://hub.docker.com/r/marcosamm/pinpointagent-firefox-maven-openjdk/)
|
||||
* [marcosamm/pinpointagent-firefox-maven-oraclejdk](https://hub.docker.com/r/marcosamm/pinpointagent-firefox-maven-oraclejdk/)
|
||||
|
||||
## Notes
|
||||
* The following environment variables can be used to set pinpoint-agent configuration properties (pinpoint.config):
|
||||
- COLLECTOR_IP
|
||||
- PROFILER_APPLICATIONSERVERTYPE
|
||||
- PROFILER_TOMCAT_CONDITIONAL_TRANSFORM
|
||||
- PROFILER_SAMPLING_RATE
|
||||
- PROFILER_JSON_JSONLIB
|
||||
- PROFILER_JSON_JACKSON
|
||||
- PROFILER_JSON_GSON
|
||||
* You can map a custom configuration file as a volume with the option: -v /path/to/pinpoint.config:/opt/pinpoint-agent/pinpoint.config:rw
|
||||
* If the pinpoint.config file is mapped only with read permission (ro), do not use any environment variable to modify pinpoint-agent configuration parameters, this will cause errors.
|
||||
@@ -0,0 +1,22 @@
|
||||
rancher-server:
|
||||
image: rancher/server:v1.3.0
|
||||
restart: unless-stopped
|
||||
volumes_from:
|
||||
- pinpoint-agent
|
||||
ports:
|
||||
- 8080:8080
|
||||
environment:
|
||||
JAVA_OPTS: "-javaagent:/assets/pinpoint-agent/pinpoint-bootstrap.jar -Dpinpoint.agentId=app-in-docker -Dpinpoint.applicationName=app"
|
||||
|
||||
pinpoint-agent:
|
||||
image: marcosamm/pinpoint-agent:1.6.2
|
||||
net: "none"
|
||||
restart: unless-stopped
|
||||
# volumes:
|
||||
# - /var/container_data/pinpoint-agent/log:/opt/app/pinpoint-agent/log:rw
|
||||
environment:
|
||||
COLLECTOR_IP: 192.168.0.18
|
||||
COLLECTOR_TCP_PORT: 9994
|
||||
COLLECTOR_UDP_STAT_LISTEN_PORT: 9995
|
||||
COLLECTOR_UDP_SPAN_LISTEN_PORT: 9996
|
||||
DISABLE_DEBUG: 'true'
|
||||
+18
-12
@@ -2,21 +2,27 @@
|
||||
# TO_BUILD docker build -t pinpoint-agent .
|
||||
# TO_RUN docker run --name=pinpoint-agent pinpoint-agent
|
||||
|
||||
FROM alpine:3.2
|
||||
FROM alpine:3.5
|
||||
|
||||
ENV PINPOINT_VERSION 1.1.1
|
||||
ENV PINPOINT_VERSION=1.6.2
|
||||
ENV PINPOINT_AGENT_HOME /assets/pinpoint-agent
|
||||
|
||||
RUN apk add --update curl bash
|
||||
ADD configure-agent.sh /usr/local/bin/
|
||||
|
||||
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 \
|
||||
RUN apk add --update curl bash \
|
||||
&& chmod a+x /usr/local/bin/configure-agent.sh \
|
||||
&& mkdir -p $PINPOINT_AGENT_HOME \
|
||||
&& curl -SL https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-agent-$PINPOINT_VERSION.tar.gz -o pinpoint-agent-$PINPOINT_VERSION.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
|
||||
&& tar -xf pinpoint-agent-$PINPOINT_VERSION.tar -C $PINPOINT_AGENT_HOME \
|
||||
&& sed -i 's/DEBUG/INFO/' $PINPOINT_AGENT_HOME/lib/log4j.xml \
|
||||
&& rm pinpoint-agent-$PINPOINT_VERSION.tar \
|
||||
&& cd $PINPOINT_AGENT_HOME \
|
||||
&& mv pinpoint-bootstrap-$PINPOINT_VERSION.jar pinpoint-bootstrap.jar
|
||||
&& apk del curl \
|
||||
&& rm /var/cache/apk/*
|
||||
|
||||
ADD configure.sh /configure.sh
|
||||
RUN chmod a+x /configure.sh
|
||||
VOLUME [$PINPOINT_AGENT_HOME]
|
||||
|
||||
VOLUME /opt/app/pinpoint-agent
|
||||
|
||||
CMD ["/configure.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/configure-agent.sh"]
|
||||
CMD ["tail -f /dev/null"]
|
||||
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
PINPOINT_AGENT_HOME=${PINPOINT_AGENT_HOME:-/opt/pinpoint-agent}
|
||||
|
||||
COLLECTOR_IP=${COLLECTOR_IP:-}
|
||||
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:-}
|
||||
|
||||
PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE:-}
|
||||
|
||||
PROFILER_APPLICATIONSERVERTYPE=${PROFILER_APPLICATIONSERVERTYPE:-}
|
||||
PROFILER_TOMCAT_CONDITIONAL_TRANSFORM=${PROFILER_TOMCAT_CONDITIONAL_TRANSFORM:-}
|
||||
|
||||
PROFILER_JSON_GSON=${PROFILER_JSON_GSON:-}
|
||||
PROFILER_JSON_JACKSON=${PROFILER_JSON_JACKSON:-}
|
||||
PROFILER_JSON_JSONLIB=${PROFILER_JSON_JSONLIB:-}
|
||||
|
||||
DISABLE_DEBUG=${DISABLE_DEBUG:-true}
|
||||
|
||||
if [ "$COLLECTOR_IP" != "" ]; then
|
||||
sed -i "/profiler.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$COLLECTOR_TCP_PORT" != "" ]; then
|
||||
sed -i "/profiler.collector.tcp.port=/ s/=.*/=${COLLECTOR_TCP_PORT}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$COLLECTOR_UDP_STAT_LISTEN_PORT" != "" ]; then
|
||||
sed -i "/profiler.collector.stat.port=/ s/=.*/=${COLLECTOR_UDP_STAT_LISTEN_PORT}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$COLLECTOR_UDP_SPAN_LISTEN_PORT" != "" ]; then
|
||||
sed -i "/profiler.collector.span.port=/ s/=.*/=${COLLECTOR_UDP_SPAN_LISTEN_PORT}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_SAMPLING_RATE" != "" ]; then
|
||||
sed -i "/profiler.sampling.rate=/ s/=.*/=${PROFILER_SAMPLING_RATE}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_APPLICATIONSERVERTYPE" != "" ]; then
|
||||
sed -i "/#profiler.applicationservertype=/ s/=.*/=${PROFILER_APPLICATIONSERVERTYPE}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_TOMCAT_CONDITIONAL_TRANSFORM" != "" ]; then
|
||||
sed -i "/profiler.tomcat.conditional.transform=/ s/=.*/=${PROFILER_TOMCAT_CONDITIONAL_TRANSFORM}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_JSON_GSON" != "" ]; then
|
||||
sed -i "/profiler.json.gson=/ s/=.*/=${PROFILER_JSON_GSON}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_JSON_JACKSON" != "" ]; then
|
||||
sed -i "/profiler.json.jackson=/ s/=.*/=${PROFILER_JSON_JACKSON}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
if [ "$PROFILER_JSON_JSONLIB" != "" ]; then
|
||||
sed -i "/profiler.json.jsonlib=/ s/=.*/=${PROFILER_JSON_JSONLIB}/" ${PINPOINT_AGENT_HOME}/pinpoint.config
|
||||
fi
|
||||
|
||||
if [ "$DISABLE_DEBUG" == "true" ]; then
|
||||
sed -i 's/level value="DEBUG"/level value="INFO"/' ${PINPOINT_AGENT_HOME}/lib/log4j.xml
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
COLLECTOR_IP=${COLLECTOR_IP:-}
|
||||
|
||||
sed -i 's/profiler.collector.ip=127.0.0.1/profiler.collector.ip='"${COLLECTOR_IP}"'/' /opt/app/pinpoint-agent/pinpoint.config
|
||||
@@ -1,209 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
@@ -4,9 +4,15 @@
|
||||
|
||||
FROM tomcat:8-jre8
|
||||
|
||||
ENV PINPOINT_VERSION 1.1.1
|
||||
ENV PINPOINT_VERSION=1.6.2
|
||||
|
||||
RUN curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-collector-$PINPOINT_VERSION.war" -o pinpoint-collector.war \
|
||||
ADD start-collector.sh /usr/local/bin/
|
||||
|
||||
RUN chmod a+x /usr/local/bin/start-collector.sh \
|
||||
&& mkdir -p /assets \
|
||||
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/collector/src/main/resources/pinpoint-collector.properties -o /assets/pinpoint-collector.properties \
|
||||
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/collector/src/main/resources/hbase.properties -o /assets/hbase.properties \
|
||||
&& 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 \
|
||||
@@ -16,14 +22,6 @@ RUN curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERS
|
||||
&& 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
|
||||
EXPOSE 9994 9995 9996
|
||||
|
||||
ADD hbase.properties /assets/hbase.properties
|
||||
ADD pinpoint-collector.properties /assets/pinpoint-collector.properties
|
||||
|
||||
EXPOSE 9994
|
||||
EXPOSE 9995
|
||||
EXPOSE 9996
|
||||
|
||||
CMD ["/usr/local/tomcat/start.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/start-collector.sh"]
|
||||
@@ -1,22 +0,0 @@
|
||||
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
|
||||
@@ -1,30 +0,0 @@
|
||||
# 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,42 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
CLUSTER_ENABLE=${CLUSTER_ENABLE:-false}
|
||||
CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS:-localhost}
|
||||
CLUSTER_LISTEN_IP=${CLUSTER_LISTEN_IP:-}
|
||||
CLUSTER_LISTEN_PORT=${CLUSTER_LISTEN_PORT:-}
|
||||
|
||||
COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT:-9994}
|
||||
COLLECTOR_UDP_STAT_LISTEN_PORT=${COLLECTOR_UDP_STAT_LISTEN_PORT:-9995}
|
||||
COLLECTOR_UDP_SPAN_LISTEN_PORT=${COLLECTOR_UDP_SPAN_LISTEN_PORT:-9996}
|
||||
|
||||
HBASE_HOST=${HBASE_HOST:-localhost}
|
||||
HBASE_PORT=${HBASE_PORT:-2181}
|
||||
|
||||
DISABLE_DEBUG=${DISABLE_DEBUG:-true}
|
||||
|
||||
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 -i "s/cluster.enable=true/cluster.enable=${CLUSTER_ENABLE}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed -i "s/cluster.zookeeper.address=localhost/cluster.zookeeper.address=${CLUSTER_ZOOKEEPER_ADDRESS}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
if [ "$CLUSTER_LISTEN_IP" != "" ]; then
|
||||
sed -i "/cluster.listen.ip=/ s/=.*/=${CLUSTER_LISTEN_IP}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
fi
|
||||
if [ "$CLUSTER_LISTEN_PORT" != "" ]; then
|
||||
sed -i "/cluster.listen.port=/ s/=.*/=${CLUSTER_LISTEN_PORT}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
fi
|
||||
|
||||
sed -i "s/collector.tcpListenPort=9994/collector.tcpListenPort=${COLLECTOR_TCP_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed -i "s/collector.udpStatListenPort=9995/collector.udpStatListenPort=${COLLECTOR_UDP_STAT_LISTEN_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed -i "s/collector.udpSpanListenPort=9996/collector.udpSpanListenPort=${COLLECTOR_UDP_SPAN_LISTEN_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
|
||||
sed -i "s/hbase.client.host=localhost/hbase.client.host=${HBASE_HOST}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
sed -i "s/hbase.client.port=2181/hbase.client.port=${HBASE_PORT}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
|
||||
if [ "$DISABLE_DEBUG" == "true" ]; then
|
||||
sed -i 's/level value="DEBUG"/level value="INFO"/' /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.xml
|
||||
fi
|
||||
|
||||
exec /usr/local/tomcat/bin/catalina.sh run
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/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
|
||||
+21
-21
@@ -1,41 +1,41 @@
|
||||
# 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
|
||||
# TO_RUN docker run -d --net=host -p 2181:2181 -p 60000:60000 -p 16010:16010 -p 60020:60020 -p 16030:16030 --name=pinpoint-hbase pinpoint-hbase
|
||||
|
||||
FROM java:8-jdk
|
||||
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
|
||||
ENV HBASE_VERSION 1.0.2
|
||||
ENV HBASE_HOME /opt/hbase/hbase-$HBASE_VERSION
|
||||
ENV PINPOINT_VERSION 1.1.1
|
||||
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||
ENV HBASE_VERSION=1.2.3
|
||||
ENV HBASE_HOME=/opt/hbase/hbase-$HBASE_VERSION
|
||||
ENV PINPOINT_VERSION=1.6.2
|
||||
ENV HBASE_REPOSITORY=http://apache.mirrors.pair.com/hbase
|
||||
ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/hbase
|
||||
|
||||
RUN mkdir -p /opt/hbase && \
|
||||
cd /opt/hbase && \
|
||||
curl -SL "http://apache.mirrors.pair.com/hbase/hbase-$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz" -o hbase.tar.gz && \
|
||||
tar xfvz hbase.tar.gz && \
|
||||
rm -rf hbase.tar.gz
|
||||
RUN mkdir -p /opt/hbase \
|
||||
&& cd /opt/hbase \
|
||||
&& curl -fSL "$HBASE_REPOSITORY/$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz" -o hbase.tar.gz || curl -fSL "$HBASE_SUB_REPOSITORY/$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
|
||||
RUN curl -SL "https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/hbase/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
|
||||
VOLUME ["/home/pinpoint/hbase", "/home/pinpoint/zookeeper"]
|
||||
|
||||
# zookeeper
|
||||
EXPOSE 2181
|
||||
# HBase Master API port
|
||||
EXPOSE 60000
|
||||
# HBase Master Web UI
|
||||
EXPOSE 60010
|
||||
EXPOSE 16010
|
||||
# Regionserver API port
|
||||
EXPOSE 60020
|
||||
# HBase Regionserver web UI
|
||||
EXPOSE 60030
|
||||
|
||||
CMD /opt/hbase/hbase-$HBASE_VERSION/bin/hbase master start
|
||||
EXPOSE 16030
|
||||
|
||||
ENTRYPOINT /opt/hbase/hbase-$HBASE_VERSION/bin/hbase master start
|
||||
@@ -0,0 +1,56 @@
|
||||
CREATE TABLE `user_group` (
|
||||
`number` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id` VARCHAR(30) NOT NULL,
|
||||
PRIMARY KEY (`number`)
|
||||
);
|
||||
ALTER TABLE user_group ADD UNIQUE KEY id_idx (id);
|
||||
|
||||
CREATE TABLE `user_group_member` (
|
||||
`number` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`user_group_id` VARCHAR(30) NOT NULL,
|
||||
`member_id` VARCHAR(30) NOT NULL,
|
||||
PRIMARY KEY (`number`)
|
||||
);
|
||||
ALTER TABLE user_group_member ADD UNIQUE KEY user_group_id_member_id_idx (`user_group_id`,`member_id`);
|
||||
|
||||
CREATE TABLE `puser` (
|
||||
`number` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`user_id` VARCHAR(30) NOT NULL,
|
||||
`name` VARCHAR(150) NOT NULL,
|
||||
`department` VARCHAR(150) NOT NULL,
|
||||
`phonenumber` VARCHAR(100),
|
||||
`email` VARCHAR(100),
|
||||
PRIMARY KEY (`number`)
|
||||
);
|
||||
ALTER TABLE puser ADD UNIQUE KEY user_id_idx (`user_id`);
|
||||
|
||||
CREATE TABLE `alarm_rule` (
|
||||
`rule_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`application_id` VARCHAR(30) NOT NULL,
|
||||
`service_type` VARCHAR(30) NOT NULL,
|
||||
`checker_name` VARCHAR(50) NOT NULL,
|
||||
`threshold` INT(10) DEFAULT NULL,
|
||||
`user_group_id` VARCHAR(30) NOT NULL,
|
||||
`sms_send` CHAR(1) DEFAULT NULL,
|
||||
`email_send` CHAR(1) DEFAULT NULL,
|
||||
`notes` VARCHAR(100) DEFAULT NULL,
|
||||
PRIMARY KEY (`rule_id`)
|
||||
);
|
||||
ALTER TABLE alarm_rule ADD UNIQUE KEY application_id_checker_name_user_group_id_idx (application_id, user_group_id, checker_name);
|
||||
|
||||
CREATE TABLE `alarm_history` (
|
||||
`history_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`application_id` VARCHAR(30) NOT NULL,
|
||||
`checker_name` VARCHAR(50) NOT NULL,
|
||||
`detected` CHAR(1) DEFAULT NULL,
|
||||
`sequence_count` INT(10),
|
||||
`timing_count` INT(10),
|
||||
PRIMARY KEY (`history_id`)
|
||||
);
|
||||
ALTER TABLE alarm_history ADD UNIQUE KEY application_id_checker_name_idx (application_id, checker_name);
|
||||
|
||||
CREATE TABLE `agent_statistics` (
|
||||
`agent_count` INT(10) UNSIGNED NOT NULL,
|
||||
`date_val`DATETIME NOT NULL,
|
||||
PRIMARY KEY (`date_val`)
|
||||
);
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM mysql:5.7
|
||||
|
||||
ADD CreateTableStatement-mysql.sql /docker-entrypoint-initdb.d
|
||||
ADD SpringBatchJobReositorySchema-mysql.sql /docker-entrypoint-initdb.d
|
||||
@@ -0,0 +1,98 @@
|
||||
CREATE TABLE BATCH_JOB_INSTANCE (
|
||||
JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY ,
|
||||
VERSION BIGINT ,
|
||||
JOB_NAME VARCHAR(100) NOT NULL,
|
||||
JOB_KEY VARCHAR(32) NOT NULL,
|
||||
constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION (
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY ,
|
||||
VERSION BIGINT ,
|
||||
JOB_INSTANCE_ID BIGINT NOT NULL,
|
||||
CREATE_TIME DATETIME NOT NULL,
|
||||
START_TIME DATETIME DEFAULT NULL ,
|
||||
END_TIME DATETIME DEFAULT NULL ,
|
||||
STATUS VARCHAR(10) ,
|
||||
EXIT_CODE VARCHAR(100) ,
|
||||
EXIT_MESSAGE VARCHAR(2500) ,
|
||||
LAST_UPDATED DATETIME,
|
||||
constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID)
|
||||
references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_PARAMS (
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL ,
|
||||
TYPE_CD VARCHAR(6) NOT NULL ,
|
||||
KEY_NAME VARCHAR(100) NOT NULL ,
|
||||
STRING_VAL VARCHAR(250) ,
|
||||
DATE_VAL DATETIME DEFAULT NULL ,
|
||||
LONG_VAL BIGINT ,
|
||||
DOUBLE_VAL DOUBLE PRECISION ,
|
||||
IDENTIFYING CHAR(1) NOT NULL ,
|
||||
constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID)
|
||||
references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_STEP_EXECUTION (
|
||||
STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY ,
|
||||
VERSION BIGINT NOT NULL,
|
||||
STEP_NAME VARCHAR(100) NOT NULL,
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL,
|
||||
START_TIME DATETIME NOT NULL ,
|
||||
END_TIME DATETIME DEFAULT NULL ,
|
||||
STATUS VARCHAR(10) ,
|
||||
COMMIT_COUNT BIGINT ,
|
||||
READ_COUNT BIGINT ,
|
||||
FILTER_COUNT BIGINT ,
|
||||
WRITE_COUNT BIGINT ,
|
||||
READ_SKIP_COUNT BIGINT ,
|
||||
WRITE_SKIP_COUNT BIGINT ,
|
||||
PROCESS_SKIP_COUNT BIGINT ,
|
||||
ROLLBACK_COUNT BIGINT ,
|
||||
EXIT_CODE VARCHAR(100) ,
|
||||
EXIT_MESSAGE VARCHAR(2500) ,
|
||||
LAST_UPDATED DATETIME,
|
||||
constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID)
|
||||
references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT (
|
||||
STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY,
|
||||
SHORT_CONTEXT VARCHAR(2500) NOT NULL,
|
||||
SERIALIZED_CONTEXT TEXT ,
|
||||
constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID)
|
||||
references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT (
|
||||
JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY,
|
||||
SHORT_CONTEXT VARCHAR(2500) NOT NULL,
|
||||
SERIALIZED_CONTEXT TEXT ,
|
||||
constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID)
|
||||
references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE BATCH_STEP_EXECUTION_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=MYISAM;
|
||||
|
||||
INSERT INTO BATCH_STEP_EXECUTION_SEQ values(0, '0');
|
||||
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=MYISAM;
|
||||
|
||||
INSERT INTO BATCH_JOB_EXECUTION_SEQ values(0, '0');
|
||||
|
||||
CREATE TABLE BATCH_JOB_SEQ (
|
||||
ID BIGINT NOT NULL,
|
||||
UNIQUE_KEY CHAR(1) NOT NULL,
|
||||
constraint UNIQUE_KEY_UN unique (UNIQUE_KEY)
|
||||
) ENGINE=MYISAM;
|
||||
|
||||
INSERT INTO BATCH_JOB_SEQ values(0, '0');
|
||||
+14
-8
@@ -4,19 +4,25 @@
|
||||
|
||||
FROM tomcat:8-jre8
|
||||
|
||||
ENV PINPOINT_VERSION 1.1.1
|
||||
ENV PINPOINT_VERSION=1.6.2
|
||||
|
||||
ADD start.sh /usr/local/tomcat/start.sh
|
||||
ADD hbase.properties /assets/hbase.properties
|
||||
ADD pinpoint-web.properties /assets/pinpoint-web.properties
|
||||
ADD start-web.sh /usr/local/bin/
|
||||
ADD mail.zip /assets/mail.zip
|
||||
|
||||
RUN chmod a+x /usr/local/tomcat/start.sh\
|
||||
&& curl -SL "https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-web-$PINPOINT_VERSION.war" -o pinpoint-web.war \
|
||||
RUN chmod a+x /usr/local/bin/start-web.sh \
|
||||
&& mkdir -p /assets/ \
|
||||
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/web/src/main/resources/pinpoint-web.properties -o /assets/pinpoint-web.properties \
|
||||
&& curl -SL https://raw.githubusercontent.com/naver/pinpoint/$PINPOINT_VERSION/web/src/main/resources/hbase.properties -o /assets/hbase.properties \
|
||||
&& curl -SL https://github.com/naver/pinpoint/releases/download/$PINPOINT_VERSION/pinpoint-web-$PINPOINT_VERSION.war -o pinpoint-web.war \
|
||||
&& curl -SL https://maven.java.net/content/repositories/releases/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar -o javax.mail-1.5.2.jar \
|
||||
&& 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
|
||||
&& rm -rf pinpoint-web.war \
|
||||
&& mv javax.mail-1.5.2.jar /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/ \
|
||||
&& unzip /assets/mail.zip -d /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/ \
|
||||
&& rm -rf /assets/mail.zip
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/usr/local/tomcat/start.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/start-web.sh"]
|
||||
@@ -1,22 +0,0 @@
|
||||
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
|
||||
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
# local
|
||||
cluster.enable=false
|
||||
cluster.web.tcp.port=9995
|
||||
cluster.zookeeper.address=
|
||||
cluster.zookeeper.sessiontimeout=
|
||||
|
||||
# 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,131 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
CLUSTER_ENABLE=${CLUSTER_ENABLE:-false}
|
||||
CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS:-localhost}
|
||||
CLUSTER_WEB_TCP_PORT=${CLUSTER_WEB_TCP_PORT:-9997}
|
||||
CLUSTER_CONNECT_ADDRESS=${CLUSTER_CONNECT_ADDRESS:-}
|
||||
|
||||
ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
|
||||
|
||||
HBASE_HOST=${HBASE_HOST:-localhost}
|
||||
HBASE_PORT=${HBASE_PORT:-2181}
|
||||
|
||||
CONFIG_SENDUSAGE=${CONFIG_SENDUSAGE:-true}
|
||||
|
||||
DISABLE_DEBUG=${DISABLE_DEBUG:-true}
|
||||
|
||||
JDBC_DRIVER=${JDBC_DRIVER:-com.mysql.jdbc.Driver}
|
||||
JDBC_URL=${JDBC_URL:-jdbc:mysql://localhost:13306/pinpoint?characterEncoding=UTF-8}
|
||||
JDBC_USERNAME=${JDBC_USERNAME:-admin}
|
||||
JDBC_PASSWORD=${JDBC_PASSWORD:-admin}
|
||||
|
||||
echo -e "
|
||||
jdbc.driverClassName=${JDBC_DRIVER}
|
||||
jdbc.url=${JDBC_URL}
|
||||
jdbc.username=${JDBC_USERNAME}
|
||||
jdbc.password=${JDBC_PASSWORD}
|
||||
" > /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/jdbc.properties
|
||||
|
||||
BATCH_ENABLE=${BATCH_ENABLE:-false}
|
||||
BATCH_SERVER_IP=${BATCH_SERVER_IP:-127.0.0.1}
|
||||
MAIL_HOST=${MAIL_HOST:-}
|
||||
MAIL_PORT=${MAIL_PORT:-}
|
||||
MAIL_USERNAME=${MAIL_USERNAME:-}
|
||||
MAIL_PASSWORD=${MAIL_PASSWORD:-}
|
||||
MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL=${MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL:-smtp}
|
||||
MAIL_PROPERTIES_MAIL_SMTP_AUTH=${MAIL_PROPERTIES_MAIL_SMTP_AUTH:-true}
|
||||
MAIL_PROPERTIES_MAIL_SMTP_PORT=${MAIL_PROPERTIES_MAIL_SMTP_AUTH:-}
|
||||
MAIL_PROPERTIES_MAIL_SMTP_FROM=${MAIL_PROPERTIES_MAIL_SMTP_FROM:-}
|
||||
MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=${MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE:-true}
|
||||
MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=${MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED:-}
|
||||
MAIL_PROPERTIES_MAIL_DEBUG=${MAIL_PROPERTIES_MAIL_DEBUG:-}
|
||||
|
||||
#Manipuled files with SED
|
||||
WEB_INF_CLASSES_DIR=/usr/local/tomcat/webapps/ROOT/WEB-INF/classes
|
||||
BATCH_PROPERTIES_FILE=${WEB_INF_CLASSES_DIR}/batch.properties
|
||||
HBASE_PROPERTIES_FILE=${WEB_INF_CLASSES_DIR}/hbase.properties
|
||||
PINPOINT_WEB_PROPERTIES_FILE=${WEB_INF_CLASSES_DIR}/pinpoint-web.properties
|
||||
APPLICATION_CONTEXT_WEB_FILE=${WEB_INF_CLASSES_DIR}/applicationContext-web.xml
|
||||
APPLICATION_CONTEXT_MAIL_FILE=${WEB_INF_CLASSES_DIR}/applicationContext-mail.xml
|
||||
LOG4J_FILE=${WEB_INF_CLASSES_DIR}/log4j.xml
|
||||
|
||||
cp /assets/pinpoint-web.properties ${PINPOINT_WEB_PROPERTIES_FILE}
|
||||
cp /assets/hbase.properties ${HBASE_PROPERTIES_FILE}
|
||||
|
||||
sed -i "s/cluster.enable=true/cluster.enable=${CLUSTER_ENABLE}/g" ${PINPOINT_WEB_PROPERTIES_FILE}
|
||||
sed -i "s/cluster.zookeeper.address=localhost/cluster.zookeeper.address=${CLUSTER_ZOOKEEPER_ADDRESS}/g" ${PINPOINT_WEB_PROPERTIES_FILE}
|
||||
if [ "$CLUSTER_WEB_TCP_PORT" != "" ]; then
|
||||
sed -i "/cluster.web.tcp.port=/ s/=.*/=${CLUSTER_WEB_TCP_PORT}/" ${PINPOINT_WEB_PROPERTIES_FILE}
|
||||
fi
|
||||
if [ "$CLUSTER_CONNECT_ADDRESS" != "" ]; then
|
||||
sed -i "/cluster.connect.address=/ s/=.*/=${CLUSTER_CONNECT_ADDRESS}/" ${PINPOINT_WEB_PROPERTIES_FILE}
|
||||
fi
|
||||
|
||||
sed -i "s/admin.password=admin/admin.password=${ADMIN_PASSWORD}/g" ${PINPOINT_WEB_PROPERTIES_FILE}
|
||||
|
||||
sed -i "s/hbase.client.host=localhost/hbase.client.host=${HBASE_HOST}/g" ${HBASE_PROPERTIES_FILE}
|
||||
sed -i "s/hbase.client.port=2181/hbase.client.port=${HBASE_PORT}/g" ${HBASE_PROPERTIES_FILE}
|
||||
|
||||
if [ "$CONFIG_SENDUSAGE" != "" ]; then
|
||||
sed -i "/config.sendUsage=/ s/=.*/=${CONFIG_SENDUSAGE}/" ${PINPOINT_WEB_PROPERTIES_FILE}
|
||||
fi
|
||||
|
||||
if [ "$DISABLE_DEBUG" == "true" ]; then
|
||||
sed -i 's/level value="DEBUG"/level value="INFO"/' ${LOG4J_FILE}
|
||||
fi
|
||||
|
||||
if [ "$BATCH_ENABLE" == "true" ]; then
|
||||
sed -i "/batch.enable=/ s/=.*/=${BATCH_ENABLE}/" ${BATCH_PROPERTIES_FILE}
|
||||
|
||||
if [ "$BATCH_SERVER_IP" != "" ]; then
|
||||
sed -i "/batch.server.ip=/ s/=.*/=${BATCH_SERVER_IP}/" ${BATCH_PROPERTIES_FILE}
|
||||
fi
|
||||
|
||||
sed -i 's/<\/beans>/<import resource="classpath:applicationContext-mail.xml" \/><\/beans>/' ${APPLICATION_CONTEXT_WEB_FILE}
|
||||
|
||||
if [ "$MAIL_HOST" != "" ]; then
|
||||
sed -i "s/smtp.gmail.com/${MAIL_HOST}/" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PORT" != "" ]; then
|
||||
sed -i "s/587/${MAIL_PORT}/" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_USERNAME" != "" ]; then
|
||||
sed -i "s/UserName/${MAIL_USERNAME}/" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PASSWORD" != "" ]; then
|
||||
sed -i "s/PassWord/${MAIL_PASSWORD}/" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL" != "" ]; then
|
||||
PATTERN="mail.transport.protocol"
|
||||
sed -i "/${PATTERN}/ s/<\!-- \| -->//g;/${PATTERN}/ s/>.*</>${MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL}</" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PROPERTIES_MAIL_SMTP_PORT" != "" ]; then
|
||||
PATTERN="mail.smtp.port"
|
||||
sed -i "/${PATTERN}/ s/<\!-- \| -->//g;/${PATTERN}/ s/>.*</>${MAIL_PROPERTIES_MAIL_SMTP_PORT}</" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PROPERTIES_MAIL_SMTP_AUTH" != "" ]; then
|
||||
PATTERN="mail.smtp.auth"
|
||||
sed -i "/${PATTERN}/ s/<\!-- \| -->//g;/${PATTERN}/ s/>.*</>${MAIL_PROPERTIES_MAIL_SMTP_AUTH}</" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PROPERTIES_MAIL_SMTP_FROM" != "" ]; then
|
||||
PATTERN="mail.smtp.from"
|
||||
sed -i "/${PATTERN}/ s/<\!-- \| -->//g;/${PATTERN}/ s/>.*</>${MAIL_PROPERTIES_MAIL_SMTP_FROM}</" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE" != "" ]; then
|
||||
PATTERN="mail.smtp.starttls.enable"
|
||||
sed -i "/${PATTERN}/ s/<\!-- \| -->//g;/${PATTERN}/ s/>.*</>${MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE}</" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED" != "" ]; then
|
||||
PATTERN="mail.smtp.starttls.required"
|
||||
sed -i "/${PATTERN}/ s/<\!-- \| -->//g;/${PATTERN}/ s/>.*</>${MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED}</" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
if [ "$MAIL_PROPERTIES_MAIL_DEBUG" != "" ]; then
|
||||
PATTERN="mail.debug"
|
||||
sed -i "/${PATTERN}/ s/<\!-- \| -->//g;/${PATTERN}/ s/>.*</>${MAIL_PROPERTIES_MAIL_DEBUG}</" ${APPLICATION_CONTEXT_MAIL_FILE}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
exec /usr/local/tomcat/bin/catalina.sh run
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/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