diff --git a/README.md b/README.md index 7f85eea..b860565 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ profiler.collector.tcp.port=9994 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 ``` + +[See more examples of monitoring](examples) using docker-compose, image docker, monitoring tests with selenium, ... + You can find more samples at: If you plan to use external volumes for hbase you should fill hbase first. diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..b1d1e8d --- /dev/null +++ b/examples/README.md @@ -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) \ No newline at end of file diff --git a/examples/joinfaces-example-with-docker-image/Dockerfile b/examples/joinfaces-example-with-docker-image/Dockerfile index ec53e8f..355c7c8 100644 --- a/examples/joinfaces-example-with-docker-image/Dockerfile +++ b/examples/joinfaces-example-with-docker-image/Dockerfile @@ -1,4 +1,7 @@ -FROM marcosamm/pinpointagent-oraclejre:1.6.2-8u131 +# 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 diff --git a/examples/joinfaces-example-with-docker-image/README.md b/examples/joinfaces-example-with-docker-image/README.md new file mode 100644 index 0000000..eb17e29 --- /dev/null +++ b/examples/joinfaces-example-with-docker-image/README.md @@ -0,0 +1,28 @@ +# Monitoring joinfaces-example application with docker image +This example shows how to run and monitor the joinfaces-example application with pinpoint-agent + +### 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 +``` + +### To access +http://localhost:8080 + + +### Note +* 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. \ No newline at end of file diff --git a/examples/joinfaces-example-with-selenium-test/README.md b/examples/joinfaces-example-with-selenium-test/README.md new file mode 100644 index 0000000..41e61fa --- /dev/null +++ b/examples/joinfaces-example-with-selenium-test/README.md @@ -0,0 +1,38 @@ +# Monitoring joinfaces-example application with selenium tests +This example shows how to monitor the joinfaces-example application while running automated tests + +### 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" +``` + +### To access +http://localhost:8080 + + +### Note +* 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. \ No newline at end of file