Skip to content

Commit

Permalink
feat: Added datadog annotations for sending metrics to DD
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhrubajyoti Sadhu committed Aug 30, 2024
1 parent 642ca1c commit 47d307f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion k8s-metadata-cleanup.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 17 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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*"
]
}

0 comments on commit 47d307f

Please sign in to comment.