Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TRA-241] Add exclude_metrics to validator and metrics ingestor #100

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/metric_ingestor/datadog.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module "datadog_agent" {
"openmetrics_endpoint" : validator.openmetrics_endpoint,
"namespace" : var.metrics_namespace,
"metrics" : var.metrics,
"exclude_metrics" : var.exclude_metrics,
"tags" : ["validator_name:${validator.name}", "is_full_node:false"],
"max_returned_metrics" : var.max_returned_metrics
}
Expand Down
11 changes: 11 additions & 0 deletions modules/metric_ingestor/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ variable "metrics" {
]
}

variable "exclude_metrics" {
type = list(string)
description = <<-EOT
A list of metrics to exclude, with each entry being either
the exact metric name or a regular expression.
See https://docs.datadoghq.com/developers/custom_checks/prometheus/#going-further
or https://github.com/DataDog/integrations-core/blob/master/openmetrics/datadog_checks/openmetrics/data/conf.yaml.example#L112
EOT
default = []
}

variable "max_returned_metrics" {
type = number
description = "the number of metrics we allow `com.datadoghq.ad.instances` to return."
Expand Down
1 change: 1 addition & 0 deletions modules/validator/datadog.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module "datadog_agent" {
"openmetrics_endpoint" : "http://%%host%%:${var.prometheus_port}/metrics?format=prometheus",
"namespace" : var.metrics_namespace,
"metrics" : var.metrics,
"exclude_metrics" : var.exclude_metrics,
"tags" : ["validator_name:dydx", "is_full_node:${var.container_non_validating_full_node}"],
"max_returned_metrics" : var.max_returned_metrics
}
Expand Down
11 changes: 11 additions & 0 deletions modules/validator/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ variable "metrics" {
]
}

variable "exclude_metrics" {
type = list(string)
description = <<-EOT
A list of metrics to exclude, with each entry being either
the exact metric name or a regular expression.
See https://docs.datadoghq.com/developers/custom_checks/prometheus/#going-further
or https://github.com/DataDog/integrations-core/blob/master/openmetrics/datadog_checks/openmetrics/data/conf.yaml.example#L112
EOT
default = []
}

variable "max_returned_metrics" {
type = number
description = "the number of metrics we allow `com.datadoghq.ad.instances` to return."
Expand Down
Loading