Config File Syntax
uberAgent’s configuration file supports several advanced syntax features.
Windows
PATH_REGEX
PATH_REGEX
stands for a regex in which environment variables can be used. It is matched against a file system path. The following rules apply:
- Environment variables (enclosed in percent signs, e.g.,
%ProgramFiles%
) are expanded first, regex matching happens second. - Paths are specified as regular expressions.
- Backslashes must be escaped by prepending a second backslash.
- Matching is case-insensitive.
- Specifying only the file name without the full path works but is not recommended.
Agents on All Operating Systems
ConfigInclude
A @ConfigInclude
directive includes another configuration file. The other file is identified by name (without path) and must reside in the same directory as the configuration file including it. The additional platform
parameter may be used to conditionally include a file on the selected platform (Windows
or macOS
). Platform matching is case-insensitive.
Examples:
#Include on all platforms
@ConfigInclude other-file.conf
# Include on Windows only
@ConfigInclude windows-specific.conf platform=Windows
PROCESS_NAME_REGEX
PROCESS_NAME_REGEX
stands for a regex that is matched against a process name. The following rules apply:
- Backslashes must be escaped by prepending a second backslash.
- Matching is case-insensitive.
- Only the file name is used for matching, not the full path.
URL_REGEX
URL_REGEX
stands for a regex that is matched against a URL. The following rules apply:
- Backslashes must be escaped by prepending a second backslash.
- Matching is case-sensitive.
Format of the URLs matched against URL_REGEX
:
- Origin and path (without query segment), e.g.:
https://uberagent.com/download/
- Port numbers are stripped from the URL if they match the default port number.
platform=
All configuration stanzas can optionally be limited to a specific platform using the platform=
attribute.
- The platform is either Windows or macOS
- Stanzas without
platform=
are active on all supported platforms.
Example
[Timer platform=Windows]
...
[Timer platform=macOS]
...
Change configured setting values dynamically with uAQL
Some configuration settings are changeable using prefixed uAQL queries. This allows use cases where configuration values depend on environment variables, registry values or require string prefixes/suffixes. For now, the following configuration settings are changeable:
[Receiver]
- RESTToken
- TLSClientCertificate
- ElasticIngestPipeline
- Index
- Host
- Source
- PersistentOutputQueuePathWindows
- PersistentOutputQueuePathMacOS
- KafkaTopicName
Consider the following example to configure a prefix string in any KafkaTopicName setting.
KafkaTopicName = uaql(set(KafkaTopicName, concat('vastlimits_', KafkaTopicName)))