From 4d94830d306f0b0d3f6740ad78a5a8fd6c2af8c3 Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Wed, 25 Jan 2017 15:49:05 +0000 Subject: [PATCH] Add stat collection --- cloudapi-graphql/Dockerfile | 2 +- docker-compose.yml | 1 - frontend/Dockerfile | 2 +- frontend/etc/containerpilot.json | 21 ++++++++++++++++++++- ui/Dockerfile | 2 +- ui/Dockerfile.build | 2 +- ui/etc/containerpilot.json | 21 ++++++++++++++++++++- 7 files changed, 44 insertions(+), 7 deletions(-) diff --git a/cloudapi-graphql/Dockerfile b/cloudapi-graphql/Dockerfile index db2992cb..63a65e64 100644 --- a/cloudapi-graphql/Dockerfile +++ b/cloudapi-graphql/Dockerfile @@ -1 +1 @@ -FROM quay.io/yldio/alpine-node-containerpilot:6.9.3 +FROM quay.io/yldio/alpine-node-containerpilot:6.9.4 diff --git a/docker-compose.yml b/docker-compose.yml index 095e102f..b778fac7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,7 +76,6 @@ nginx: ports: - 80:80 - 443:443 - - 9090:9090 env_file: .env environment: - CONSUL_AGENT=1 diff --git a/frontend/Dockerfile b/frontend/Dockerfile index db2992cb..63a65e64 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1 +1 @@ -FROM quay.io/yldio/alpine-node-containerpilot:6.9.3 +FROM quay.io/yldio/alpine-node-containerpilot:6.9.4 diff --git a/frontend/etc/containerpilot.json b/frontend/etc/containerpilot.json index 2c2bd9b1..dc86246b 100644 --- a/frontend/etc/containerpilot.json +++ b/frontend/etc/containerpilot.json @@ -10,5 +10,24 @@ } ], "backends": [ - ] + ], + "telemetry": { + "port": 9090, + "sensors": [ + { + "name": "frontend_memory_percent", + "help": "percentage of memory used", + "type": "gauge", + "poll": 5, + "check": ["/bin/sensor", "memory"] + }, + { + "name": "frontend_cpu_load", + "help": "cpu load", + "type": "gauge", + "poll": 5, + "check": ["/bin/sensor", "cpu"] + } + ] + } } diff --git a/ui/Dockerfile b/ui/Dockerfile index ee19c339..ff2d47d7 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -1,2 +1,2 @@ -FROM quay.io/yldio/alpine-node-containerpilot:6.9.3 +FROM quay.io/yldio/alpine-node-containerpilot:6.9.4 RUN yarn add st diff --git a/ui/Dockerfile.build b/ui/Dockerfile.build index 10d037d9..d1da7a49 100644 --- a/ui/Dockerfile.build +++ b/ui/Dockerfile.build @@ -1,4 +1,4 @@ -FROM quay.io/yldio/alpine-node-containerpilot:6.9.3 +FROM quay.io/yldio/alpine-node-containerpilot:6.9.4 ARG NPM_TOKEN ARG CIRCLE_BUILD_NUM ENV NPM_TOKEN ${NPM_TOKEN} diff --git a/ui/etc/containerpilot.json b/ui/etc/containerpilot.json index 6f47cb5d..299ed9fc 100644 --- a/ui/etc/containerpilot.json +++ b/ui/etc/containerpilot.json @@ -10,5 +10,24 @@ } ], "backends": [ - ] + ], + "telemetry": { + "port": 9090, + "sensors": [ + { + "name": "ui_memory_percent", + "help": "percentage of memory used", + "type": "gauge", + "poll": 5, + "check": ["/bin/sensor", "memory"] + }, + { + "name": "ui_cpu_load", + "help": "cpu load", + "type": "gauge", + "poll": 5, + "check": ["/bin/sensor", "cpu"] + } + ] + } }