Edge Delta Environment Variables
3 minute read
Overview
Environment variables are dynamic values that can affect the behavior of running processes. They are used by the operating system and applications running on it to pass configuration options and other important parameters. These values are set during agent installation and can be used to control and influence various aspects of the agent’s behavior.
Frequently Used Environment Variables
The following environment variable parameters can be passed when you install and deploy the Edge Delta Fleet.
ED_API_KEY
Identifies and authorizes access to your Fleet’s Pipeline configuration in the Edge Delta back end.
ED_ARCHIVE_FLUSH_INTERVAL
Specifies the duration after which logs are flushed and sent to the configured archiving destination. The default value is 30m.
ED_CUSTOM_TAGS
Attaches attributes statically. Format should be in form: <key 1>:<value 1>|<key 2>:<value 2>|...
ED_HOST_OVERRIDE
By default, the agent fetches the host name using the operating system’s built-in methods:
- macOS: The agent calls
os.HostName()
, which retrieves the host name fromkern.hostname
. - Linux: The agent calls
os.HostName()
, which retrieves the host name from/proc/sys/kernel/hostname
. - Windows: The agent calls
ComputerNameEx
system call, which retrieves the hostname from the kernel.
You can configure a custom name with the ED_HOST_OVERRIDE
variable. This is useful to help identify agents.
export ED_HOST_OVERRIDE="custom-hostname"
Alternatively you can change the host name:
- macOS:
sudo scutil --set HostName "new-hostname"
- linux:
sudo hostname new-hostname
Note: This command changes the hostname temporarily. To make it permanent, additional steps, such as editing the
/etc/hostname
and/etc/hosts
files, may be required, depending on the Linux distribution.
- windows (PowerShell):
Rename-Computer -NewName "new-hostname"; Restart-Computer
ED_INSTALL_PATH
Specifies a custom location to install the agent in a Unix based system (Linux or macOS)
ED_LOGGING_DIR
Overrides the default logging directory of the agent. The default is /var/log/edgedelta/*
. This is useful if the default location on disk can only be accessed by root users.
ED_TAG_OVERRIDE
Specifies a tag that is different to the one configured in the Web App. Use this option to deploy two fleets with the same Pipeline configuration.
HTTP_PROXY
Uses proxy details to route the Fleet’s outbound traffic through an HTTP internal proxy.
HTTPS_PROXY
Uses proxy details to route the Fleet’s outbound traffic through an HTTPS internal proxy.
NO_PROXY
Disables the proxy for requests that hit a specific destination.
OTEL_SERVICE_NAME
Defines the resource.service.name
field in Edge Delta OTEL messages.
STORE_PORT
Uses a port number to expose agent metrics storage.
Scenarios
- API Key Management: Using variables like
ED_API_KEY
to manage authorization tokens for accessing services securely. - Custom Tagging and Identification: Using variables like
ED_CUSTOM_TAGS
for tagging resources andED_HOST_OVERRIDE
to specify custom host names, which can help during debugging and monitoring. - Proxy Configuration: Setting
HTTP_PROXY
andHTTPS_PROXY
to route traffic through proxies, crucial in environments with tight network security policies. - Log Management: Using variables such as
ED_ARCHIVE_FLUSH_INTERVAL
to manage how logs are processed and stored. - Service Setup: Configuring services via variables like
OTEL_SERVICE_NAME
andSTORE_PORT
to set up monitoring and service-specific parameters.
Setting Environment Variables
Linux/macOS
Only ED_ENV_VARS
, ED_INSTALL_PATH
and ED_API_KEY
are passed as installation variables when installing in Linux/macOS. To use other variables you need to use ED_ENV_VARS
and pass in a child variable:
export VARIABLE_NAME="value"
or
export ED_ENV_VARS="<VARIABLE>=value"
Example:
export ED_API_KEY="your-api-key"
or
Example 2:
export ED_ENV_VARS="ED_CUSTOM_TAGS=tag1:value1|tag2:value2|tag3:value3" ED_API_KEY=your-api-key
To update the variable for a running fleet you don’t need to reinstall but you do need to restart the agent. Using a custom installation path requires a re-install.
Windows (Command Prompt)
set VARIABLE_NAME="value"
Example:
set ED_API_KEY="your-api-key"
Windows (PowerShell)
$env:VARIABLE_NAME="value"
Example:
$env:ED_API_KEY="your-api-key"