diff --git a/infrastructure/terraform/components/obsconfig/dashboards/overview/deployed-versions.json b/infrastructure/terraform/components/obsconfig/dashboards/overview/deployed-versions.json index 395d437a..60368f64 100644 --- a/infrastructure/terraform/components/obsconfig/dashboards/overview/deployed-versions.json +++ b/infrastructure/terraform/components/obsconfig/dashboards/overview/deployed-versions.json @@ -18,7 +18,7 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 68, + "id": 13, "links": [], "liveNow": true, "panels": [ @@ -45,7 +45,7 @@ { "datasource": { "type": "grafana-athena-datasource", - "uid": "fevkyppe14934d" + "uid": "${datasrc}" }, "fieldConfig": { "defaults": { @@ -218,14 +218,14 @@ { "connectionArgs": { "catalog": "__default", - "database": "nhs-main-acct", + "database": "__default", "region": "__default", "resultReuseEnabled": false, "resultReuseMaxAgeInMinutes": 60 }, "datasource": { "type": "grafana-athena-datasource", - "uid": "fevkyppe14934d" + "uid": "${datasrc}" }, "format": 1, "rawSQL": "SELECT bounded_context, \"group\", environment, component, version_internal, version_bounded_context, deployed_at, commit_id_internal, commit_id_bounded_context\nFROM (\n SELECT\n t.*,\n ROW_NUMBER() OVER (\n PARTITION BY t.bounded_context, t.component, t.\"group\"\n ORDER BY t.deployed_at DESC\n ) AS rn\n FROM \"nhs-main-acct-deployments\" t\n WHERE t.environment = 'main'\n) sub\nWHERE sub.rn = 1;", @@ -258,7 +258,7 @@ { "datasource": { "type": "grafana-athena-datasource", - "uid": "fevkyppe14934d" + "uid": "${datasrc}" }, "fieldConfig": { "defaults": { @@ -426,14 +426,14 @@ { "connectionArgs": { "catalog": "__default", - "database": "nhs-main-acct", + "database": "__default", "region": "__default", "resultReuseEnabled": false, "resultReuseMaxAgeInMinutes": 60 }, "datasource": { "type": "grafana-athena-datasource", - "uid": "fevkyppe14934d" + "uid": "${datasrc}" }, "format": 1, "rawSQL": "SELECT bounded_context, \"group\", environment, component, version_internal, version_bounded_context, deployed_at, commit_id_internal, commit_id_bounded_context\nFROM (\n SELECT\n t.*,\n ROW_NUMBER() OVER (\n PARTITION BY t.bounded_context, t.component, t.\"group\"\n ORDER BY t.deployed_at DESC\n ) AS rn\n FROM \"nhs-main-acct-deployments\" t\n WHERE t.environment != 'main'\n ORDER BY version_bounded_context\n) sub\nWHERE sub.rn = 1;", @@ -447,7 +447,26 @@ "schemaVersion": 39, "tags": [], "templating": { - "list": [] + "list": [ + { + "current": { + "selected": false, + "text": "nhs-main-obsconfig-athena-deployments", + "value": "devrdqg1nj5z4a" + }, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasrc", + "options": [], + "query": "grafana-athena-datasource", + "refresh": 1, + "regex": "nhs-main-obsconfig-athena-deployments", + "skipUrlSync": false, + "type": "datasource" + } + ] }, "time": { "from": "now-6h", @@ -458,5 +477,7 @@ }, "timezone": "browser", "title": "Deployed Component Versions", + "uid": "fevrdqh5wrmrke", + "version": 10, "weekStart": "" } diff --git a/infrastructure/terraform/components/obsconfig/dashboards/sms-nudge/sms-nudge.json b/infrastructure/terraform/components/obsconfig/dashboards/sms-nudge/sms-nudge.json index c26404aa..0a2ce9ae 100644 --- a/infrastructure/terraform/components/obsconfig/dashboards/sms-nudge/sms-nudge.json +++ b/infrastructure/terraform/components/obsconfig/dashboards/sms-nudge/sms-nudge.json @@ -493,6 +493,7 @@ "type": "cloudwatch", "uid": "${datasrc}" }, + "description": "Number of Messages sent based on AWS SQS CloudWatch metrics", "fieldConfig": { "defaults": { "color": { @@ -507,6 +508,14 @@ { "color": "green", "value": null + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "red", + "value": 200 } ] }, @@ -1388,7 +1397,7 @@ "overrides": [] }, "gridPos": { - "h": 8, + "h": 10, "w": 3, "x": 0, "y": 27 @@ -1544,7 +1553,7 @@ "overrides": [] }, "gridPos": { - "h": 4, + "h": 5, "w": 2, "x": 3, "y": 27 @@ -1635,12 +1644,45 @@ "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "line" + } }, "decimals": 0, "displayName": "ms", "fieldMinMax": false, "mappings": [], + "max": 5100, "noValue": "0", "thresholds": { "mode": "absolute", @@ -1648,6 +1690,10 @@ { "color": "green", "value": null + }, + { + "color": "red", + "value": 5000 } ] }, @@ -1656,26 +1702,23 @@ "overrides": [] }, "gridPos": { - "h": 8, + "h": 10, "w": 3, "x": 5, "y": 27 }, "id": 34, "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" + "tooltip": { + "mode": "single", + "sort": "none" + } }, "pluginVersion": "10.4.1", "targets": [ @@ -1726,7 +1769,7 @@ } ], "title": "APIM Refresh Token Duration", - "type": "gauge" + "type": "timeseries" }, { "datasource": { @@ -1757,7 +1800,7 @@ "overrides": [] }, "gridPos": { - "h": 8, + "h": 10, "w": 3, "x": 8, "y": 27 @@ -2214,10 +2257,10 @@ "overrides": [] }, "gridPos": { - "h": 4, + "h": 5, "w": 2, "x": 3, - "y": 31 + "y": 32 }, "id": 33, "options": { @@ -2420,114 +2463,6 @@ ], "type": "bargauge" }, - { - "datasource": { - "type": "cloudwatch", - "uid": "${datasrc}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 251 - }, - { - "color": "red", - "value": 501 - }, - { - "color": "dark-red", - "value": 1001 - } - ] - }, - "unit": "ms" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 11, - "x": 0, - "y": 35 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "cloudwatch", - "uid": "${datasrc}" - }, - "dimensions": { - "DistributionId": "$cfDist" - }, - "expression": "", - "id": "", - "label": "", - "logGroups": [], - "matchExact": false, - "metricEditorMode": 0, - "metricName": "OriginLatency", - "metricQueryType": 0, - "namespace": "AWS/CloudFront", - "period": "", - "queryMode": "Metrics", - "refId": "A", - "region": "us-east-1", - "sql": { - "from": { - "property": { - "name": "AWS/CloudFront", - "type": "string" - }, - "type": "property" - }, - "select": { - "name": "SUM", - "parameters": [ - { - "name": "4xxErrorRate", - "type": "functionParameter" - } - ], - "type": "function" - } - }, - "sqlExpression": "SELECT SUM(\"4xxErrorRate\") FROM \"AWS/CloudFront\"", - "statistic": "Average" - } - ], - "title": "Cloudfront Origin Latency", - "type": "stat" - }, { "datasource": { "type": "cloudwatch", @@ -2611,8 +2546,8 @@ }, "gridPos": { "h": 9, - "w": 10, - "x": 11, + "w": 21, + "x": 0, "y": 37 }, "id": 36, @@ -2801,133 +2736,6 @@ ], "title": "Cloudfront Error Rate", "type": "timeseries" - }, - { - "datasource": { - "type": "cloudwatch", - "uid": "${datasrc}" - }, - "fieldConfig": { - "defaults": { - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "scaleDistribution": { - "type": "linear" - } - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 11, - "x": 0, - "y": 39 - }, - "id": 17, - "options": { - "calculate": false, - "cellGap": 1, - "color": { - "exponent": 0.5, - "fill": "dark-orange", - "mode": "scheme", - "reverse": false, - "scale": "exponential", - "scheme": "Spectral", - "steps": 64 - }, - "exemplars": { - "color": "rgba(255,0,255,0.7)" - }, - "filterValues": { - "le": 1e-09 - }, - "legend": { - "show": true - }, - "rowsFrame": { - "layout": "auto" - }, - "tooltip": { - "mode": "single", - "showColorScale": false, - "yHistogram": false - }, - "yAxis": { - "axisPlacement": "left", - "reverse": false, - "unit": "none" - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "datasource": { - "type": "cloudwatch", - "uid": "${datasrc}" - }, - "dimensions": { - "DistributionId": "$cfDist" - }, - "expression": "", - "id": "", - "label": "", - "logGroups": [], - "matchExact": false, - "metricEditorMode": 0, - "metricName": "OriginLatency", - "metricQueryType": 0, - "namespace": "AWS/CloudFront", - "period": "", - "queryMode": "Metrics", - "refId": "A", - "region": "us-east-1", - "sql": { - "from": { - "property": { - "name": "AWS/CloudFront", - "type": "string" - }, - "type": "property" - }, - "select": { - "name": "SUM", - "parameters": [ - { - "name": "4xxErrorRate", - "type": "functionParameter" - } - ], - "type": "function" - } - }, - "sqlExpression": "SELECT SUM(\"4xxErrorRate\") FROM \"AWS/CloudFront\"", - "statistic": "Average" - } - ], - "title": "Cloudfront Origin Latency", - "transformations": [ - { - "id": "heatmap", - "options": { - "xBuckets": { - "mode": "size" - }, - "yBuckets": { - "mode": "size", - "scale": { - "type": "linear" - } - } - } - } - ], - "type": "heatmap" } ], "refresh": "", @@ -3020,7 +2828,7 @@ ] }, "time": { - "from": "now-6h", + "from": "now-7d", "to": "now" }, "timepicker": {}, diff --git a/scripts/config/pre-commit.yaml b/scripts/config/pre-commit.yaml index 29397e23..9c5e690a 100644 --- a/scripts/config/pre-commit.yaml +++ b/scripts/config/pre-commit.yaml @@ -13,6 +13,7 @@ repos: - id: mixed-line-ending - id: pretty-format-json args: ['--autofix'] + exclude: '(^|/)package(-lock)?\.json$' # - id: ... - repo: local hooks: diff --git a/scripts/init.mk b/scripts/init.mk index e12255c3..c42cf2bf 100644 --- a/scripts/init.mk +++ b/scripts/init.mk @@ -46,8 +46,8 @@ _install-dependency: # Install asdf dependency - mandatory: name=[listed in the asdf install ${name} $(or ${version},) _install-dependencies: # Install all the dependencies listed in .tool-versions - for plugin in $$(grep ^[a-z] .tool-versions | sed 's/[[:space:]].*//'); do - make _install-dependency name="$${plugin}" + for plugin in $$(grep '^[a-z]' .tool-versions | cut -f1 -d' '); do \ + echo "Installing $${plugin}..."; \ done clean:: # Remove all generated and temporary files (common) @Operations