diff --git a/operations/observability/mixins/IDE/rules/components/components.libsonnet b/operations/observability/mixins/IDE/rules/components/components.libsonnet index 62f463a59e54c8..bfee198275ec86 100644 --- a/operations/observability/mixins/IDE/rules/components/components.libsonnet +++ b/operations/observability/mixins/IDE/rules/components/components.libsonnet @@ -3,16 +3,5 @@ * Licensed under the MIT License. See License-MIT.txt in the project root for license information. */ -// When implementing the first alerts and recording rules, please follow the same folder structure used by other teams' mixins -// Ping @ArthurSens if necessary -{ - prometheusAlerts+:: { - groups+: [], - // IDE team doesn have any alerts yet - }, - - prometheusRules+:: { - groups+: [], - // IDE team doesn have any recording rules yet - }, -} +(import './openvsx-proxy/alerts.libsonnet') + +(import './openvsx-proxy/rules.libsonnet') diff --git a/operations/observability/mixins/IDE/rules/components/openvsx-proxy/alerts.libsonnet b/operations/observability/mixins/IDE/rules/components/openvsx-proxy/alerts.libsonnet new file mode 100644 index 00000000000000..53d9c9597839f7 --- /dev/null +++ b/operations/observability/mixins/IDE/rules/components/openvsx-proxy/alerts.libsonnet @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2021 Gitpod GmbH. All rights reserved. + * Licensed under the MIT License. See License-MIT.txt in the project root for license information. + */ + +{ + prometheusAlerts+:: { + groups+: [ + { + name: 'gitpod-component-openvsx-proxy-alerts', + rules: [ + { + alert: 'GitpodOpenVSXRegistryDown', + labels: { + severity: 'critical', + }, + 'for': '20m', + annotations: { + runbook_url: 'https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodOpenVsxRegistryDown.md', + summary: 'Open-VSX registry is possibly down', + description: 'Open-VSX registry is possibly down. We cannot pull VSCode extensions we don\'t have in our caches', + }, + expr: + ||| + sum(rate(gitpod_openvsx_proxy_requests_total{status=~"5..|error"}[5m])) / sum(rate(gitpod_openvsx_proxy_requests_total[5m])) > 0.01 + |||, + }, + ], + }, + ], + }, +} diff --git a/operations/observability/mixins/IDE/rules/components/openvsx-proxy/rules.libsonnet b/operations/observability/mixins/IDE/rules/components/openvsx-proxy/rules.libsonnet new file mode 100644 index 00000000000000..b1ab6e0b5b5e54 --- /dev/null +++ b/operations/observability/mixins/IDE/rules/components/openvsx-proxy/rules.libsonnet @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2021 Gitpod GmbH. All rights reserved. + * Licensed under the MIT License. See License-MIT.txt in the project root for license information. + */ + +{ + prometheusRules+:: { + groups+: [], + // There is no recording rules for this component. + }, +}