Skip to content

Commit

Permalink
Add monitoring Network to Test Setup
Browse files Browse the repository at this point in the history
This network contains all agents and their HDSs.
  • Loading branch information
trobanga committed Sep 10, 2024
1 parent c011d78 commit e3e427e
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 52 deletions.
6 changes: 6 additions & 0 deletions .github/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ pull:
start:
docker compose up --wait

start-with-monitoring:
MONITORING_DIR=../../monitoring docker compose -f compose.yaml -f ../../monitoring/compose.yaml up --wait

stop-with-monitoring:
docker compose -f compose.yaml -f ../../monitoring/compose.yaml down

upload:
../scripts/upload-data.sh 100

Expand Down
2 changes: 2 additions & 0 deletions .github/test/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: fts-test

networks:
agents:
clinical-domain:
Expand Down
8 changes: 5 additions & 3 deletions monitoring/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Monitoring-Util

This module contains an example configuration to utilize Prometheus to collect metrics from CDA, RDA, and TCA and
visualize them with Grafana.
This module contains an example configuration to utilize Prometheus to collect metrics from
CDA, RDA, and TCA and visualize them with Grafana.

When using `compose.yaml`make sure to set the NETWORK_NAME environment variable to the same network
of CDA, RDA, and TCA, e.g. `test_agents`, if you are running tests in `.github/test`.
of CDA, RDA, and TCA, e.g. `test_monitoring`, if you are running tests in `.github/test`.
For developer convenience, we set `test_monitoring` as the default.
``
20 changes: 7 additions & 13 deletions monitoring/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
name: fts-monitoring

services:
prometheus:
image: prom/prometheus:v2.54.1@sha256:f6639335d34a77d9d9db382b92eeb7fc00934be8eae81dbc03b31cfe90411a94
volumes:
- ./prometheus.yml:/prometheus.yml
- ${MONITORING_DIR:-.}/prometheus.yml:/prometheus.yml
command:
- --enable-feature=native-histograms
- --config.file=/prometheus.yml
networks: [ "fts" ]
networks: [ "clinical-domain", "research-domain", "trust-center" ]
ports:
- :9090

grafana:
image: grafana/grafana:11.2.0@sha256:408afb9726de5122b00a2576763a8a57a3c86d5b0eff5305bc994ceb3eb96c3f
volumes:
- ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/grafana-datasources.yaml
- ./grafana/dashboards.yaml:/etc/grafana/provisioning/dashboards/grafana-dashboards.yaml
- ./grafana/dashboards:/etc/grafana/dashboards
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
- ${MONITORING_DIR:-.}/grafana/datasources.yaml:/etc/grafana/provisioning/datasources/grafana-datasources.yaml
- ${MONITORING_DIR:-.}/grafana/dashboards.yaml:/etc/grafana/provisioning/dashboards/grafana-dashboards.yaml
- ${MONITORING_DIR:-.}/grafana/dashboards:/etc/grafana/dashboards
- ${MONITORING_DIR:-.}/grafana/grafana.ini:/etc/grafana/grafana.ini
ports:
- 42128:3000
networks: [ "fts" ]
networks:
fts:
name: ${NETWORK_NAME:-fts-smith-care}
external: true
networks: [ "clinical-domain", "research-domain", "trust-center" ]
Loading

0 comments on commit e3e427e

Please sign in to comment.