diff --git a/.env b/.env index 8954fca..07d7d4f 100644 --- a/.env +++ b/.env @@ -6,6 +6,11 @@ PINPOINT_HBASE_NAME=pinpoint-hbase #config for hbase in external docker EXTERNAL_HBASE_PORT=2180 +### Pinpoint-mysql +MYSQL_ROOT_PASSWORD=root123 +MYSQL_USER=admin +MYSQL_PASSWORD=admin +MYSQL_DATABASE=pinpoint ### Pinpoint-Web @@ -32,6 +37,21 @@ BATCH_FLINK_SERVER=pinpoint-flink-jobmanager CONFIG_SHOW_APPLICATIONSTAT=true +JDBC_DRIVER=com.mysql.jdbc.Driver +JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8 +JDBC_USERNAME=admin +JDBC_PASSWORD=admin +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=false ### Pinpoint-Collector @@ -71,4 +91,4 @@ FLINK_WEB_PORT=8081 ### Pinpoint-quickstart -APP_PORT=8000 \ No newline at end of file +APP_PORT=8000 diff --git a/Readme.md b/Readme.md index bf0fcac..120b9ee 100644 --- a/Readme.md +++ b/Readme.md @@ -38,13 +38,22 @@ This will install and run all services required to run all features in Pinpoint - Pinpoint-Flink - Pinpoint-Zookeeper - Pinpoint-Hbase - - Pinpoint-QuickStart(a sample application) + - Pinpoint-QuickStart(a sample application) + - Pinpoint-Mysql This may take several minutes to download all necessary images. You can replace `QuickStart` application part with your application to start monitoring. - check [`Testing QuickStart application`](#testing-quickstart-application) for a quick demo of pinpoint - check [`Monitoring YOUR Application`](#monitoring-your-application) part for further details +### Mysql (optional) + +The Pinpoint-Mysql server is running on port 13306 and contains the data structure used to register users, groups, and alerts to be sent. + +To send email alerts, you must make BATCH_ENABLE=true and change the other mail-related environment variables (MAIL_HOST, MAIL_PORT, MAIL_USERNAME, MAIL_PASSWORD, MAIL_PROPERTIES_MAIL_SMTP_FROM, ...) to the Pinpoint-Web server in *.env* file. + +For more information see [Setting Alarm](http://naver.github.io/pinpoint/alarm.html) in Pinpoint documentation. + ### Flink configuration (optional) After all containers are started and ready to go. There is one more thing to do to use all existing features in Pinpoint. diff --git a/docker-compose.yml b/docker-compose.yml index fd58229..c194a3c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,10 +49,10 @@ services: ports: - "13306:3306" environment: - MYSQL_ROOT_PASSWORD: root123 - MYSQL_USER: admin - MYSQL_PASSWORD: admin - MYSQL_DATABASE: pinpoint + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + - MYSQL_USER=${MYSQL_USER} + - MYSQL_PASSWORD=${MYSQL_PASSWORD} + - MYSQL_DATABASE=${MYSQL_DATABASE} volumes: - mysql_data:/var/lib/mysql @@ -91,21 +91,21 @@ services: - BATCH_ENABLE=${BATCH_ENABLE} - BATCH_SERVER_IP=${BATCH_SERVER_IP} - BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER} - - JDBC_DRIVER=com.mysql.jdbc.Driver - - JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8 - - JDBC_USERNAME=admin - - JDBC_PASSWORD=admin - - 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' + - JDBC_DRIVER=${JDBC_DRIVER} + - JDBC_URL=${JDBC_URL} + - JDBC_USERNAME=${JDBC_USERNAME} + - JDBC_PASSWORD=${JDBC_PASSWORD} + - 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} + - MAIL_PROPERTIES_MAIL_SMTP_AUTH=${MAIL_PROPERTIES_MAIL_SMTP_AUTH} + - MAIL_PROPERTIES_MAIL_SMTP_PORT=${MAIL_PROPERTIES_MAIL_SMTP_PORT} + - MAIL_PROPERTIES_MAIL_SMTP_FROM=${MAIL_PROPERTIES_MAIL_SMTP_FROM} + - MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=${MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE} + - MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=${MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED} + - MAIL_PROPERTIES_MAIL_DEBUG=${MAIL_PROPERTIES_MAIL_DEBUG} links: - "pinpoint-mysql:pinpoint-mysql" networks: diff --git a/pinpoint-mysql/.env b/pinpoint-mysql/.env new file mode 100644 index 0000000..f54d43d --- /dev/null +++ b/pinpoint-mysql/.env @@ -0,0 +1 @@ +PINPOINT_VERSION=1.8.0 \ No newline at end of file diff --git a/pinpoint-mysql/Dockerfile b/pinpoint-mysql/Dockerfile index dba9d2b..3d8f87f 100644 --- a/pinpoint-mysql/Dockerfile +++ b/pinpoint-mysql/Dockerfile @@ -1,6 +1,6 @@ FROM mysql:5.7 -ENV PINPOINT_VERSION=1.8.0 +ARG PINPOINT_VERSION=${PINPOINT_VERSION:-1.8.0} RUN apt update \ && apt-get install -y --no-install-recommends ca-certificates wget \ diff --git a/pinpoint-web/.env b/pinpoint-web/.env index 5f766ac..ff33195 100644 --- a/pinpoint-web/.env +++ b/pinpoint-web/.env @@ -26,3 +26,22 @@ BATCH_SERVER_IP=127.0.0.127 BATCH_FLINK_SERVER=pinpoint-flink-jobmanager CONFIG_SHOW_APPLICATIONSTAT=true + +#mysql information required +JDBC_DRIVER=com.mysql.jdbc.Driver +JDBC_URL=jdbc:mysql://pinpoint-mysql:3306/pinpoint?characterEncoding=UTF-8 +JDBC_USERNAME= +JDBC_PASSWORD= + +#mail server information required +MAIL_HOST= +MAIL_PORT= +MAIL_USERNAME= +MAIL_PASSWORD= +MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL= +MAIL_PROPERTIES_MAIL_SMTP_AUTH= +MAIL_PROPERTIES_MAIL_SMTP_PORT= +MAIL_PROPERTIES_MAIL_SMTP_FROM= +MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE= +MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED= +MAIL_PROPERTIES_MAIL_DEBUG= \ No newline at end of file diff --git a/pinpoint-web/docker-compose.yml b/pinpoint-web/docker-compose.yml index 4db45e3..d23b185 100644 --- a/pinpoint-web/docker-compose.yml +++ b/pinpoint-web/docker-compose.yml @@ -30,4 +30,19 @@ services: - BATCH_ENABLE=${BATCH_ENABLE} - BATCH_SERVER_IP=${BATCH_SERVER_IP} - BATCH_FLINK_SERVER=${BATCH_FLINK_SERVER} + - JDBC_DRIVER=${JDBC_DRIVER} + - JDBC_URL=${JDBC_URL} + - JDBC_USERNAME=${JDBC_USERNAME} + - JDBC_PASSWORD=${JDBC_PASSWORD} + - 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} + - MAIL_PROPERTIES_MAIL_SMTP_AUTH=${MAIL_PROPERTIES_MAIL_SMTP_AUTH} + - MAIL_PROPERTIES_MAIL_SMTP_PORT=${MAIL_PROPERTIES_MAIL_SMTP_PORT} + - MAIL_PROPERTIES_MAIL_SMTP_FROM=${MAIL_PROPERTIES_MAIL_SMTP_FROM} + - MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE=${MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE} + - MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED=${MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED} + - MAIL_PROPERTIES_MAIL_DEBUG=${MAIL_PROPERTIES_MAIL_DEBUG}