Skip to content

Commit

Permalink
CDPT-1239 Update dashboard and alerts to cater for basic auth on dev …
Browse files Browse the repository at this point in the history
…& demo. (#705)

Update dashboard and alerts to cater for basic auth on dev & demo.
  • Loading branch information
EarthlingDavey authored Sep 19, 2024
1 parent 7d6a71d commit a12fa3d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
10 changes: 0 additions & 10 deletions deploy/demo/alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,3 @@ spec:
message: Namespace {{ $labels.namespace }} (homepage) is not returning a status code.
runbook_url: https://dsdmoj.atlassian.net/wiki/spaces/CDPT/pages/5124292758/Alerts+runbooks#ServiceAbsentAccessPolicy
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/bdwyqxz07sxkwg/intranet-service?orgId=1&var-namespace=intranet-demo

- alert: ServiceInsufficientHeaderHandling
expr: http_status_code_invalid_header{namespace="intranet-demo"} != 400
for: 1m
labels:
severity: intranet-demo
annotations:
message: Namespace {{ $labels.namespace }} (invalid header) is returning an unexpected status code {{ printf "%0.0f" $value}}.
runbook_url: https://dsdmoj.atlassian.net/wiki/spaces/CDPT/pages/5124292758/Alerts+runbooks#ServiceInsufficientHeaderHandling
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/bdwyqxz07sxkwg/intranet-service?orgId=1&var-namespace=intranet-demo
10 changes: 0 additions & 10 deletions deploy/development/alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,3 @@ spec:
message: Namespace {{ $labels.namespace }} (homepage) is not returning a status code.
runbook_url: https://dsdmoj.atlassian.net/wiki/spaces/CDPT/pages/5124292758/Alerts+runbooks#ServiceAbsentAccessPolicy
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/bdwyqxz07sxkwg/intranet-service?orgId=1

- alert: ServiceInsufficientHeaderHandling
expr: http_status_code_invalid_header{namespace="intranet-dev"} != 400
for: 1m
labels:
severity: intranet-dev
annotations:
message: Namespace {{ $labels.namespace }} (invalid header) is returning an unexpected status code {{ printf "%0.0f" $value}}.
runbook_url: https://dsdmoj.atlassian.net/wiki/spaces/CDPT/pages/5124292758/Alerts+runbooks#ServiceInsufficientHeaderHandling
dashboard_url: https://grafana.live.cloud-platform.service.justice.gov.uk/d/bdwyqxz07sxkwg/intranet-service?orgId=1
12 changes: 7 additions & 5 deletions deploy/development/service-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ data:
"type": "prometheus",
"uid": "prometheus"
},
"description": "The status when sending an X-Moj-Ip-Group header.\n\nThis should always be 400 (✅). A cross (❌) will display when any other value is presented.",
"description": "The status when sending an X-Moj-Ip-Group header.\n\nThis should always be 400 or 401 (✅) depending on ingress basic auth being disabled, or enabled, respectively. A cross (❌) will display when any other value is presented.",
"fieldConfig": {
"defaults": {
"color": {
Expand All @@ -480,12 +480,14 @@ data:
"mappings": [
{
"options": {
"400": {
"from": 400,
"result": {
"index": 1,
"text": "✅"
}
},
"to": 401
},
"type": "value"
"type": "range"
},
{
"options": {
Expand All @@ -510,7 +512,7 @@ data:
},
{
"options": {
"from": 401,
"from": 402,
"result": {
"index": 3,
"text": "❌"
Expand Down

0 comments on commit a12fa3d

Please sign in to comment.