diff --git a/README.md b/README.md
index f75fece..8c149ae 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,7 @@ No modules.
| [agent\_image\_tag\_digest](#input\_agent\_image\_tag\_digest) | The image tag or digest of agent image to use. If using digest, it must be in the format of `X.Y.Z@sha256:xxxxx`. | `string` | `"14.2.5@sha256:64b9d77bbd1bb22f97a74198144dcfea62bb5cee7629091252694e9040058035"` | no |
| [agent\_limits\_cpu](#input\_agent\_limits\_cpu) | Specify CPU resource limits for the agent. For more info, see https://cloud.ibm.com/docs/monitoring?topic=monitoring-resource_requirements | `string` | `"1"` | no |
| [agent\_limits\_memory](#input\_agent\_limits\_memory) | Specify memory resource limits for the agent. For more info, see https://cloud.ibm.com/docs/monitoring?topic=monitoring-resource_requirements | `string` | `"1024Mi"` | no |
+| [agent\_mode](#input\_agent\_mode) | The operational mode for the monitoring agent. [Learn more](https://docs.sysdig.com/en/docs/administration/configure-agent-modes/). | `string` | `null` | no |
| [agent\_requests\_cpu](#input\_agent\_requests\_cpu) | Specify CPU resource requests for the agent. For more info, see https://cloud.ibm.com/docs/monitoring?topic=monitoring-resource_requirements | `string` | `"1"` | no |
| [agent\_requests\_memory](#input\_agent\_requests\_memory) | Specify memory resource requests for the agent. For more info, see https://cloud.ibm.com/docs/monitoring?topic=monitoring-resource_requirements | `string` | `"1024Mi"` | no |
| [agent\_tags](#input\_agent\_tags) | Map of tags to associate to the agent. For example, {"environment": "production"}. NOTE: Use the `add_cluster_name` boolean variable to add the cluster name as a tag. | `map(string)` | `{}` | no |
diff --git a/examples/obs-agent-ocp/main.tf b/examples/obs-agent-ocp/main.tf
index 005c2ee..600be75 100644
--- a/examples/obs-agent-ocp/main.tf
+++ b/examples/obs-agent-ocp/main.tf
@@ -140,4 +140,6 @@ module "monitoring_agents" {
blacklisted_ports = [22, 2379, 3306]
# example of adding agent tag
agent_tags = { "environment" : "test", "custom" : "value" }
+ # example of setting agent mode to troubleshooting for additional metrics
+ agent_mode = "troubleshooting"
}
diff --git a/ibm_catalog.json b/ibm_catalog.json
index eed5f63..2a5db81 100644
--- a/ibm_catalog.json
+++ b/ibm_catalog.json
@@ -354,6 +354,31 @@
{
"key": "enable_jmx"
},
+ {
+ "key": "agent_mode",
+ "options": [
+ {
+ "displayname": "Default",
+ "value": "__NULL__",
+ "description": "Use the agent's default operational mode"
+ },
+ {
+ "displayname": "Monitor",
+ "value": "monitor",
+ "description": "Standard monitoring mode with full metrics collection"
+ },
+ {
+ "displayname": "Monitor Light",
+ "value": "monitor_light",
+ "description": "Reduced metrics collection for lower resource usage"
+ },
+ {
+ "displayname": "Troubleshooting",
+ "value": "troubleshooting",
+ "description": "Enhanced metrics including HTTP request data for debugging"
+ }
+ ]
+ },
{
"key": "use_private_endpoint"
},
diff --git a/main.tf b/main.tf
index acb475b..4cde19b 100644
--- a/main.tf
+++ b/main.tf
@@ -213,6 +213,10 @@ resource "helm_release" "cloud_monitoring_agent" {
"app_checks_enabled": ${var.enable_app_checks}
"jmx":
"enabled": ${var.enable_jmx}
+%{if var.agent_mode != null~}
+ "feature":
+ "mode": ${var.agent_mode}
+%{endif~}
"sysdig_api_endpoint": ${local.api_host}
"blacklisted_ports":
%{for port in var.blacklisted_ports~}
diff --git a/solutions/fully-configurable/main.tf b/solutions/fully-configurable/main.tf
index 317a2d1..872b9ac 100644
--- a/solutions/fully-configurable/main.tf
+++ b/solutions/fully-configurable/main.tf
@@ -67,6 +67,7 @@ module "monitoring_agent" {
enable_kspm_analyzer = var.enable_kspm_analyzer
enable_app_checks = var.enable_app_checks
enable_jmx = var.enable_jmx
+ agent_mode = var.agent_mode
cluster_shield_deploy = var.cluster_shield_deploy
cluster_shield_image_tag_digest = var.cluster_shield_image_tag_digest
cluster_shield_image_repository = var.cluster_shield_image_repository
diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf
index e3597a5..9339a67 100644
--- a/solutions/fully-configurable/variables.tf
+++ b/solutions/fully-configurable/variables.tf
@@ -364,6 +364,16 @@ variable "enable_jmx" {
default = true
}
+variable "agent_mode" {
+ type = string
+ description = "The operational mode for the monitoring agent. [Learn more](https://docs.sysdig.com/en/docs/administration/configure-agent-modes/)."
+ default = null
+ validation {
+ condition = var.agent_mode == null ? true : contains(["monitor", "monitor_light", "troubleshooting"], var.agent_mode)
+ error_message = "agent_mode must be one of 'monitor', 'monitor_light', 'troubleshooting', or null."
+ }
+}
+
variable "cluster_shield_deploy" {
type = bool
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."
diff --git a/variables.tf b/variables.tf
index cb9e43c..07e51ce 100644
--- a/variables.tf
+++ b/variables.tf
@@ -369,6 +369,16 @@ variable "enable_jmx" {
default = true
}
+variable "agent_mode" {
+ type = string
+ description = "The operational mode for the monitoring agent. [Learn more](https://docs.sysdig.com/en/docs/administration/configure-agent-modes/)."
+ default = null
+ validation {
+ condition = var.agent_mode == null ? true : contains(["monitor", "monitor_light", "troubleshooting"], var.agent_mode)
+ error_message = "agent_mode must be one of 'monitor', 'monitor_light', 'troubleshooting', or null."
+ }
+}
+
variable "cluster_shield_deploy" {
type = bool
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."