You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Glowroot is an open-source Java APM (Application Performance Monitoring) tool. It can help detect and diagnose application performance problems, tracing slow requests, errors, response time breakdowns, SQL capture and more.
386
-
When starting a container, there are two options to enable glowroot on the Tomcat process:
387
-
- Use option `--glowroot` to use the latest version of glowroot in the Tomcat process. This requires internet access to be able to retrieve the file.
388
-
- Use option `--glowroot-zip=FILE` to specify the zip file with the version of glowroot to run in the Tomcat process. This takes precedence over the other option.
389
-
When enabling glowroot, it will start listening on port 4000/tcp so you can connect via browser to its interface. You may override this port with:
390
-
-`--glowroot-port=PORT` to specify the APM glowroot port.
386
+
The startup script in the core container expects a `/opt/glowroot.zip` file; if it exists, it will decompress that file and enable a default configuration for glowroot in the tomcat process.
387
+
The only needed parameter to use glowroot is the `--glowroot-port`, as the metrics are exposes through its own http connection, so the port must be opened in the container.
388
+
To use glowroot:
391
389
392
-
### Run d2-docker with glowroot enabled in the default port at the latest version available
390
+
- start d2-docker with `--glowroot-port=<PORT>` (default port for glowroot is 4000, but any available port can be used)
391
+
- download the latest version of glowroot to the host machine:
- determine the core instance name (note that as there might be several d2-docker instances running, you must pick the one you want manually from the list)
399
+
400
+
```
401
+
docker ps | awk '/core.1/ {print $NF}'
402
+
```
403
+
404
+
- copy the zip file to the core container with the filename `/opt/glowroot.zip`:
Glowroot is configured to store its data for several days, so the size of its folder should be limited to some extent. This size may be further reduced editing the configuration via WebUI, but might require a restart of the container. Configuration (and glowroot historical data) will be kept unless the `/opt/glowroot` folder is deleted from the container and restarted.
417
+
418
+
To remove glowroot from a container you must:
419
+
420
+
- connect to the core container (`docker exec -it ${core_instance_name} bash`)
421
+
- inside the core container, remove the `/opt/glowroot.zip` file
422
+
- inside the core container, remove the `/opt/glowroot` folder
423
+
- inside the core container, remove the `/usr/local/tomcat/bin/setenv.sh` file. (This is not extrictly necessary as the jar file will no longer exist and won't be able to start, but if it is not removed, some warnings/errors may be generated upon tomcat start)
424
+
- exit the core container and restart it (`docker restart ${core_instance_name}`)
0 commit comments