Mercurial > public > ssdt-docker
view scripts/metrics.sh @ 376:c6b2a1abecb8 release/v2.11.0
SW-262: Move install-workflows-db.sh and install-workflows-app.sh to ssdt-docker project
author | Marc Davis <davis@ssdt-ohio.org> |
---|---|
date | Fri, 10 Sep 2021 07:44:49 -0400 |
parents | 5c36bfba7014 |
children | 9afc8cb478f6 |
line wrap: on
line source
#!/bin/bash # Dump application metrics and thread stacks to console. # source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" container=$(composeGetContainer ${1?"Must specify the app service to connect to"} ) project=$(composeGetProject ${1} ) ip=$(docker inspect -f "{{with .NetworkSettings.Networks}}{{.${project}_default.IPAddress}}{{end}}" $container) echo "connecting to ${container} in ${project} at ${ip}:8080" docker run --network ${project}_default --rm docker.ssdt.io/ssdt-utils curl -s http://${ip}:8080/metrics/admin/metrics?pretty=true docker run --network ${project}_default --rm docker.ssdt.io/ssdt-utils curl -s http://${ip}:8080/metrics/admin/threads