<commit_before>variable "pingdom_user" {}

variable "pingdom_password" {}

variable "pingdom_api_key" {}

variable "pingdom_account_email" {}

variable "apps_dns_zone_name" {}
variable "system_dns_zone_name" {}

variable "env" {}

variable "pingdom_contact_ids" {
  type = "list"
}

provider "pingdom" {
  user          = "${var.pingdom_user}"
  password      = <PASSWORD>}"
  api_key       = "${var.pingdom_api_key}"
  account_email = "${var.pingdom_account_email}"
}

resource "pingdom_check" "paas_http_healthcheck" {
  type                     = "http"
  name                     = "PaaS HTTPS - ${var.env}"
  host                     = "healthcheck.${var.apps_dns_zone_name}"
  url                      = "/"
  shouldcontain            = "END OF THIS PROJECT GUTENBERG EBOOK"
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}

resource "pingdom_check" "paas_db_healthcheck" {
  type                     = "http"
  name                     = "PaaS DB - ${var.env}"
  host                     = "healthcheck.${var.apps_dns_zone_name}"
  url                      = "/db"
  shouldcontain            = "\"success\": true"
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}

resource "pingdom_check" "cf_api_healthcheck" {
  type                     = "http"
  name                     = "PaaS CF API - ${var.env}"
  host                     = "api.${var.system_dns_zone_name}"
  url                      = "/v2/info"
  shouldcontain            = "api_version"
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}

resource "pingdom_check" "paas_admin_healthcheck" {
  type                     = "http"
  name                     = "PaaS Admin - ${var.env}"
  host                     = "admin.${var.system_dns_zone_name}"
  url                      = "/healthcheck"
  shouldcontain            = "costs"
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}<commit_msg>Fix healthcheck to expect "OK" instead of costs<commit_after>variable "pingdom_user" {}

variable "pingdom_password" {}

variable "pingdom_api_key" {}

variable "pingdom_account_email" {}

variable "apps_dns_zone_name" {}
variable "system_dns_zone_name" {}

variable "env" {}

variable "pingdom_contact_ids" {
  type = "list"
}

provider "pingdom" {
  user          = "${var.pingdom_user}"
  password      = "${<PASSWORD>}"
  api_key       = "${var.pingdom_api_key}"
  account_email = "${var.pingdom_account_email}"
}

resource "pingdom_check" "paas_http_healthcheck" {
  type                     = "http"
  name                     = "PaaS HTTPS - ${var.env}"
  host                     = "healthcheck.${var.apps_dns_zone_name}"
  url                      = "/"
  shouldcontain            = "END OF THIS PROJECT GUTENBERG EBOOK"
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}

resource "pingdom_check" "paas_db_healthcheck" {
  type                     = "http"
  name                     = "PaaS DB - ${var.env}"
  host                     = "healthcheck.${var.apps_dns_zone_name}"
  url                      = "/db"
  shouldcontain            = "\"success\": true"
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}

resource "pingdom_check" "cf_api_healthcheck" {
  type                     = "http"
  name                     = "PaaS CF API - ${var.env}"
  host                     = "api.${var.system_dns_zone_name}"
  url                      = "/v2/info"
  shouldcontain            = "api_version"
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}

resource "pingdom_check" "paas_admin_healthcheck" {
  type                     = "http"
  name                     = "PaaS Admin - ${var.env}"
  host                     = "admin.${var.system_dns_zone_name}"
  url                      = "/healthcheck"
  shouldcontain            = "\"OK\""
  encryption               = true
  resolution               = 1
  uselegacynotifications   = true
  sendtoemail              = true
  sendnotificationwhendown = 2
  notifywhenbackup         = true
  contactids               = ["${var.pingdom_contact_ids}"]
}
{'fraction_non_alphanumeric': 0.09801397572637, 'fraction_numerical': 0.0033100404560500183, 'mean_word_length': 1.6505847953216375, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '639148', 'n_tokens_mistral': 1643, 'n_tokens_neox': 1591, 'n_words': 307}