Skip to content

Commit e5f5be2

Browse files
authored
feat: added prometheus config support in DA using new input prometheus_config (#228)
1 parent d256eae commit e5f5be2

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

ibm_catalog.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,14 @@
407407
{
408408
"key": "agent_limits_memory"
409409
},
410+
{
411+
"key": "prometheus_config",
412+
"custom_config": {
413+
"type": "code_editor",
414+
"grouping": "deployment",
415+
"original_grouping": "deployment"
416+
}
417+
},
410418
{
411419
"key": "max_surge",
412420
"value_constraints": [

solutions/fully-configurable/DA-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Use `metrics_filter` to optimize your monitoring setup by collecting only the me
5050

5151
## `prometheus_config`
5252

53-
The `prometheus_config` variable allows you to enable sysdig agent to scrape metrics from processes that expose Prometheus metric endpoints on its own host and send findings to the Sysdig collector for storing and further processing.
53+
The `prometheus_config` variable allows you to enable monitoring agent to scrape metrics from processes that expose Prometheus metric endpoints on its own host and send findings to the Sysdig collector for storing and further processing.
5454

5555
### Type
5656

solutions/fully-configurable/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module "monitoring_agent" {
7272
cluster_shield_limits_cpu = var.cluster_shield_limits_cpu
7373
cluster_shield_requests_memory = var.cluster_shield_requests_memory
7474
cluster_shield_limits_memory = var.cluster_shield_limits_memory
75+
prometheus_config = var.prometheus_config
7576
max_unavailable = var.max_unavailable
7677
max_surge = var.max_surge
7778
priority_class_name = var.priority_class_name

solutions/fully-configurable/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,13 @@ variable "cluster_shield_limits_memory" {
388388
default = "1536Mi"
389389
}
390390

391+
variable "prometheus_config" {
392+
description = "Prometheus configuration for the agent. If you want to enable Prometheus configuration provide the prometheus.yaml file content in `hcl` format. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/blob/main/solutions/fully-configurable/DA-types.md#prometheus_config)."
393+
type = map(any)
394+
default = {}
395+
nullable = false
396+
}
397+
391398
variable "provider_visibility" {
392399
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
393400
type = string

0 commit comments

Comments
 (0)