diff --git a/.github/test/compose.yaml b/.github/test/compose.yaml index 49412f2c..51f1a2a3 100644 --- a/.github/test/compose.yaml +++ b/.github/test/compose.yaml @@ -1,3 +1,5 @@ +name: fts-test + networks: agents: clinical-domain: diff --git a/monitoring/README.md b/monitoring/README.md index a9f2ba7e..3c73d742 100644 --- a/monitoring/README.md +++ b/monitoring/README.md @@ -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. +`` diff --git a/monitoring/compose.yaml b/monitoring/compose.yaml index 3ef0e422..10235e60 100644 --- a/monitoring/compose.yaml +++ b/monitoring/compose.yaml @@ -8,7 +8,7 @@ services: command: - --enable-feature=native-histograms - --config.file=/prometheus.yml - networks: [ "fts" ] + networks: [ "monitoring", "clinical-domain", "research-domain", "trust-center" ] ports: - :9090 @@ -21,8 +21,15 @@ services: - ./grafana/grafana.ini:/etc/grafana/grafana.ini ports: - 42128:3000 - networks: [ "fts" ] + networks: [ "monitoring" ] networks: - fts: - name: ${NETWORK_NAME:-fts-smith-care} + monitoring: + clinical-domain: external: true + name: fts-test_clinical-domain + research-domain: + external: true + name: fts-test_research-domain + trust-center: + external: true + name: fts-test_trust-center diff --git a/monitoring/grafana/dashboards/http-request-duration.json b/monitoring/grafana/dashboards/http-request-duration.json index 0a2da3ac..279217e4 100644 --- a/monitoring/grafana/dashboards/http-request-duration.json +++ b/monitoring/grafana/dashboards/http-request-duration.json @@ -379,8 +379,8 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 6, + "h": 7, + "w": 12, "x": 0, "y": 17 }, @@ -472,9 +472,9 @@ "overrides": [] }, "gridPos": { - "h": 8, - "w": 8, - "x": 6, + "h": 7, + "w": 12, + "x": 12, "y": 17 }, "id": 34, @@ -563,7 +563,6 @@ } }, "mappings": [], - "max": 0.5, "thresholds": { "mode": "absolute", "steps": [ @@ -583,9 +582,9 @@ }, "gridPos": { "h": 8, - "w": 5, - "x": 14, - "y": 17 + "w": 8, + "x": 0, + "y": 24 }, "id": 8, "options": { @@ -601,6 +600,109 @@ } }, "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "builder", + "expr": "histogram_quantile(0.5, rate(http_client_requests_seconds_bucket{job=\"cda\", uri=\"/fhir/Patient/{id}/$everything\"}[1m]))", + "format": "heatmap", + "fullMetaSearch": false, + "includeNullMetadata": true, + "instant": false, + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "fetchEverything p95", + "type": "timeseries" + }, + { + "datasource": { + "default": true, + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 24 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.2.0", "targets": [ { "datasource": { @@ -667,7 +769,6 @@ } }, "mappings": [], - "max": 0.5, "thresholds": { "mode": "absolute", "steps": [ @@ -687,9 +788,9 @@ }, "gridPos": { "h": 8, - "w": 5, - "x": 19, - "y": 17 + "w": 8, + "x": 16, + "y": 24 }, "id": 35, "options": { @@ -751,7 +852,7 @@ "h": 8, "w": 12, "x": 0, - "y": 25 + "y": 32 }, "id": 9, "options": { @@ -844,7 +945,7 @@ "h": 8, "w": 12, "x": 12, - "y": 25 + "y": 32 }, "id": 10, "options": { @@ -912,7 +1013,7 @@ "h": 8, "w": 12, "x": 0, - "y": 33 + "y": 40 }, "id": 11, "options": { @@ -1005,7 +1106,7 @@ "h": 8, "w": 12, "x": 12, - "y": 33 + "y": 40 }, "id": 12, "options": { @@ -1073,7 +1174,7 @@ "h": 8, "w": 12, "x": 0, - "y": 41 + "y": 48 }, "id": 13, "options": { @@ -1150,7 +1251,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1165,7 +1267,7 @@ "h": 8, "w": 12, "x": 12, - "y": 41 + "y": 48 }, "id": 14, "options": { @@ -1233,7 +1335,7 @@ "h": 8, "w": 12, "x": 0, - "y": 49 + "y": 56 }, "id": 32, "options": { @@ -1310,7 +1412,8 @@ "mode": "absolute", "steps": [ { - "color": "green" + "color": "green", + "value": null }, { "color": "red", @@ -1325,7 +1428,7 @@ "h": 8, "w": 12, "x": 12, - "y": 49 + "y": 56 }, "id": 33, "options": { @@ -1374,7 +1477,7 @@ "h": 1, "w": 24, "x": 0, - "y": 57 + "y": 64 }, "id": 15, "panels": [], @@ -1406,7 +1509,7 @@ "h": 8, "w": 12, "x": 0, - "y": 58 + "y": 65 }, "id": 29, "options": { @@ -1498,7 +1601,7 @@ "h": 8, "w": 12, "x": 12, - "y": 58 + "y": 65 }, "id": 28, "options": { @@ -1566,7 +1669,7 @@ "h": 8, "w": 12, "x": 0, - "y": 66 + "y": 73 }, "id": 30, "options": { @@ -1657,7 +1760,7 @@ "h": 8, "w": 12, "x": 12, - "y": 66 + "y": 73 }, "id": 31, "options": { @@ -1706,7 +1809,7 @@ "h": 1, "w": 24, "x": 0, - "y": 74 + "y": 81 }, "id": 20, "panels": [], @@ -1738,7 +1841,7 @@ "h": 8, "w": 12, "x": 0, - "y": 75 + "y": 82 }, "id": 22, "options": { @@ -1829,7 +1932,7 @@ "h": 8, "w": 12, "x": 12, - "y": 75 + "y": 82 }, "id": 23, "options": { @@ -1897,7 +2000,7 @@ "h": 8, "w": 12, "x": 0, - "y": 83 + "y": 90 }, "id": 24, "options": { @@ -1988,7 +2091,7 @@ "h": 8, "w": 12, "x": 12, - "y": 83 + "y": 90 }, "id": 25, "options": { @@ -2056,7 +2159,7 @@ "h": 8, "w": 12, "x": 0, - "y": 91 + "y": 98 }, "id": 26, "options": { @@ -2147,7 +2250,7 @@ "h": 8, "w": 12, "x": 12, - "y": 91 + "y": 98 }, "id": 27, "options": { @@ -2205,6 +2308,6 @@ "timezone": "", "title": "HTTP Request Duration", "uid": "b09b2bde-f43d-484e-92c8-e09296372056", - "version": 2, + "version": 1, "weekStart": "" }