Mercurial > public > ssdt-docker
changeset 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 | f24a5f2abcdf (current diff) d0b895380e5d (diff) |
children | 22fef2c584e5 |
files | |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/metrics.sh Tue Sep 26 20:52:22 2017 +0100 @@ -0,0 +1,14 @@ +#!/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