From 88746cc2a8f89aa5add669c6b82cb2f4ce641ab5 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 12:27:26 +0100 Subject: [PATCH 1/8] feat: Added datadog annotations for sending metrics to DD --- k8s-metadata-cleanup.tf | 3 +++ k8s-scheduler-apiary.tf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/k8s-metadata-cleanup.tf b/k8s-metadata-cleanup.tf index 725230c..e6852af 100644 --- a/k8s-metadata-cleanup.tf +++ b/k8s-metadata-cleanup.tf @@ -38,6 +38,9 @@ resource "kubernetes_deployment_v1" "beekeeper_metadata_cleanup" { metadata { labels = local.metadata_cleanup_label_name_instance annotations = { + "ad.datadoghq.com/beekeeper-metadata-cleanup.check_names": "[\"openmetrics\"]" + "ad.datadoghq.com/beekeeper-metadata-cleanup.init_configs": "[{}]" + "ad.datadoghq.com/beekeeper-metadata-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": \"beekeeper\", \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_metadata_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-scheduler-apiary.tf b/k8s-scheduler-apiary.tf index d016ca8..8e5f8bf 100644 --- a/k8s-scheduler-apiary.tf +++ b/k8s-scheduler-apiary.tf @@ -38,6 +38,9 @@ resource "kubernetes_deployment_v1" "beekeeper_scheduler_apiary" { metadata { labels = local.scheduler_apiary_label_name_instance annotations = { + "ad.datadoghq.com/beekeeper-scheduler-apiary.check_names": "[\"openmetrics\"]" + "ad.datadoghq.com/beekeeper-scheduler-apiary.init_configs": "[{}]" + "ad.datadoghq.com/beekeeper-scheduler-apiary.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"beekeeper\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_scheduler_apiary_port "prometheus.io/path" : "/actuator/prometheus" From f3abc2a0d08b475b2d297b015cb41813ed08453a Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 12:28:31 +0100 Subject: [PATCH 2/8] feat: Added datadog annotations for sending metrics to DD --- k8s-path-cleanup.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/k8s-path-cleanup.tf b/k8s-path-cleanup.tf index acf44a6..0b2f94a 100644 --- a/k8s-path-cleanup.tf +++ b/k8s-path-cleanup.tf @@ -38,6 +38,9 @@ resource "kubernetes_deployment_v1" "beekeeper_path_cleanup" { metadata { labels = local.path_cleanup_label_name_instance annotations = { + "ad.datadoghq.com/beekeeper-path-cleanup.check_names": "[\"openmetrics\"]" + "ad.datadoghq.com/beekeeper-path-cleanup.init_configs": "[{}]" + "ad.datadoghq.com/beekeeper-path-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": \"beekeeper\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_path_cleanup_port "prometheus.io/path" : "/actuator/prometheus" From 36e9c060ae9ee514bd5030beace61418710333e2 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 12:41:28 +0100 Subject: [PATCH 3/8] feat: Added datadog annotations for sending metrics to DD --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29cf9ea..f889363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [5.1.0] - 2024-08-30 +### Added +- Added datadog annotations to send metrics from `scheduler-apiary`, `metadata-cleanup`, `path-cleanup` to DD. + ## [5.0.5] - 2024-08-21 ### Fixed - Add `copy_tags_to_snapshot` to aws_rds_cluster. From b9056c2ef137c96b523cf83dd4c5f59602086388 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 13:54:00 +0100 Subject: [PATCH 4/8] feat: Added datadog annotations for sending metrics to DD --- k8s-metadata-cleanup.tf | 2 +- k8s-path-cleanup.tf | 2 +- k8s-scheduler-apiary.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s-metadata-cleanup.tf b/k8s-metadata-cleanup.tf index e6852af..571a435 100644 --- a/k8s-metadata-cleanup.tf +++ b/k8s-metadata-cleanup.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_metadata_cleanup" { annotations = { "ad.datadoghq.com/beekeeper-metadata-cleanup.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/beekeeper-metadata-cleanup.init_configs": "[{}]" - "ad.datadoghq.com/beekeeper-metadata-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": \"beekeeper\", \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" + "ad.datadoghq.com/beekeeper-metadata-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_metadata_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-path-cleanup.tf b/k8s-path-cleanup.tf index 0b2f94a..aed5fff 100644 --- a/k8s-path-cleanup.tf +++ b/k8s-path-cleanup.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_path_cleanup" { annotations = { "ad.datadoghq.com/beekeeper-path-cleanup.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/beekeeper-path-cleanup.init_configs": "[{}]" - "ad.datadoghq.com/beekeeper-path-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": \"beekeeper\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/beekeeper-path-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_path_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-scheduler-apiary.tf b/k8s-scheduler-apiary.tf index 8e5f8bf..5af2738 100644 --- a/k8s-scheduler-apiary.tf +++ b/k8s-scheduler-apiary.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_scheduler_apiary" { annotations = { "ad.datadoghq.com/beekeeper-scheduler-apiary.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/beekeeper-scheduler-apiary.init_configs": "[{}]" - "ad.datadoghq.com/beekeeper-scheduler-apiary.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"beekeeper\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/beekeeper-scheduler-apiary.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_scheduler_apiary_port "prometheus.io/path" : "/actuator/prometheus" From 7dbc38abc675693fd3bf16c5067b006200407500 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 13:56:51 +0100 Subject: [PATCH 5/8] feat: Added datadog annotations for sending metrics to DD --- k8s-metadata-cleanup.tf | 6 +++--- k8s-path-cleanup.tf | 6 +++--- k8s-scheduler-apiary.tf | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/k8s-metadata-cleanup.tf b/k8s-metadata-cleanup.tf index 571a435..0c3bb9d 100644 --- a/k8s-metadata-cleanup.tf +++ b/k8s-metadata-cleanup.tf @@ -38,9 +38,9 @@ resource "kubernetes_deployment_v1" "beekeeper_metadata_cleanup" { metadata { labels = local.metadata_cleanup_label_name_instance annotations = { - "ad.datadoghq.com/beekeeper-metadata-cleanup.check_names": "[\"openmetrics\"]" - "ad.datadoghq.com/beekeeper-metadata-cleanup.init_configs": "[{}]" - "ad.datadoghq.com/beekeeper-metadata-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" + "ad.datadoghq.com/${local.metadata_cleanup_full_name}.check_names": "[\"openmetrics\"]" + "ad.datadoghq.com/${local.metadata_cleanup_full_name}.init_configs": "[{}]" + "ad.datadoghq.com/${local.metadata_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_metadata_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-path-cleanup.tf b/k8s-path-cleanup.tf index aed5fff..05245d5 100644 --- a/k8s-path-cleanup.tf +++ b/k8s-path-cleanup.tf @@ -38,9 +38,9 @@ resource "kubernetes_deployment_v1" "beekeeper_path_cleanup" { metadata { labels = local.path_cleanup_label_name_instance annotations = { - "ad.datadoghq.com/beekeeper-path-cleanup.check_names": "[\"openmetrics\"]" - "ad.datadoghq.com/beekeeper-path-cleanup.init_configs": "[{}]" - "ad.datadoghq.com/beekeeper-path-cleanup.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/${local.path_cleanup_full_name}.check_names": "[\"openmetrics\"]" + "ad.datadoghq.com/${local.path_cleanup_full_name}.init_configs": "[{}]" + "ad.datadoghq.com/${local.path_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_path_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-scheduler-apiary.tf b/k8s-scheduler-apiary.tf index 5af2738..9731245 100644 --- a/k8s-scheduler-apiary.tf +++ b/k8s-scheduler-apiary.tf @@ -38,9 +38,9 @@ resource "kubernetes_deployment_v1" "beekeeper_scheduler_apiary" { metadata { labels = local.scheduler_apiary_label_name_instance annotations = { - "ad.datadoghq.com/beekeeper-scheduler-apiary.check_names": "[\"openmetrics\"]" - "ad.datadoghq.com/beekeeper-scheduler-apiary.init_configs": "[{}]" - "ad.datadoghq.com/beekeeper-scheduler-apiary.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/${local.scheduler_apiary_full_name}.check_names": "[\"openmetrics\"]" + "ad.datadoghq.com/${local.scheduler_apiary_full_name}.init_configs": "[{}]" + "ad.datadoghq.com/${local.scheduler_apiary_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_scheduler_apiary_port "prometheus.io/path" : "/actuator/prometheus" From 642ca1cdfe5762d123f24ad7e4b8931fc0c9b800 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 14:03:27 +0100 Subject: [PATCH 6/8] feat: Added datadog annotations for sending metrics to DD --- k8s-metadata-cleanup.tf | 2 +- k8s-path-cleanup.tf | 2 +- k8s-scheduler-apiary.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s-metadata-cleanup.tf b/k8s-metadata-cleanup.tf index 0c3bb9d..b00e98f 100644 --- a/k8s-metadata-cleanup.tf +++ b/k8s-metadata-cleanup.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_metadata_cleanup" { annotations = { "ad.datadoghq.com/${local.metadata_cleanup_full_name}.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/${local.metadata_cleanup_full_name}.init_configs": "[{}]" - "ad.datadoghq.com/${local.metadata_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" + "ad.datadoghq.com/${local.metadata_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_metadata_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-path-cleanup.tf b/k8s-path-cleanup.tf index 05245d5..d88bfa7 100644 --- a/k8s-path-cleanup.tf +++ b/k8s-path-cleanup.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_path_cleanup" { annotations = { "ad.datadoghq.com/${local.path_cleanup_full_name}.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/${local.path_cleanup_full_name}.init_configs": "[{}]" - "ad.datadoghq.com/${local.path_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/${local.path_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_path_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-scheduler-apiary.tf b/k8s-scheduler-apiary.tf index 9731245..a36b7cd 100644 --- a/k8s-scheduler-apiary.tf +++ b/k8s-scheduler-apiary.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_scheduler_apiary" { annotations = { "ad.datadoghq.com/${local.scheduler_apiary_full_name}.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/${local.scheduler_apiary_full_name}.init_configs": "[{}]" - "ad.datadoghq.com/${local.scheduler_apiary_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": ${local.instance_alias}, \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/${local.scheduler_apiary_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_scheduler_apiary_port "prometheus.io/path" : "/actuator/prometheus" From 47d307ff2520505fae532956529747c86bd77139 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 14:34:00 +0100 Subject: [PATCH 7/8] feat: Added datadog annotations for sending metrics to DD --- k8s-metadata-cleanup.tf | 2 +- variables.tf | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/k8s-metadata-cleanup.tf b/k8s-metadata-cleanup.tf index b00e98f..b54c378 100644 --- a/k8s-metadata-cleanup.tf +++ b/k8s-metadata-cleanup.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_metadata_cleanup" { annotations = { "ad.datadoghq.com/${local.metadata_cleanup_full_name}.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/${local.metadata_cleanup_full_name}.init_configs": "[{}]" - "ad.datadoghq.com/${local.metadata_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [\"s3_bytes_deleted_bytes_total*\", \"hive_table_metadata_deleted_total*\",\"hive_partition_metadata_deleted_total*\",\"s3_paths_deleted_seconds_sum*\", \"s3_paths_deleted_seconds_count*\", \"metadata_cleanup_job_seconds_sum*\", \"hive_table_deleted_seconds_count*\", \"disk_*\", \"jvm*\", \"hikaricp*\"] }]" + "ad.datadoghq.com/${local.metadata_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.beekeeper_metrics)}\" ]}]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_metadata_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/variables.tf b/variables.tf index 65996e9..f837ac3 100644 --- a/variables.tf +++ b/variables.tf @@ -570,3 +570,20 @@ variable "db_copy_tags_to_snapshot" { type = bool default = true } + +variable "beekeeper_metrics" { + description = "WaggleDance metrics to be sent to Datadog." + type = list(string) + default = [ + "s3_bytes_deleted_bytes_total*", + "hive_table_metadata_deleted_total*", + "hive_partition_metadata_deleted_total*", + "s3_paths_deleted_seconds_sum*", + "s3_paths_deleted_seconds_count*", + "metadata_cleanup_job_seconds_sum*", + "hive_table_deleted_seconds_count*", + "disk_*", + "jvm*", + "hikaricp*" + ] +} From 91c2e7aa419ccdfdb85ccfcad952cde20d297c74 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Fri, 30 Aug 2024 14:40:30 +0100 Subject: [PATCH 8/8] feat: Added datadog annotations for sending metrics to DD --- k8s-metadata-cleanup.tf | 2 +- k8s-path-cleanup.tf | 2 +- k8s-scheduler-apiary.tf | 2 +- variables.tf | 20 ++++++++++++++++++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/k8s-metadata-cleanup.tf b/k8s-metadata-cleanup.tf index b54c378..b5ad344 100644 --- a/k8s-metadata-cleanup.tf +++ b/k8s-metadata-cleanup.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_metadata_cleanup" { annotations = { "ad.datadoghq.com/${local.metadata_cleanup_full_name}.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/${local.metadata_cleanup_full_name}.init_configs": "[{}]" - "ad.datadoghq.com/${local.metadata_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.beekeeper_metrics)}\" ]}]" + "ad.datadoghq.com/${local.metadata_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:9008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.beekeeper_metadata_cleanup_metrics)}\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_metadata_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-path-cleanup.tf b/k8s-path-cleanup.tf index d88bfa7..f86acc0 100644 --- a/k8s-path-cleanup.tf +++ b/k8s-path-cleanup.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_path_cleanup" { annotations = { "ad.datadoghq.com/${local.path_cleanup_full_name}.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/${local.path_cleanup_full_name}.init_configs": "[{}]" - "ad.datadoghq.com/${local.path_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/${local.path_cleanup_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8008/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.beekeeper_path_cleanup_metrics)}\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_path_cleanup_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/k8s-scheduler-apiary.tf b/k8s-scheduler-apiary.tf index a36b7cd..2845ecd 100644 --- a/k8s-scheduler-apiary.tf +++ b/k8s-scheduler-apiary.tf @@ -40,7 +40,7 @@ resource "kubernetes_deployment_v1" "beekeeper_scheduler_apiary" { annotations = { "ad.datadoghq.com/${local.scheduler_apiary_full_name}.check_names": "[\"openmetrics\"]" "ad.datadoghq.com/${local.scheduler_apiary_full_name}.init_configs": "[{}]" - "ad.datadoghq.com/${local.scheduler_apiary_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [\"path_cleanup_job_seconds_sum*\"] }]" + "ad.datadoghq.com/${local.scheduler_apiary_full_name}.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.beekeeper_scheduler_apiary_metrics)}\"] }]" "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : var.k8s_scheduler_apiary_port "prometheus.io/path" : "/actuator/prometheus" diff --git a/variables.tf b/variables.tf index f837ac3..21dcae1 100644 --- a/variables.tf +++ b/variables.tf @@ -571,8 +571,8 @@ variable "db_copy_tags_to_snapshot" { default = true } -variable "beekeeper_metrics" { - description = "WaggleDance metrics to be sent to Datadog." +variable "beekeeper_metadata_cleanup_metrics" { + description = "Beekeeper metrics to be sent to Datadog." type = list(string) default = [ "s3_bytes_deleted_bytes_total*", @@ -587,3 +587,19 @@ variable "beekeeper_metrics" { "hikaricp*" ] } + +variable "beekeeper_scheduler_apiary_metrics" { + description = "Beekeeper metrics to be sent to Datadog." + type = list(string) + default = [ + "path_cleanup_job_seconds_sum*" + ] +} + +variable "beekeeper_path_cleanup_metrics" { + description = "Beekeeper metrics to be sent to Datadog." + type = list(string) + default = [ + "path_cleanup_job_seconds_sum*" + ] +}