diff --git a/gocd/templates/bash/canary-ddog-health-check.sh b/gocd/templates/bash/canary-ddog-health-check.sh new file mode 100755 index 00000000000..04dac569ea5 --- /dev/null +++ b/gocd/templates/bash/canary-ddog-health-check.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +/devinfra/scripts/checks/datadog/monitor_status.py --dry-run=true \ + 140973101 + + +# Above monitor IDs 140973101 map to following monitors: +# Snuba API Health Check is Failing diff --git a/gocd/templates/pipelines/snuba.libsonnet b/gocd/templates/pipelines/snuba.libsonnet index f4319700344..022a08cf71c 100644 --- a/gocd/templates/pipelines/snuba.libsonnet +++ b/gocd/templates/pipelines/snuba.libsonnet @@ -135,6 +135,18 @@ local deploy_canary_stage(region) = gocdtasks.script(importstr '../bash/deploy.sh'), ], }, + health_check: { + environment_variables: { + SENTRY_AUTH_TOKEN: '{{SECRET:[devinfra-sentryio][token]}}', + DATADOG_API_KEY: '{{SECRET:[devinfra][sentry_datadog_api_key]}}', + DATADOG_APP_KEY: '{{SECRET:[devinfra][sentry_datadog_app_key]}}', + LABEL_SELECTOR: 'service=snuba,is_canary=true', + }, + elastic_profile_id: 'snuba', + tasks: [ + gocdtasks.script(importstr '../bash/canary-ddog-health-check.sh'), + ], + }, }, }, },