Mercurial > public > ssdt-docker
comparison scripts/metrics.sh @ 210:c34bcbea8391 production v1.5.0
flow: Merged <release> 'v1.5.0' to <master> ('production').
author | smith@nwoca.org |
---|---|
date | Tue, 26 Sep 2017 20:52:22 +0100 |
parents | 5c36bfba7014 |
children | 9afc8cb478f6 |
comparison
equal
deleted
inserted
replaced
205:f24a5f2abcdf | 210:c34bcbea8391 |
---|---|
1 #!/bin/bash | |
2 # Dump application metrics and thread stacks to console. | |
3 # | |
4 | |
5 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" | |
6 | |
7 container=$(composeGetContainer ${1?"Must specify the app service to connect to"} ) | |
8 | |
9 project=$(composeGetProject ${1} ) | |
10 ip=$(docker inspect -f "{{with .NetworkSettings.Networks}}{{.${project}_default.IPAddress}}{{end}}" $container) | |
11 | |
12 echo "connecting to ${container} in ${project} at ${ip}:8080" | |
13 docker run --network ${project}_default --rm docker.ssdt.io/ssdt-utils curl -s http://${ip}:8080/metrics/admin/metrics?pretty=true | |
14 docker run --network ${project}_default --rm docker.ssdt.io/ssdt-utils curl -s http://${ip}:8080/metrics/admin/threads |