Commit 2d0a34ec authored by Ben Kochie's avatar Ben Kochie

Remove alertmanagers from gprd.

Transition all alerting to GCE ops environment.
parent 17c38c6e
......@@ -53,20 +53,4 @@ resource "google_compute_url_map" "monitoring-lb" {
service = "${module.prometheus-db.google_compute_backend_service_self_link}"
}
}
###################################
host_rule {
hosts = ["alerts.gprd.gitlab.net"]
path_matcher = "alerts"
}
path_matcher {
name = "alerts"
default_service = "${module.alerts.google_compute_backend_service_self_link}"
path_rule {
paths = ["/*"]
service = "${module.alerts.google_compute_backend_service_self_link}"
}
}
}
......@@ -44,8 +44,8 @@ variable "monitoring_hosts" {
type = "map"
default = {
"names" = ["alerts", "prometheus", "prometheus-app", "prometheus-db"]
"ports" = [9093, 9090, 9090, 9090]
"names" = ["prometheus", "prometheus-app", "prometheus-db"]
"ports" = [9090, 9090, 9090]
}
}
......@@ -323,7 +323,6 @@ variable "machine_types" {
type = "map"
default = {
"alerts" = "n1-standard-1"
"api" = "n1-standard-16"
"bastion" = "g1-small"
"blackbox" = "n1-standard-1"
......@@ -417,7 +416,6 @@ variable "node_count" {
"api-cny" = 2
"git-cny" = 2
"registry-cny" = 2
"alerts" = 2
"prometheus" = 2
"prometheus-app" = 2
"prometheus-db" = 2
......
......@@ -80,8 +80,8 @@ variable "monitoring_hosts" {
type = "map"
default = {
"names" = ["alerts", "prometheus", "prometheus-app", "prometheus-db"]
"ports" = [9093, 9090, 9090, 9090]
"names" = ["prometheus", "prometheus-app", "prometheus-db"]
"ports" = [9090, 9090, 9090]
}
}
......@@ -315,7 +315,6 @@ variable "machine_types" {
type = "map"
default = {
"alerts" = "n1-standard-1"
"api" = "n1-standard-16"
"bastion" = "g1-small"
"blackbox" = "n1-standard-1"
......@@ -413,7 +412,6 @@ variable "node_count" {
"prometheus" = 2
"prometheus-app" = 2
"prometheus-db" = 2
"alerts" = 0
"influxdb" = 2
}
}
......
......@@ -1282,36 +1282,6 @@ module "prometheus-db" {
vpc = "${module.network.self_link}"
}
module "alerts" {
attach_data_disk = true
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-alerts]\""
data_disk_size = 100
data_disk_type = "pd-standard"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
fw_whitelist_subnets = "${concat(var.monitoring_whitelist_alerts["subnets"], var.other_monitoring_subnets)}"
fw_whitelist_ports = "${var.monitoring_whitelist_alerts["ports"]}"
health_check = "tcp"
kernel_version = "${var.default_kernel_version}"
machine_type = "${var.machine_types["alerts"]}"
name = "alerts"
node_count = "${var.node_count["alerts"]}"
oauth2_client_id = "${var.oauth2_client_id_monitoring}"
oauth2_client_secret = "${var.oauth2_client_secret_monitoring}"
persistent_disk_path = "/opt"
project = "${var.project}"
region = "${var.region}"
service_account_email = "${var.service_account_email}"
service_port = "${element(var.monitoring_hosts["ports"], index(var.monitoring_hosts["names"], "alerts"))}"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/monitoring-with-count.git?ref=v1.0.1"
subnetwork_name = "${google_compute_subnetwork.monitoring.name}"
tier = "inf"
use_new_node_name = true
vpc = "${module.network.self_link}"
}
module "sd-exporter" {
additional_scopes = ["https://www.googleapis.com/auth/monitoring"]
allow_stopping_for_update = true
......
......@@ -46,20 +46,6 @@ variable "monitoring_whitelist_thanos" {
}
}
#################
# Allow traffic from the ops
# network from the alerts manager
#################
variable "monitoring_whitelist_alerts" {
type = "map"
default = {
# 10.250.8.x for the ops alerts servers
"subnets" = ["10.250.8.0/24"]
"ports" = ["9093"]
}
}
####################################
# Default log filters for stackdriver
#####################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment