Initial updates
This commit is contained in:
commit
c49e5665fa
|
@ -0,0 +1,74 @@
|
|||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-Hbase
|
||||
|
||||
PINPOINT_HBASE_NAME=pinpoint-hbase
|
||||
#config for hbase in external docker
|
||||
EXTERNAL_HBASE_PORT=2180
|
||||
|
||||
|
||||
### Pinpoint-Web
|
||||
|
||||
PINPOINT_WEB_NAME=pinpoint-web
|
||||
|
||||
WEB_PAGE_PORT=8079
|
||||
|
||||
CLUSTER_ENABLE=true
|
||||
#CLUSTER_WEB_TCP_PORT=9997
|
||||
CLUSTER_ZOOKEEPER_ADDRESS=zoo1
|
||||
|
||||
ADMIN_PASSWORD=admin
|
||||
|
||||
ANALYTICS=true
|
||||
|
||||
HBASE_HOST=pinpoint-hbase
|
||||
HBASE_PORT=2181
|
||||
|
||||
WEB_DEBUG_LEVEL=INFO
|
||||
|
||||
BATCH_ENABLE=false
|
||||
BATCH_SERVER_IP=127.0.0.127
|
||||
BATCH_FLINK_SERVER=pinpoint-flink-jobmanager
|
||||
|
||||
CONFIG_SHOW_APPLICATIONSTAT=true
|
||||
|
||||
|
||||
### Pinpoint-Collector
|
||||
|
||||
PINPOINT_COLLECTOR_NAME=pinpoint-collector
|
||||
|
||||
COLLECTOR_RECEIVER_BASE_PORT=9994
|
||||
COLLECTOR_RECEIVER_STAT_UDP_PORT=9995
|
||||
COLLECTOR_RECEIVER_SPAN_UDP_PORT=9996
|
||||
|
||||
FLINK_CLUSTER_ENABLE=true
|
||||
FLINK_CLUSTER_ZOOKEEPER_ADDRESS=zoo1
|
||||
|
||||
COLLECTOR_DEBUG_LEVEL=INFO
|
||||
|
||||
|
||||
### Pinpoint-Agent
|
||||
|
||||
PINPOINT_AGENT_NAME=pinpoint-agent
|
||||
COLLECTOR_IP=pinpoint-collector
|
||||
COLLECTOR_TCP_PORT=9994
|
||||
COLLECTOR_STAT_PORT=9995
|
||||
COLLECTOR_SPAN_PORT=9996
|
||||
# Set sampling rate. If you set it to N, 1 out of N transaction will be sampled.
|
||||
PROFILER_SAMPLING_RATE=1
|
||||
|
||||
AGENT_ID=app-in-docker
|
||||
APP_NAME=quickapp
|
||||
|
||||
AGENT_DEBUG_LEVEL=INFO
|
||||
|
||||
|
||||
### Pinpoint-flink
|
||||
|
||||
PINPOINT_FLINK_NAME=pinpoint-flink
|
||||
FLINK_WEB_PORT=8081
|
||||
|
||||
|
||||
### Pinpoint-quickstart
|
||||
|
||||
APP_PORT=8000
|
|
@ -0,0 +1 @@
|
|||
.idea/
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,131 @@
|
|||
|
||||
![Pinpoint](https://github.com/naver/pinpoint-docker/blob/master/docs/logo.png)
|
||||
|
||||
# Pinpoint-Docker for Pinpoint
|
||||
|
||||
Official git repository of Dockerized components of the [Pinpoint Application Monitoring](http://naver.github.io/pinpoint/).
|
||||
|
||||
## What is Pinpoint
|
||||
|
||||
[Pinpoint](https://github.com/naver/pinpoint), is the world's leading open-source application monitoring solution - trusted by millions of users around the globe.
|
||||
It supports and helps you understand your application in a glance and allow you to build world-class, high-quality software.
|
||||
|
||||
## Supported Tags
|
||||
- 1.7.3
|
||||
- 1.7.2
|
||||
|
||||
## How to install Pinpoint?
|
||||
|
||||
You can easily bring up an entire Dockerized Pinpoint environment by using [Docker Compose](https://docs.docker.com/compose/) with any of the provided `docker-compose.yml` files as below.
|
||||
With `docker-compose.yml` under *Pinpoint-Docker* folder brings up all the environment attached with Pinpoint-QuickStart(sample app).
|
||||
To monitor your agent see [configuration part](#Configuration) for further details.
|
||||
|
||||
```
|
||||
git clone https://github.com/naver/pinpoint-docker.git
|
||||
cd Pinpoint-Docker
|
||||
docker-compose pull && docker-compose up -d
|
||||
```
|
||||
|
||||
This will install and run all services required to run all features in Pinpoint in docker containers joined with same network.
|
||||
- Pinpoint-Web Server
|
||||
- Pinpoint-Collector
|
||||
- Pinpoint-Agent(ready to be used)
|
||||
- Pinpoint-Flink
|
||||
- Pinpoint-Zookeeper
|
||||
- Pinpoint-Hbase
|
||||
- Pinpoint-QuickStart(a sample application)
|
||||
This may take several minutes to download all necessary images.
|
||||
|
||||
You can modify `QuickStart` application part with your application to start monitoring.
|
||||
(see [`Monitoring YOUR Application`](https://github.com/naver/pinpoint-docker#monitoring-your-application) part for further details).
|
||||
|
||||
After all containers are started and ready to go. There is one more thing to do to use all existing features in Pinpoint.
|
||||
It's not mandatory, but to use all the features and since it's a simple task, let's take care of it.
|
||||
|
||||
Register a `job` on to pinpoint-flink server.
|
||||
You can build the `job` from the [open-source of Pinpoint](https://github.com/naver/pinpoint), additional guide is [here](https://github.com/naver/pinpoint/blob/master/doc/application-inspector.md#application-inspector).
|
||||
or
|
||||
you can simply upload pre-built jar file under pinpoint-flink/build/pinpoint-flink-job-{pinpoint-version}.jar (beware of the version, it should matched with *PINPOINT_VERSION* in .env file)
|
||||
If anyone have solution to put the job file into flink image without doing manually, please let us know.
|
||||
|
||||
Pinpoint-Flink server is running on [port 8081](http://localhost:8081/#/submit). From `submit new job` menu
|
||||
Submit the jar file with *com.navercorp.pinpoint.flink.StatStreamingVer2Job* in entry class as below image.
|
||||
|
||||
![Pinpoint](https://github.com/naver/pinpoint-docker/blob/master/docs/Pinpoint-Flink%20upload.png)
|
||||
|
||||
Now you are ready to monitor the sample application(Pinpoint-QuickStart) provided.
|
||||
If you can't find any connected application from Pinpoint-Web's first page([port 8079](http://localhost:8079) as default), don't panic and wait for a while.
|
||||
It will take some time for Pinpoint to retrieve the application's information when running for the first time.
|
||||
|
||||
## Monitoring YOUR Application
|
||||
|
||||
Pinpoint-Agent only prepares required libraries for triggering Pinpoint-Agent.
|
||||
Running and configuring agents is manual action done by the user, but don't worry it's very simple.
|
||||
|
||||
If you are not familiar with Pinpoint concept, please read: [Overview](http://naver.github.io/pinpoint/overview.html#architecture),
|
||||
[Agents Installation](http://naver.github.io/pinpoint/installation.html#5-pinpoint-agent)
|
||||
|
||||
**You will need to attach *Pinpoint-Agent* to your application.**
|
||||
|
||||
Running Pinpoint-Agent docker-compose separately, Examples are [here](https://github.com/naver/pinpoint-docker/tree/master/pinpoint-agent-attach-example).
|
||||
Otherwise, you can check how [Pinpoint-Quickstart](https://github.com/naver/pinpoint-docker/blob/master/docker-compose.yml) is attached to Pinpoint-Agent with docker-compose.
|
||||
|
||||
You can use `docker-compose` and `.env` files under each folder to install the modules separately into several servers.
|
||||
If containers are separated, ip configurations in `.env` must be changed within.
|
||||
|
||||
For example, if you want your application running from a docker and rest of Pinpoint in another.
|
||||
You can remove *pinpoint-agent* and *pinpoint-quickstart* from docker-compose.yml and run to establish all necessary component of pinpoint.
|
||||
And create another docker-compose.yml just like one under pinpoint-quickstart folder to run your application.
|
||||
Finally, since agent needs to acknowledge the collector ip. collector ip needs to be changed in .env.
|
||||
|
||||
We'll try to create more examples along the way.
|
||||
If anyone who can share their dockerfile, it's always welcome.
|
||||
|
||||
## Configurations
|
||||
|
||||
Configuration relies on supplying `docker-compose` with environment variables defined in `.env` file. So it's recommended to change variables only from `.env` file.
|
||||
With `docker-compose` in this repository. You can create stand-alone containers that are needed to run most of the features in Pinpoint.
|
||||
|
||||
**Ports** can be also configured in .env file.
|
||||
(Default ports are Pinpoint-Web:8079, Quickstart:8000 and Flink:8081 as configured in .env file)
|
||||
|
||||
Pinpoint-Zookeeper is just an example of using zookeeper image. You can modify docker-compose files to suit your needs.
|
||||
|
||||
For more specific details on what the values represents in *.env* file. Please check [Pinpoint Github Repository](https://github.com/naver/pinpoint) or
|
||||
[Pinpoint Web properties](https://github.com/naver/pinpoint/blob/master/web/src/main/resources/pinpoint-web.properties), [Pinpoint Collector properties](https://github.com/naver/pinpoint/blob/master/collector/src/main/resources/pinpoint-collector.properties), [Pinpoint Agent configuration](https://github.com/naver/pinpoint/blob/master/agent/src/main/resources-release/pinpoint.config).
|
||||
Please note that only essential configuration options are adopted to pinpoint-docker.
|
||||
|
||||
## logs
|
||||
|
||||
You can check logs produced by these services
|
||||
```
|
||||
docker logs <containerId>
|
||||
```
|
||||
|
||||
You can also easily change the log level from *.env* file.
|
||||
|
||||
## Any Issues or Suggestions?
|
||||
|
||||
Feel free to share any problems and suggestions via [Pinpoint GitHub Issue page](https://github.com/naver/pinpoint/issues).
|
||||
Contributions on the pinpoint-docker image is also always welcome.
|
||||
|
||||
## License
|
||||
Pinpoint is licensed under the Apache License, Version 2.0.
|
||||
See [LICENSE](LICENSE) for full license text.
|
||||
|
||||
```
|
||||
Copyright 2018 NAVER Corp.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
```
|
||||
|
|
@ -0,0 +1,221 @@
|
|||
version: "3.6"
|
||||
|
||||
services:
|
||||
pinpoint-hbase:
|
||||
build:
|
||||
context: ./pinpoint-hbase/
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_HBASE_NAME}"
|
||||
image: "pinpointdocker/pinpoint-hbase:${PINPOINT_VERSION}"
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
volumes:
|
||||
- ./home/pinpoint/hbase
|
||||
- ./home/pinpoint/zookeeper
|
||||
expose:
|
||||
# zookeeper
|
||||
- "2181"
|
||||
# HBase Master API port
|
||||
- "60000"
|
||||
# HBase Master Web UI
|
||||
- "16010"
|
||||
# Regionserver API port
|
||||
- "60020"
|
||||
# HBase Regionserver web UI
|
||||
- "16030"
|
||||
ports:
|
||||
- "${EXTERNAL_HBASE_PORT:-2181}:2181"
|
||||
- "60000:60000"
|
||||
- "16010:16010"
|
||||
- "60020:60020"
|
||||
- "16030:16030"
|
||||
restart: always
|
||||
|
||||
pinpoint-web:
|
||||
build:
|
||||
context: ./pinpoint-web/
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_WEB_NAME}"
|
||||
image: "pinpointdocker/pinpoint-web:${PINPOINT_VERSION}"
|
||||
|
||||
depends_on:
|
||||
- pinpoint-hbase
|
||||
restart: always
|
||||
expose:
|
||||
- "8080"
|
||||
- "9997"
|
||||
ports:
|
||||
- "9997:9997"
|
||||
- "${WEB_PAGE_PORT:-8080}:8080"
|
||||
environment:
|
||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||
- ANALYTICS=${ANALYTICS}
|
||||
- HBASE_HOST=${HBASE_HOST}
|
||||
- HBASE_PORT=${HBASE_PORT}
|
||||
- DEBUG_LEVEL=${WEB_DEBUG_LEVEL}
|
||||
- CONFIG_SHOW_APPLICATIONSTAT=${CONFIG_SHOW_APPLICATIONSTAT}
|
||||
- BATCH_ENABLE=${BATCH_ENABLE}
|
||||
- BATCH_SERVER_IP=${BATCH_SERVER_IP}
|
||||
- BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER}
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
pinpoint-collector:
|
||||
build:
|
||||
context: ./pinpoint-collector/
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_COLLECTOR_NAME}"
|
||||
image: "pinpointdocker/pinpoint-collector:${PINPOINT_VERSION}"
|
||||
|
||||
depends_on:
|
||||
- pinpoint-hbase
|
||||
restart: always
|
||||
expose:
|
||||
- "9994"
|
||||
- "9995"
|
||||
- "9996"
|
||||
ports:
|
||||
- "${COLLECTOR_RECEIVER_BASE_PORT:-9994}:9994"
|
||||
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/tcp"
|
||||
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/tcp"
|
||||
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/udp"
|
||||
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
|
||||
networks:
|
||||
- pinpoint
|
||||
environment:
|
||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||
- HBASE_HOST=${HBASE_HOST}
|
||||
- HBASE_PORT=${HBASE_PORT}
|
||||
- FLINK_CLUSTER_ENABLE=${FLINK_CLUSTER_ENABLE}
|
||||
- FLINK_CLUSTER_ZOOKEEPER_ADDRESS=${FLINK_CLUSTER_ZOOKEEPER_ADDRESS}
|
||||
- DEBUG_LEVEL=${COLLECTOR_DEBUG_LEVEL}
|
||||
|
||||
pinpoint-quickstart:
|
||||
build:
|
||||
context: ./pinpoint-quickstart/
|
||||
dockerfile: Dockerfile
|
||||
|
||||
container_name: "pinpoint-quickstart"
|
||||
image: "pinpointdocker/pinpoint-quickstart"
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:8080"
|
||||
volumes:
|
||||
- data-volume:/pinpoint-agent
|
||||
environment:
|
||||
JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
|
||||
networks:
|
||||
- pinpoint
|
||||
depends_on:
|
||||
- pinpoint-agent
|
||||
|
||||
pinpoint-agent:
|
||||
build:
|
||||
context: ./pinpoint-agent/
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_AGENT_NAME}"
|
||||
image: "pinpointdocker/pinpoint-agent:${PINPOINT_VERSION}"
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
- pinpoint
|
||||
volumes:
|
||||
- data-volume:/pinpoint-agent
|
||||
environment:
|
||||
- COLLECTOR_IP=${COLLECTOR_IP}
|
||||
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
||||
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
||||
- COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT}
|
||||
- PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE}
|
||||
- DEBUG_LEVEL=${AGENT_DEBUG_LEVEL}
|
||||
depends_on:
|
||||
- pinpoint-collector
|
||||
|
||||
#zookeepers
|
||||
zoo1:
|
||||
image: zookeeper:3.4
|
||||
restart: always
|
||||
hostname: zoo1
|
||||
environment:
|
||||
ZOO_MY_ID: 1
|
||||
ZOO_SERVERS: server.1=0.0.0.0:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
zoo2:
|
||||
image: zookeeper:3.4
|
||||
restart: always
|
||||
hostname: zoo2
|
||||
environment:
|
||||
ZOO_MY_ID: 2
|
||||
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=0.0.0.0:2888:3888 server.3=zoo3:2888:3888
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
zoo3:
|
||||
image: zookeeper:3.4
|
||||
restart: always
|
||||
hostname: zoo3
|
||||
environment:
|
||||
ZOO_MY_ID: 3
|
||||
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=0.0.0.0:2888:3888
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
##flink
|
||||
jobmanager:
|
||||
container_name: "${PINPOINT_FLINK_NAME}-jobmanager"
|
||||
image: flink:1.3.1
|
||||
expose:
|
||||
- "6123"
|
||||
ports:
|
||||
- "${FLINK_WEB_PORT:-8081}:8081"
|
||||
command: jobmanager
|
||||
environment:
|
||||
- JOB_MANAGER_RPC_ADDRESS=jobmanager
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
taskmanager:
|
||||
container_name: "${PINPOINT_FLINK_NAME}-taskmanager"
|
||||
image: flink:1.3.1
|
||||
expose:
|
||||
- "6121"
|
||||
- "6122"
|
||||
- "19994"
|
||||
ports:
|
||||
- "6121:6121"
|
||||
- "6122:6122"
|
||||
- "19994:19994"
|
||||
depends_on:
|
||||
- jobmanager
|
||||
command: taskmanager
|
||||
links:
|
||||
- "jobmanager:jobmanager"
|
||||
environment:
|
||||
- JOB_MANAGER_RPC_ADDRESS=jobmanager
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
volumes:
|
||||
data-volume:
|
||||
|
||||
networks:
|
||||
pinpoint:
|
||||
driver: bridge
|
Binary file not shown.
After Width: | Height: | Size: 346 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
|
@ -0,0 +1,4 @@
|
|||
### Pinpoint with Java
|
||||
PINPOINT_VERSION=1.7.2
|
||||
AGENT_ID=app-in-docker
|
||||
APP_NAME=quickapp
|
|
@ -0,0 +1,15 @@
|
|||
FROM java:8
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
ARG PINPOINT_VERSION
|
||||
ARG AGENT_ID
|
||||
ARG APP_NAME
|
||||
ENV JAVA_OPTS="-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
|
||||
|
||||
RUN mkdir -p javasample
|
||||
COPY build/Sample.java javasample
|
||||
WORKDIR javasample
|
||||
|
||||
RUN javac Sample.java
|
||||
CMD java ${JAVA_OPTS} Sample
|
|
@ -0,0 +1,14 @@
|
|||
public class Sample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Sample Java Start");
|
||||
try {
|
||||
while (true) {
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
}
|
||||
catch (java.lang.InterruptedException e) {
|
||||
System.out.println("Test Finished");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
version: "2.1"
|
||||
|
||||
services:
|
||||
java:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
- AGENT_ID=${AGENT_ID}
|
||||
- APP_NAME=${APP_NAME}
|
||||
container_name: "java"
|
||||
image: "Your Image"
|
||||
|
||||
volumes_from:
|
||||
- container:pinpoint-agent
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: pinpoint-agent_pinpoint
|
|
@ -0,0 +1,5 @@
|
|||
### Pinpoint with Tomcat
|
||||
PINPOINT_VERSION=1.7.2
|
||||
APP_PORT=8000
|
||||
AGENT_ID=app-in-docker
|
||||
APP_NAME=quickapp
|
|
@ -0,0 +1,22 @@
|
|||
version: "2.1"
|
||||
|
||||
services:
|
||||
tomcat:
|
||||
#build if needed
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile
|
||||
container_name: "tomcat"
|
||||
image: "Your Image"
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:8080"
|
||||
volumes_from:
|
||||
- container:pinpoint-agent
|
||||
environment:
|
||||
JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
|
||||
command: catalina.sh run
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: pinpoint-agent_pinpoint
|
|
@ -0,0 +1,17 @@
|
|||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-Agent
|
||||
|
||||
PINPOINT_AGENT_NAME=pinpoint-agent
|
||||
#collector information required
|
||||
COLLECTOR_IP=
|
||||
COLLECTOR_TCP_PORT=9994
|
||||
COLLECTOR_STAT_PORT=9995
|
||||
COLLECTOR_SPAN_PORT=9996
|
||||
# Set sampling rate. If you set it to N, 1 out of N transaction will be sampled.
|
||||
PROFILER_SAMPLING_RATE=1
|
||||
|
||||
AGENT_ID=app-in-docker
|
||||
APP_NAME=quickapp
|
||||
|
||||
AGENT_DEBUG_LEVEL=INFO
|
|
@ -0,0 +1,24 @@
|
|||
FROM alpine:3.7
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.7.2}
|
||||
ARG INSTALL_URL=https://github.com/naver/pinpoint/releases/download/${PINPOINT_VERSION}/pinpoint-agent-${PINPOINT_VERSION}.tar.gz
|
||||
|
||||
COPY /build/scripts/configure-agent.sh /usr/local/bin/
|
||||
|
||||
RUN apk add --update curl bash \
|
||||
&& chmod a+x /usr/local/bin/configure-agent.sh \
|
||||
&& mkdir -p /pinpoint-agent \
|
||||
&& chmod -R o+x /pinpoint-agent \
|
||||
&& curl -SL ${INSTALL_URL} -o pinpoint-agent.tar.gz \
|
||||
&& gunzip pinpoint-agent.tar.gz \
|
||||
&& tar -xf pinpoint-agent.tar -C /pinpoint-agent \
|
||||
&& rm pinpoint-agent.tar \
|
||||
&& apk del curl \
|
||||
&& rm /var/cache/apk/*
|
||||
|
||||
VOLUME ["/pinpoint-agent"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/configure-agent.sh"]
|
||||
CMD ["tail", "-f", "/dev/null"]
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
sed -i "/profiler.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.collector.tcp.port=/ s/=.*/=${COLLECTOR_TCP_PORT}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.collector.stat.port=/ s/=.*/=${COLLECTOR_STAT_PORT}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.collector.span.port=/ s/=.*/=${COLLECTOR_SPAN_PORT}/" /pinpoint-agent/pinpoint.config
|
||||
sed -i "/profiler.sampling.rate=/ s/=.*/=${PROFILER_SAMPLING_RATE}/" /pinpoint-agent/pinpoint.config
|
||||
|
||||
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /pinpoint-agent/lib/log4j.xml
|
||||
|
||||
#ln -s /pinpoint-agent /pinpoint-agent
|
||||
|
||||
exec "$@"
|
|
@ -0,0 +1,37 @@
|
|||
version: "3.6"
|
||||
|
||||
#pinpoint-agent image will not usually be used alone
|
||||
services:
|
||||
pinpoint-agent:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_AGENT_NAME}"
|
||||
image: "pinpointdocker/pinpoint-agent:${PINPOINT_VERSION}"
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
- pinpoint-agent
|
||||
environment:
|
||||
- COLLECTOR_IP=${COLLECTOR_IP}
|
||||
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
||||
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
||||
- COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT}
|
||||
- PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE}
|
||||
- DEBUG_LEVEL=${AGENT_DEBUG_LEVEL}
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
#networks:
|
||||
# default:
|
||||
# external:
|
||||
# name: pinpoint
|
||||
|
||||
networks:
|
||||
pinpoint:
|
||||
driver: bridge
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-Collector
|
||||
|
||||
CLUSTER_ENABLE=true
|
||||
#zookeeper information required
|
||||
CLUSTER_ZOOKEEPER_ADDRESS=
|
||||
|
||||
#hbase information required
|
||||
HBASE_HOST=
|
||||
HBASE_PORT=
|
||||
|
||||
PINPOINT_COLLECTOR_NAME=pinpoint-collector
|
||||
|
||||
COLLECTOR_RECEIVER_BASE_PORT=9994
|
||||
COLLECTOR_RECEIVER_STAT_UDP_PORT=9995
|
||||
COLLECTOR_RECEIVER_SPAN_UDP_PORT=9996
|
||||
|
||||
FLINK_CLUSTER_ENABLE=true
|
||||
FLINK_CLUSTER_ZOOKEEPER_ADDRESS=zoo1
|
||||
|
||||
COLLECTOR_DEBUG_LEVEL=INFO
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
FROM tomcat:8-jre8
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.7.2}
|
||||
|
||||
ARG INSTALL_URL=https://github.com/naver/pinpoint/releases/download/${PINPOINT_VERSION}/pinpoint-collector-${PINPOINT_VERSION}.war
|
||||
|
||||
COPY /build/scripts/start-collector.sh /usr/local/bin/
|
||||
|
||||
RUN chmod a+x /usr/local/bin/start-collector.sh \
|
||||
&& curl -SL ${INSTALL_URL} -o pinpoint-collector.war \
|
||||
&& rm -rf /usr/local/tomcat/webapps \
|
||||
&& mkdir -p /usr/local/tomcat/webapps \
|
||||
&& unzip pinpoint-collector.war -d /usr/local/tomcat/webapps/ROOT \
|
||||
&& rm -rf pinpoint-collector.war \
|
||||
&& sed -i "s/8005/9005/g" /usr/local/tomcat/conf/server.xml \
|
||||
&& sed -i "s/8080/9080/g" /usr/local/tomcat/conf/server.xml \
|
||||
&& sed -i "s/8009/9009/g" /usr/local/tomcat/conf/server.xml \
|
||||
&& sed -i "s/8443/9443/g" /usr/local/tomcat/conf/server.xml
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/start-collector.sh"]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
sed -i "/cluster.enable=/ s/=.*/=${CLUSTER_ENABLE}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed -i "/cluster.zookeeper.address=/ s/=.*/=${CLUSTER_ZOOKEEPER_ADDRESS}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed -i "/flink.cluster.enable=/ s/=.*/=${FLINK_CLUSTER_ENABLE}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
sed -i "/flink.cluster.zookeeper.address=/ s/=.*/=${FLINK_CLUSTER_ZOOKEEPER_ADDRESS}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-collector.properties
|
||||
|
||||
sed -i "/hbase.client.host=/ s/=.*/=${HBASE_HOST}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
sed -i "/hbase.client.port=/ s/=.*/=${HBASE_PORT}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
|
||||
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.xml
|
||||
|
||||
exec /usr/local/tomcat/bin/catalina.sh run
|
|
@ -0,0 +1,37 @@
|
|||
version: "3.6"
|
||||
|
||||
services:
|
||||
pinpoint-collector:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_COLLECTOR_NAME}"
|
||||
image: "pinpointdocker/pinpoint-collector:${PINPOINT_VERSION}"
|
||||
|
||||
restart: always
|
||||
expose:
|
||||
- "9994"
|
||||
- "9995"
|
||||
- "9996"
|
||||
ports:
|
||||
- "${COLLECTOR_RECEIVER_BASE_PORT:-9994}:9994"
|
||||
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/tcp"
|
||||
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/tcp"
|
||||
- "${COLLECTOR_RECEIVER_STAT_UDP_PORT:-9995}:9995/udp"
|
||||
- "${COLLECTOR_RECEIVER_SPAN_UDP_PORT:-9996}:9996/udp"
|
||||
|
||||
environment:
|
||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||
- HBASE_HOST=${HBASE_HOST}
|
||||
- HBASE_PORT=${HBASE_PORT}
|
||||
- FLINK_CLUSTER_ENABLE=${FLINK_CLUSTER_ENABLE}
|
||||
- FLINK_CLUSTER_ZOOKEEPER_ADDRESS=${FLINK_CLUSTER_ZOOKEEPER_ADDRESS}
|
||||
- DEBUG_LEVEL=${COLLECTOR_DEBUG_LEVEL}
|
||||
|
||||
networks:
|
||||
pinpoint:
|
||||
driver: bridge
|
|
@ -0,0 +1,7 @@
|
|||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-flink
|
||||
|
||||
PINPOINT_FLINK_NAME=pinpoint-flink
|
||||
FLINK_WEB_PORT=8081
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# Copyright 2017 NAVER Corp.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# local
|
||||
hbase.client.host=pinpoint-hbase
|
||||
hbase.client.port=2181
|
||||
|
||||
# hbase default:/hbase
|
||||
hbase.zookeeper.znode.parent=/hbase
|
||||
|
||||
# hbase namespace to use default:default
|
||||
hbase.namespace=default
|
||||
|
||||
# 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=30000
|
||||
|
||||
#==================================================================================
|
||||
# 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.
|
@ -0,0 +1,62 @@
|
|||
# configure l4 ip address to ignore health check logs
|
||||
collector.l4.ip=
|
||||
|
||||
# base data receiver config ---------------------------------------------------------------------
|
||||
collector.receiver.base.ip=pinpoint-flink-taskmanager
|
||||
collector.receiver.base.port=19994
|
||||
|
||||
# number of tcp worker threads
|
||||
collector.receiver.base.worker.threadSize=8
|
||||
# capacity of tcp worker queue
|
||||
collector.receiver.base.worker.queueSize=1024
|
||||
# monitoring for tcp worker
|
||||
collector.receiver.base.worker.monitor=true
|
||||
|
||||
# change OS level read/write socket buffer size (for linux)
|
||||
#sudo sysctl -w net.core.rmem_max=
|
||||
#sudo sysctl -w net.core.wmem_max=
|
||||
# check current values using:
|
||||
#$ /sbin/sysctl -a | grep -e rmem -e wmem
|
||||
|
||||
# number of agent event worker threads
|
||||
collector.agentEventWorker.threadSize=4
|
||||
# capacity of agent event worker queue
|
||||
collector.agentEventWorker.queueSize=1024
|
||||
|
||||
statistics.flushPeriod=1000
|
||||
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# The cluster related options are used to establish connections between the agent, collector, and web in order to send/receive data between them in real time.
|
||||
# You may enable additional features using this option (Ex : RealTime Active Thread Chart).
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Usage : Set the following options for collector/web components that reside in the same cluster in order to enable this feature.
|
||||
# 1. cluster.enable (pinpoint-web.properties, pinpoint-flink.properties) - "true" to enable
|
||||
# 2. cluster.zookeeper.address (pinpoint-web.properties, pinpoint-flink.properties) - address of the ZooKeeper instance that will be used to manage the cluster
|
||||
# 3. cluster.web.tcp.port (pinpoint-web.properties) - any available port number (used to establish connection between web and collector)
|
||||
# -------------------------------------------------------------------------------------------------
|
||||
# Please be aware of the following:
|
||||
#1. If the network between web, collector, and the agents are not stable, it is advisable not to use this feature.
|
||||
#2. We recommend using the cluster.web.tcp.port option. However, in cases where the collector is unable to establish connection to the web, you may reverse this and make the web establish connection to the collector.
|
||||
# In this case, you must set cluster.connect.address (pinpoint-web.properties); and cluster.listen.ip, cluster.listen.port (pinpoint-flink.properties) accordingly.
|
||||
cluster.enable=true
|
||||
cluster.zookeeper.address=zoo1
|
||||
cluster.zookeeper.sessiontimeout=30000
|
||||
cluster.listen.ip=
|
||||
cluster.listen.port=
|
||||
|
||||
#collector.admin.password=
|
||||
#collector.admin.api.rest.active=
|
||||
#collector.admin.api.jmx.active=
|
||||
|
||||
collector.spanEvent.sequence.limit=10000
|
||||
|
||||
# flink cluster
|
||||
flink.cluster.enable=true
|
||||
flink.cluster.zookeeper.address=zoo1
|
||||
flink.cluster.zookeeper.sessiontimeout=3000
|
||||
flink.cluster.zookeeper.retry.interval=5000
|
||||
flink.cluster.tcp.port=19994
|
||||
|
||||
# flink env init
|
||||
flink.StreamExecutionEnvironment=
|
||||
flink.sourceFunction.Parallel=1
|
|
@ -0,0 +1,45 @@
|
|||
version: "3.6"
|
||||
##
|
||||
#to use this separately will require pinpoint-flink-job-{version}.jar built
|
||||
#from pinpoint-flink module with correct properties under hbase.properties, pinpoint-flink.properties
|
||||
#sample configs used to build pinpoint-flink/build/pinpoint-flink-job-1.7.2.jar is under build folder
|
||||
##
|
||||
services:
|
||||
##flink
|
||||
jobmanager:
|
||||
container_name: "${PINPOINT_FLINK_NAME}-jobmanager"
|
||||
image: flink:1.3.1
|
||||
expose:
|
||||
- "6123"
|
||||
ports:
|
||||
- "${FLINK_WEB_PORT:-8081}:8081"
|
||||
command: jobmanager
|
||||
environment:
|
||||
- JOB_MANAGER_RPC_ADDRESS=jobmanager
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
taskmanager:
|
||||
container_name: "${PINPOINT_FLINK_NAME}-taskmanager"
|
||||
image: flink:1.3.1
|
||||
expose:
|
||||
- "6121"
|
||||
- "6122"
|
||||
- "19994"
|
||||
ports:
|
||||
- "6121:6121"
|
||||
- "6122:6122"
|
||||
- "19994:19994"
|
||||
depends_on:
|
||||
- jobmanager
|
||||
command: taskmanager
|
||||
links:
|
||||
- "jobmanager:jobmanager"
|
||||
environment:
|
||||
- JOB_MANAGER_RPC_ADDRESS=jobmanager
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
networks:
|
||||
pinpoint:
|
||||
driver: bridge
|
|
@ -0,0 +1,8 @@
|
|||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-Hbase
|
||||
|
||||
PINPOINT_HBASE_NAME=pinpoint-hbase
|
||||
#config for hbase in external docker
|
||||
EXTERNAL_HBASE_PORT=2180
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
FROM java:8-jdk
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.7.2}
|
||||
|
||||
ENV HBASE_REPOSITORY=http://apache.mirrors.pair.com/hbase
|
||||
ENV HBASE_SUB_REPOSITORY=http://archive.apache.org/dist/hbase
|
||||
|
||||
ENV HBASE_VERSION=1.2.6
|
||||
ENV BASE_DIR=/opt/hbase
|
||||
ENV HBASE_HOME=${BASE_DIR}/hbase-${HBASE_VERSION}
|
||||
|
||||
|
||||
COPY hbase-site.xml hbase-site.xml
|
||||
|
||||
RUN mkdir -p ${BASE_DIR} \
|
||||
&& cd ${BASE_DIR} \
|
||||
&& 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 \
|
||||
&& mv ../../hbase-site.xml ../../${HBASE_HOME}/conf/hbase-site.xml \
|
||||
&& curl -SL "https://raw.githubusercontent.com/naver/pinpoint/${PINPOINT_VERSION}/hbase/scripts/hbase-create.hbase" -o ${BASE_DIR}/hbase-create.hbase \
|
||||
&& ${HBASE_HOME}/bin/start-hbase.sh \
|
||||
&& sleep 10 \
|
||||
&& ${HBASE_HOME}/bin/hbase shell ${BASE_DIR}/hbase-create.hbase \
|
||||
&& ${HBASE_HOME}/bin/stop-hbase.sh \
|
||||
&& rm ${BASE_DIR}/hbase-create.hbase \
|
||||
&& rm -rf hbase.tar.gz
|
||||
|
||||
VOLUME ["/home/pinpoint/hbase", "/home/pinpoint/zookeeper"]
|
||||
|
||||
ENTRYPOINT ${BASE_DIR}/hbase-${HBASE_VERSION}/bin/hbase master start
|
|
@ -0,0 +1,34 @@
|
|||
version: "3.6"
|
||||
|
||||
services:
|
||||
pinpoint-hbase:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_HBASE_NAME}"
|
||||
image: "pinpointdocker/pinpoint-hbase:${PINPOINT_VERSION}"
|
||||
|
||||
volumes:
|
||||
- ./home/pinpoint/hbase
|
||||
- ./home/pinpoint/zookeeper
|
||||
expose:
|
||||
# zookeeper
|
||||
- "2181"
|
||||
# HBase Master API port
|
||||
- "60000"
|
||||
# HBase Master Web UI
|
||||
- "16010"
|
||||
# Regionserver API port
|
||||
- "60020"
|
||||
# HBase Regionserver web UI
|
||||
- "16030"
|
||||
ports:
|
||||
- "${EXTERNAL_HBASE_PORT:-2181}:2181"
|
||||
- "60000:60000"
|
||||
- "16010:16010"
|
||||
- "60020:60020"
|
||||
- "16030:16030"
|
||||
restart: always
|
|
@ -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,22 @@
|
|||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-Agent
|
||||
|
||||
PINPOINT_AGENT_NAME=pinpoint-agent
|
||||
#collector information required
|
||||
COLLECTOR_IP=
|
||||
COLLECTOR_TCP_PORT=9994
|
||||
COLLECTOR_STAT_PORT=9995
|
||||
COLLECTOR_SPAN_PORT=9996
|
||||
# Set sampling rate. If you set it to N, 1 out of N transaction will be sampled.
|
||||
PROFILER_SAMPLING_RATE=1
|
||||
|
||||
AGENT_ID=app-in-docker
|
||||
APP_NAME=quickapp
|
||||
|
||||
AGENT_DEBUG_LEVEL=INFO
|
||||
|
||||
|
||||
### Pinpoint-quickstart
|
||||
|
||||
APP_PORT=8000
|
|
@ -0,0 +1,12 @@
|
|||
FROM tomcat:8-jre8
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
COPY /build/pinpoint-quickstart-testapp.war quickstart.war
|
||||
|
||||
RUN rm -rf /usr/local/tomcat/webapps \
|
||||
&& mkdir -p /usr/local/tomcat/webapps \
|
||||
&& unzip quickstart.war -d /usr/local/tomcat/webapps/ROOT \
|
||||
&& rm -rf quickstart.war
|
||||
|
||||
CMD [ "catalina.sh", "run" ]
|
Binary file not shown.
|
@ -0,0 +1,51 @@
|
|||
version: "3.6"
|
||||
|
||||
services:
|
||||
pinpoint-quickstart:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
container_name: "pinpoint-quickstart"
|
||||
image: "pinpointdocker/pinpoint-quickstart"
|
||||
ports:
|
||||
- "${APP_PORT:-8080}:8080"
|
||||
volumes:
|
||||
- data-volume:/pinpoint-agent
|
||||
environment:
|
||||
JAVA_OPTS: "-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
|
||||
networks:
|
||||
- pinpoint
|
||||
depends_on:
|
||||
- pinpoint-agent
|
||||
|
||||
pinpoint-agent:
|
||||
build:
|
||||
context: ../pinpoint-agent/
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_AGENT_NAME}"
|
||||
image: "pinpointdocker/pinpoint-agent:${PINPOINT_VERSION}"
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
- pinpoint
|
||||
volumes:
|
||||
- data-volume:/pinpoint-agent
|
||||
environment:
|
||||
- COLLECTOR_IP=${COLLECTOR_IP}
|
||||
- COLLECTOR_TCP_PORT=${COLLECTOR_TCP_PORT}
|
||||
- COLLECTOR_STAT_PORT=${COLLECTOR_STAT_PORT}
|
||||
- COLLECTOR_SPAN_PORT=${COLLECTOR_SPAN_PORT}
|
||||
- PROFILER_SAMPLING_RATE=${PROFILER_SAMPLING_RATE}
|
||||
- DEBUG_LEVEL=${AGENT_DEBUG_LEVEL}
|
||||
|
||||
volumes:
|
||||
data-volume:
|
||||
|
||||
networks:
|
||||
pinpoint:
|
||||
driver: bridge
|
|
@ -0,0 +1,28 @@
|
|||
PINPOINT_VERSION=1.7.2
|
||||
|
||||
### Pinpoint-Web
|
||||
|
||||
PINPOINT_WEB_NAME=pinpoint-web
|
||||
|
||||
WEB_PAGE_PORT=8079
|
||||
|
||||
CLUSTER_ENABLE=true
|
||||
#zookeeper information required
|
||||
CLUSTER_ZOOKEEPER_ADDRESS=
|
||||
|
||||
ADMIN_PASSWORD=admin
|
||||
|
||||
ANALYTICS=true
|
||||
|
||||
#hbase information required
|
||||
HBASE_HOST=
|
||||
HBASE_PORT=
|
||||
|
||||
WEB_DEBUG_LEVEL=INFO
|
||||
|
||||
#flink server information required if used
|
||||
BATCH_ENABLE=false
|
||||
BATCH_SERVER_IP=127.0.0.127
|
||||
BATCH_FLINK_SERVER=pinpoint-flink-jobmanager
|
||||
|
||||
CONFIG_SHOW_APPLICATIONSTAT=true
|
|
@ -0,0 +1,17 @@
|
|||
FROM tomcat:8-jre8
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.7.2}
|
||||
ARG INSTALL_URL=https://github.com/naver/pinpoint/releases/download/${PINPOINT_VERSION}/pinpoint-web-${PINPOINT_VERSION}.war
|
||||
|
||||
COPY /build/scripts/start-web.sh /usr/local/bin/
|
||||
|
||||
RUN chmod a+x /usr/local/bin/start-web.sh \
|
||||
&& curl -SL ${INSTALL_URL} -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
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/start-web.sh"]
|
|
@ -0,0 +1 @@
|
|||
readme for web
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
sed -i "/cluster.enable=/ s/=.*/=${CLUSTER_ENABLE}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
|
||||
sed -i "/cluster.zookeeper.address=/ s/=.*/=${CLUSTER_ZOOKEEPER_ADDRESS}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
|
||||
#sed -i "/cluster.web.tcp.port=/ s/=.*/=${CLUSTER_WEB_TCP_PORT}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
|
||||
sed -i "/admin.password=/ s/=.*/=${ADMIN_PASSWORD}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
|
||||
sed -i "/config.sendUsage=/ s/=.*/=${ANALYTICS}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
|
||||
sed -i "/config.show.applicationStat=/ s/=.*/=${CONFIG_SHOW_APPLICATIONSTAT}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/pinpoint-web.properties
|
||||
|
||||
sed -i "/hbase.client.host=/ s/=.*/=${HBASE_HOST}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
sed -i "/hbase.client.port=/ s/=.*/=${HBASE_PORT}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/hbase.properties
|
||||
|
||||
sed -i "/batch.enable=/ s/=.*/=${BATCH_ENABLE}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/batch.properties
|
||||
sed -i "/batch.server.ip=/ s/=.*/=${BATCH_SERVER_IP}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/batch.properties
|
||||
sed -i "/batch.flink.server=/ s/=.*/=${BATCH_FLINK_SERVER}/" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/batch.properties
|
||||
|
||||
sed -i "/level value=/ s/=.*/=\"${DEBUG_LEVEL}\"\/>/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.xml
|
||||
|
||||
|
||||
exec /usr/local/tomcat/bin/catalina.sh run
|
|
@ -0,0 +1,33 @@
|
|||
version: "3.6"
|
||||
|
||||
services:
|
||||
pinpoint-web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
|
||||
container_name: "${PINPOINT_WEB_NAME}"
|
||||
image: "pinpointdocker/pinpoint-web:${PINPOINT_VERSION}"
|
||||
|
||||
restart: always
|
||||
expose:
|
||||
- "8080"
|
||||
- "9997"
|
||||
ports:
|
||||
- "9997:9997"
|
||||
- "${WEB_PAGE_PORT:-8080}:8080"
|
||||
environment:
|
||||
- CLUSTER_ENABLE=${CLUSTER_ENABLE}
|
||||
- CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS}
|
||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||
- ANALYTICS=${ANALYTICS}
|
||||
- HBASE_HOST=${HBASE_HOST}
|
||||
- HBASE_PORT=${HBASE_PORT}
|
||||
- DEBUG_LEVEL=${WEB_DEBUG_LEVEL}
|
||||
- CONFIG_SHOW_APPLICATIONSTAT=${CONFIG_SHOW_APPLICATIONSTAT}
|
||||
- BATCH_ENABLE=${BATCH_ENABLE}
|
||||
- BATCH_SERVER_IP=${BATCH_SERVER_IP}
|
||||
- BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
version: "3.6"
|
||||
|
||||
servidocker
|
||||
docker-compose pull && docker-compose upces:
|
||||
#zookeepers
|
||||
zoo1:
|
||||
image: zookeeper:3.4
|
||||
restart: always
|
||||
hostname: zoo1
|
||||
environment:
|
||||
ZOO_MY_ID: 1
|
||||
ZOO_SERVERS: server.1=0.0.0.0:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
zoo2:
|
||||
image: zookeeper:3.4
|
||||
restart: always
|
||||
hostname: zoo2
|
||||
environment:
|
||||
ZOO_MY_ID: 2
|
||||
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=0.0.0.0:2888:3888 server.3=zoo3:2888:3888
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
zoo3:
|
||||
image: zookeeper:3.4
|
||||
restart: always
|
||||
hostname: zoo3
|
||||
environment:
|
||||
ZOO_MY_ID: 3
|
||||
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=0.0.0.0:2888:3888
|
||||
networks:
|
||||
- pinpoint
|
||||
|
||||
networks:
|
||||
pinpoint:
|
||||
driver: bridge
|
Loading…
Reference in New Issue