From 29b24254d76b5119184256035d9371bb34d56deb Mon Sep 17 00:00:00 2001 From: Roy Kim Date: Thu, 2 Apr 2020 13:05:24 +0900 Subject: [PATCH] [#59] add default alarm feature --- .env | 29 ++++--- Readme.md | 5 ++ docker-compose.yml | 24 +++--- pinpoint-web/.env | 31 ++++--- pinpoint-web/Dockerfile | 6 +- pinpoint-web/build/mail.zip | Bin 3959 -> 0 bytes pinpoint-web/build/scripts/start-web.sh | 105 ++++++++---------------- pinpoint-web/docker-compose.yml | 25 +++--- 8 files changed, 93 insertions(+), 132 deletions(-) delete mode 100644 pinpoint-web/build/mail.zip diff --git a/.env b/.env index 4f9f15b..b6510db 100644 --- a/.env +++ b/.env @@ -32,27 +32,30 @@ HBASE_PORT=2181 WEB_DEBUG_LEVEL=INFO -BATCH_ENABLE=false -BATCH_SERVER_IP=127.0.0.127 +BATCH_ENABLE=true +BATCH_SERVER_IP=127.0.0.1 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=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 + +#mail server information required +MAIL_SERVER_URL=smtp.gmail.com +MAIL_SERVER_PORT=587 +MAIL_SERVER_USERNAME=username +MAIL_SERVER_PASSWORD=password +MAIL_SENDER_ADDRESS=pinpoint_operator@pinpoint.com +MAIL_TRANSPORT_PROTOCOL=smtp +MAIL_SMTP_PORT=25 +MAIL_SMTP_AUTH=false +MAIL_SMTP_STARTTLS_ENABLE=false +MAIL_SMTP_STARTTLS_REQUIRED=false +MAIL_DEBUG=false ### Pinpoint-Collector diff --git a/Readme.md b/Readme.md index adf7188..4c18bd8 100644 --- a/Readme.md +++ b/Readme.md @@ -90,6 +90,11 @@ Pinpoint-Flink server is running on [port 8081](http://localhost:8081/#/submit). 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) + +### Alarm configuration (optional) + +You can check the [alarm guide document at the homepage](https://naver.github.io/pinpoint/alarm.html) for full understanding. +But for the docker image, All is set. fillout variables under *#mail server information required* in `.env` file before starting the container ### Testing QuickStart application diff --git a/docker-compose.yml b/docker-compose.yml index 853381f..a094f52 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -80,7 +80,7 @@ services: - "9997:9997" - "${WEB_PAGE_PORT:-8080}:8080" environment: - - JAVA_OPTS="-Dspring.profiles.active=${SPRING_PROFILES}" + - JAVA_OPTS="-Dspring.profiles.active=${SPRING_PROFILES},batch" - SPRING_PROFILES=${SPRING_PROFILES} - CLUSTER_ENABLE=${CLUSTER_ENABLE} - CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS} @@ -97,17 +97,17 @@ services: - 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} + - MAIL_SERVER_URL=${MAIL_SERVER_URL} + - MAIL_SERVER_PORT=${MAIL_SERVER_PORT} + - MAIL_SERVER_USERNAME=${MAIL_SERVER_USERNAME} + - MAIL_SERVER_PASSWORD=${MAIL_SERVER_PASSWORD} + - MAIL_SENDER_ADDRESS=${MAIL_SENDER_ADDRESS} + - MAIL_TRANSPORT_PROTOCOL=${MAIL_TRANSPORT_PROTOCOL} + - MAIL_SMTP_PORT=${MAIL_SMTP_PORT} + - MAIL_SMTP_AUTH=${MAIL_SMTP_AUTH} + - MAIL_SMTP_STARTTLS_ENABLE=${MAIL_SMTP_STARTTLS_ENABLE} + - MAIL_SMTP_STARTTLS_REQUIRED=${MAIL_SMTP_STARTTLS_REQUIRED} + - MAIL_DEBUG=${MAIL_DEBUG} links: - "pinpoint-mysql:pinpoint-mysql" networks: diff --git a/pinpoint-web/.env b/pinpoint-web/.env index 069a3fc..74897b2 100644 --- a/pinpoint-web/.env +++ b/pinpoint-web/.env @@ -4,7 +4,6 @@ SPRING_PROFILES=release ### Pinpoint-Web PINPOINT_WEB_NAME=pinpoint-web -SPRING_PROFILES=release WEB_PAGE_PORT=8079 @@ -23,8 +22,8 @@ HBASE_PORT= WEB_DEBUG_LEVEL=INFO #flink server information required if used -BATCH_ENABLE=false -BATCH_SERVER_IP=127.0.0.127 +BATCH_ENABLE=true +BATCH_SERVER_IP=127.0.0.1 BATCH_FLINK_SERVER=pinpoint-flink-jobmanager CONFIG_SHOW_APPLICATIONSTAT=true @@ -32,18 +31,18 @@ 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= +JDBC_USERNAME=admin +JDBC_PASSWORD=admin #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 +MAIL_SERVER_URL=smtp.gmail.com +MAIL_SERVER_PORT=587 +MAIL_SERVER_USERNAME=username +MAIL_SERVER_PASSWORD=password +MAIL_SENDER_ADDRESS=pinpoint_operator@pinpoint.com +MAIL_TRANSPORT_PROTOCOL=smtp +MAIL_SMTP_PORT=25 +MAIL_SMTP_AUTH=false +MAIL_SMTP_STARTTLS_ENABLE=false +MAIL_SMTP_STARTTLS_REQUIRED=false +MAIL_DEBUG=false \ No newline at end of file diff --git a/pinpoint-web/Dockerfile b/pinpoint-web/Dockerfile index 2e7170c..58c310d 100644 --- a/pinpoint-web/Dockerfile +++ b/pinpoint-web/Dockerfile @@ -6,16 +6,12 @@ ARG PINPOINT_VERSION=${PINPOINT_VERSION:-2.0.1} ARG INSTALL_URL=https://github.com/naver/pinpoint/releases/download/v${PINPOINT_VERSION}/pinpoint-web-${PINPOINT_VERSION}.war COPY /build/scripts/start-web.sh /usr/local/bin/ -COPY /build/mail.zip /assets/mail.zip 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 \ - && curl -SL https://maven.java.net/content/repositories/releases/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar -o /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/javax.mail-1.5.2.jar \ - && unzip /assets/mail.zip -d /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/ \ - && rm -rf /assets/mail.zip + && rm -rf pinpoint-web.war ENTRYPOINT ["/usr/local/bin/start-web.sh"] diff --git a/pinpoint-web/build/mail.zip b/pinpoint-web/build/mail.zip deleted file mode 100644 index 851516bf54f1f3cb8ce967a2b9430270b6c24b3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3959 zcmbuCc{r47AIB$T9Z`&(>|`BAma=3&V~iz2*2Y-EU}hNE5@M8H)(FR%tq~?mcB6<8 zvWtjPc1g12g$~j z1jzsZ1}Xr66951p&}ftk65;LQ>7nWA;qB<_E$NPMK}q?#qcW4GJu|?J9ogM>GvBxq zeM-!wAKM6aSEKyaa=o*?-&nlD?LIIXQ2+3} z?RG=+iNyz7-*ts*NzY>&3s*PT$Mad+XId^;Y31M2v6Y>>ndQ&vt!T^0qBh_=FVB_E z8isvyeMUZhF_0@=o6qz@(p>>#HzD<>qqI`cUdi_KsPlGh(X%jNrIiFD9f*zIBfXCn zbV~0)3g?BOEQBaRn^Zz&T7P=#5Tug~D3m+PVot|&L2saYRD62vTA(JfiTtdq4WiK8 zyjWiEHpWwnKZ5*WS)K!_l#-#^CtZ?U$~3!MCMWqDY;x+RzwWRFcxoJK_iCM+d(|ci zhhTqZa1a)oy+FOg)Us&w)?`(xb%%^9Q+sgY>}(nZ)m4(!H1s`CDx^GghVEflTkm$) zU^^Y;Ovgd6W|Rh9WyZuh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XJ*SpB!U-`Ran@P4jQB~tKt$xSh4 zoE-58SfOrz<5Aw`dIG+zrt6P|6po@ zWds6UvY30_uB%{9S|4&yY}z`juuajiL$LX>DqGdL;$pywvu$Ydt z!j#!9E`$(~E=J}bHLBP8`3)*-l|bqUSd!#ylrBCT2^^&t=r7i;F_FFk`_g3(r7S|5 z4fo$Nf}J2!Bmd{R=Wst9Hr`-j$kFo`RnW1~-!tx!8~|Vp-dDFd+-pCG_h;(ADvp@< zM>|s7`a^LHsK3f~#K6be(!Xf`gxg=495L~+$=iQ6`9a9XBl$Z/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/profiles/${SPRING_PROFILES}/log4j.xml +sed -i "/jdbc.driverClassName=/ s/=.*/=${JDBC_DRIVER:-com.mysql.jdbc.Driver}/" ${APPLICATION_JDBC_PROPERTIES} +sed -i "/jdbc.url=/ s/=.*/=${JDBC_URL//\//\\/}/" ${APPLICATION_JDBC_PROPERTIES} +sed -i "/jdbc.username=/ s/=.*/=${JDBC_USERNAME:-admin}/" ${APPLICATION_JDBC_PROPERTIES} +sed -i "/jdbc.password=/ s/=.*/=${JDBC_PASSWORD:-admin}/" ${APPLICATION_JDBC_PROPERTIES} -WEB_INF_CLASSES_DIR=/usr/local/tomcat/webapps/ROOT/WEB-INF/classes -APPLICATION_CONTEXT_WEB_FILE=${WEB_INF_CLASSES_DIR}/applicationContext-web.xml -APPLICATION_CONTEXT_MAIL_FILE=${WEB_INF_CLASSES_DIR}/applicationContext-mail.xml +sed -i "/alarm.mail.server.url=/ s/=.*/=${MAIL_SERVER_URL}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.server.port=/ s/=.*/=${MAIL_SERVER_PORT:-587}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.server.username=/ s/=.*/=${MAIL_SERVER_USERNAME}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.server.password=/ s/=.*/=${MAIL_SERVER_PASSWORD}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.sender.address=/ s/=.*/=${MAIL_SENDER_ADDRESS:-pinpoint_operator@pinpoint.com}/" ${APPLICATION_BATCH_PROPERTIES} -echo -e " -jdbc.driverClassName=${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} -" > ${WEB_INF_CLASSES_DIR}/jdbc.properties - -sed -i '/classpath:applicationContext-mail.xml/d' ${APPLICATION_CONTEXT_WEB_FILE} -if [ "$MAIL_HOST" != "" ]; then - sed -i 's/<\/beans>/ \ -<\/beans>/' ${APPLICATION_CONTEXT_WEB_FILE} - - sed -i "/name=\"host\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - sed -i "/name=\"port\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - sed -i "/name=\"username\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - sed -i "/name=\"password\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - - if [ "$MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL" != "" ]; then - sed -i "/prop key=\"mail.transport.protocol\"/c\ ${MAIL_PROPERTIES_MAIL_TRANSPORT_PROTOCOL}" ${APPLICATION_CONTEXT_MAIL_FILE} - else - sed -i "/prop key=\"mail.transport.protocol\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - fi - - if [ "$MAIL_PROPERTIES_MAIL_SMTP_PORT" != "" ]; then - sed -i "/prop key=\"mail.smtp.port\"/c\ ${MAIL_PROPERTIES_MAIL_SMTP_PORT}" ${APPLICATION_CONTEXT_MAIL_FILE} - else - sed -i "/prop key=\"mail.smtp.port\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - fi - - if [ "$MAIL_PROPERTIES_MAIL_SMTP_AUTH" != "" ]; then - sed -i "/prop key=\"mail.smtp.auth\"/c\ ${MAIL_PROPERTIES_MAIL_SMTP_AUTH}" ${APPLICATION_CONTEXT_MAIL_FILE} - else - sed -i "/prop key=\"mail.smtp.auth\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - fi - - if [ "$MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE" != "" ]; then - sed -i "/prop key=\"mail.smtp.starttls.enable\"/c\ ${MAIL_PROPERTIES_MAIL_STARTTLS_ENABLE}" ${APPLICATION_CONTEXT_MAIL_FILE} - else - sed -i "/prop key=\"mail.smtp.starttls.enable\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - fi - - if [ "$MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED" != "" ]; then - sed -i "/prop key=\"mail.smtp.starttls.required\"/c\ ${MAIL_PROPERTIES_MAIL_STARTTLS_REQUIRED}" ${APPLICATION_CONTEXT_MAIL_FILE} - else - sed -i "/prop key=\"mail.smtp.starttls.required\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - fi - - if [ "$MAIL_PROPERTIES_MAIL_DEBUG" != "" ]; then - sed -i "/prop key=\"mail.debug\"/c\ ${MAIL_PROPERTIES_MAIL_DEBUG}" ${APPLICATION_CONTEXT_MAIL_FILE} - else - sed -i "/prop key=\"mail.debug\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - fi - - if [ "$MAIL_PROPERTIES_MAIL_SMTP_FROM" != "" ]; then - sed -i "/prop key=\"mail.smtp.from\"/c\ ${MAIL_PROPERTIES_MAIL_SMTP_FROM}" ${APPLICATION_CONTEXT_MAIL_FILE} - else - sed -i "/prop key=\"mail.smtp.from\"/c\ " ${APPLICATION_CONTEXT_MAIL_FILE} - fi -fi +sed -i "/alarm.mail.transport.protocol=/ s/=.*/=${MAIL_TRANSPORT_PROTOCOL:-smtp}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.smtp.port=/ s/=.*/=${MAIL_SMTP_PORT:-587}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.smtp.auth=/ s/=.*/=${MAIL_SMTP_AUTH:-false}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.smtp.starttls.enable=/ s/=.*/=${MAIL_SMTP_STARTTLS_ENABLE:-false}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.smtp.starttls.required=/ s/=.*/=${MAIL_SMTP_STARTTLS_REQUIRED:-false}/" ${APPLICATION_BATCH_PROPERTIES} +sed -i "/alarm.mail.debug=/ s/=.*/=${MAIL_DEBUG:-false}/" ${APPLICATION_BATCH_PROPERTIES} exec /usr/local/tomcat/bin/catalina.sh run diff --git a/pinpoint-web/docker-compose.yml b/pinpoint-web/docker-compose.yml index 67576eb..79f0984 100644 --- a/pinpoint-web/docker-compose.yml +++ b/pinpoint-web/docker-compose.yml @@ -19,7 +19,7 @@ services: - "9997:9997" - "${WEB_PAGE_PORT:-8080}:8080" environment: - - JAVA_OPTS="-Dspring.profiles.active=${SPRING_PROFILES}" + - JAVA_OPTS="-Dspring.profiles.active=${SPRING_PROFILES},batch" - SPRING_PROFILES=${SPRING_PROFILES} - CLUSTER_ENABLE=${CLUSTER_ENABLE} - CLUSTER_ZOOKEEPER_ADDRESS=${CLUSTER_ZOOKEEPER_ADDRESS} @@ -36,15 +36,14 @@ services: - 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} - + - MAIL_SERVER_URL=${MAIL_SERVER_URL} + - MAIL_SERVER_PORT=${MAIL_SERVER_PORT} + - MAIL_SERVER_USERNAME=${MAIL_SERVER_USERNAME} + - MAIL_SERVER_PASSWORD=${MAIL_SERVER_PASSWORD} + - MAIL_SENDER_ADDRESS=${MAIL_SENDER_ADDRESS} + - MAIL_TRANSPORT_PROTOCOL=${MAIL_TRANSPORT_PROTOCOL} + - MAIL_SMTP_PORT=${MAIL_SMTP_PORT} + - MAIL_SMTP_AUTH=${MAIL_SMTP_AUTH} + - MAIL_SMTP_STARTTLS_ENABLE=${MAIL_SMTP_STARTTLS_ENABLE} + - MAIL_SMTP_STARTTLS_REQUIRED=${MAIL_SMTP_STARTTLS_REQUIRED} + - MAIL_DEBUG=${MAIL_DEBUG}