|
| 1 | +[[security-environment-variable-capture]] |
| 2 | += Capture environment variables |
| 3 | + |
| 4 | +// :description: Capture environment variables from monitored Linux sessions. |
| 5 | +// :keywords: serverless, security, overview, cloud security |
| 6 | + |
| 7 | + |
| 8 | +You can configure an {agent} policy to capture up to five environment variables (`env vars`). |
| 9 | + |
| 10 | +[NOTE] |
| 11 | +==== |
| 12 | +* Env var names must be no more than 63 characters, and env var values must be no more than 1023 characters. Values outside these limits are silently ignored. |
| 13 | +* Env var names are case sensitive. |
| 14 | +==== |
| 15 | + |
| 16 | +To set up environment variable capture for an {agent} policy: |
| 17 | + |
| 18 | +. Find **Policies** in the navigation menu or use the global search field. |
| 19 | +. Select an {agent} policy. |
| 20 | +. Click **Show advanced settings**. |
| 21 | +. Scroll down or search for `linux.advanced.capture_env_vars`, or `mac.advanced.capture_env_vars`. |
| 22 | +. Enter the names of env vars you want to capture, separated by commas. For example: `PATH,USER` |
| 23 | +. Click **Save**. |
| 24 | + |
| 25 | +[discrete] |
| 26 | +[[find-cap-env-vars]] |
| 27 | +== Find captured environment variables |
| 28 | + |
| 29 | +Captured environment variables are associated with process events, and appear in each event's `process.env_vars` field. |
| 30 | + |
| 31 | +To view environment variables in the **Events** table: |
| 32 | + |
| 33 | +. Click the **Events** tab on the **Hosts**, **Network**, or **Users** pages, then click **Fields** in the Events table. |
| 34 | +. Search for the `process.env_vars` field, select it, and click **Close**. |
| 35 | +A new column appears containing captured environment variable data. |
| 36 | + |
| 37 | +[role="screenshot"] |
| 38 | +image::images/environment-variable-capture/-cloud-native-security-env-var-capture-detail.png[The Events table with the "process.env_vars" column highlighted] |
0 commit comments