Skip to content

Commit f56f2d8

Browse files
authored
feat: add configuration options to enable/disable app checks and JMX features using new input enable_app_checks and enable_jmx (both true by default). (#265)
1 parent c210a24 commit f56f2d8

File tree

6 files changed

+37
-0
lines changed

6 files changed

+37
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ No modules.
133133
| <a name="input_cluster_shield_requests_memory"></a> [cluster\_shield\_requests\_memory](#input\_cluster\_shield\_requests\_memory) | Specify memory resource requests for the cluster shield pods. | `string` | `"512Mi"` | no |
134134
| <a name="input_container_filter"></a> [container\_filter](#input\_container\_filter) | Customize the agent to exclude containers from metrics collection. For more info, see https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_filter_data | <pre>list(object({<br/> type = string<br/> parameter = string<br/> name = string<br/> }))</pre> | `[]` | no |
135135
| <a name="input_deployment_tag"></a> [deployment\_tag](#input\_deployment\_tag) | Sets a global tag that will be included in the components. It represents the mechanism from where the components have been installed (terraform, local...). | `string` | `"terraform"` | no |
136+
| <a name="input_enable_app_checks"></a> [enable\_app\_checks](#input\_enable\_app\_checks) | Enable application checks to collect metrics from specific applications like MongoDB, Redis, etc. Set to false to reduce error logs in environments where these applications are not present or monitored. | `bool` | `true` | no |
136137
| <a name="input_enable_host_scanner"></a> [enable\_host\_scanner](#input\_enable\_host\_scanner) | Enable host scanning to detect vulnerabilities and identify the resolution priority based on available fixed versions and severity. Requires a Security and Compliance Center Workload Protection instance to view results. | `bool` | `true` | no |
138+
| <a name="input_enable_jmx"></a> [enable\_jmx](#input\_enable\_jmx) | Enable JMX metrics collection from Java Virtual Machines. Set to false to reduce resource usage and error logs in environments without Java applications. | `bool` | `true` | no |
137139
| <a name="input_enable_kspm_analyzer"></a> [enable\_kspm\_analyzer](#input\_enable\_kspm\_analyzer) | Enable Kubernetes Security Posture Management (KSPM) analyzer. Requires a Security and Compliance Center Workload Protection instance to view results. | `bool` | `true` | no |
138140
| <a name="input_enable_universal_ebpf"></a> [enable\_universal\_ebpf](#input\_enable\_universal\_ebpf) | Deploy monitoring agent with universal extended Berkeley Packet Filter (eBPF) enabled. It requires kernel version 5.8+. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/blob/main/solutions/fully-configurable/DA-docs.md#when-to-enable-enable_universal_ebpf) | `bool` | `true` | no |
139141
| <a name="input_existing_access_key_secret_name"></a> [existing\_access\_key\_secret\_name](#input\_existing\_access\_key\_secret\_name) | An alternative to using `access_key`. Specify the name of an existing Kubernetes secret containing the access key in the same namespace that is defined in the `namespace` input. Either `access_key` or `existing_access_key_secret_name` is required. | `string` | `null` | no |

ibm_catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@
348348
"key": "enable_kspm_analyzer",
349349
"required": true
350350
},
351+
{
352+
"key": "enable_app_checks"
353+
},
354+
{
355+
"key": "enable_jmx"
356+
},
351357
{
352358
"key": "use_private_endpoint"
353359
},

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ resource "helm_release" "cloud_monitoring_agent" {
210210
"enabled": ${var.enable_host_scanner}
211211
"kspm_analyzer":
212212
"enabled": ${var.enable_kspm_analyzer}
213+
"app_checks_enabled": ${var.enable_app_checks}
214+
"jmx":
215+
"enabled": ${var.enable_jmx}
213216
"sysdig_api_endpoint": ${local.api_host}
214217
"blacklisted_ports":
215218
%{for port in var.blacklisted_ports~}

solutions/fully-configurable/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ module "monitoring_agent" {
6565
deployment_tag = var.deployment_tag
6666
enable_host_scanner = var.enable_host_scanner
6767
enable_kspm_analyzer = var.enable_kspm_analyzer
68+
enable_app_checks = var.enable_app_checks
69+
enable_jmx = var.enable_jmx
6870
cluster_shield_deploy = var.cluster_shield_deploy
6971
cluster_shield_image_tag_digest = var.cluster_shield_image_tag_digest
7072
cluster_shield_image_repository = var.cluster_shield_image_repository

solutions/fully-configurable/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,18 @@ variable "enable_kspm_analyzer" {
352352
default = true
353353
}
354354

355+
variable "enable_app_checks" {
356+
type = bool
357+
description = "Enable application checks to collect metrics from specific applications like MongoDB, Redis, etc. Set to false to reduce error logs in environments where these applications are not present or monitored."
358+
default = true
359+
}
360+
361+
variable "enable_jmx" {
362+
type = bool
363+
description = "Enable JMX metrics collection from Java Virtual Machines. Set to false to reduce resource usage and error logs in environments without Java applications."
364+
default = true
365+
}
366+
355367
variable "cluster_shield_deploy" {
356368
type = bool
357369
description = "Deploy the Cluster Shield component to provide runtime detection and policy enforcement for Kubernetes workloads. If enabled, a Kubernetes Deployment will be deployed to your cluster using helm."

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,18 @@ variable "enable_kspm_analyzer" {
357357
default = true
358358
}
359359

360+
variable "enable_app_checks" {
361+
type = bool
362+
description = "Enable application checks to collect metrics from specific applications like MongoDB, Redis, etc. Set to false to reduce error logs in environments where these applications are not present or monitored."
363+
default = true
364+
}
365+
366+
variable "enable_jmx" {
367+
type = bool
368+
description = "Enable JMX metrics collection from Java Virtual Machines. Set to false to reduce resource usage and error logs in environments without Java applications."
369+
default = true
370+
}
371+
360372
variable "cluster_shield_deploy" {
361373
type = bool
362374
description = "Deploy the Cluster Shield component to provide runtime detection and policy enforcement for Kubernetes workloads. If enabled, a Kubernetes Deployment will be deployed to your cluster using helm."

0 commit comments

Comments
 (0)