Configuring the Gremlin Agent
This documentation page shows you how to configure the Gremlin Agent. You can configure Gremlin using either environment variables or a configuration file, although we recommend using the configuration file in most cases. This guide assumes you've already installed and authenticated the Agent.
Gremlin's configuration file is located in a file named
config.yaml. On Linux, this file lives at
/etc/gremlin/config.yaml, and on Windows, its path is
C:\ProgramData\Gremlin\Agent\config.yaml. By default, Gremlin ships with a commented-out version of this file. Use the comments or the following example to set up your configuration.
config.yamlrequire a restart of the
|a string that uniquely identifies a Gremlin installation (defaults to the hosts IP address)|
|the ID of your Gremlin team|
|key-value pairs that help you target this machine during experiments|
|the secret value (used by secret authentication only)|
|the public portion of the certificate-pair (required for signature auth only)|
|the private portion of the certificate-pair (required for signature auth only)|
|the url of a proxy in between Gremlin and api.gremlin.com|
|the ssl certificate for your https proxy|
|set to |
|enables/disables Process Collection (as of Linux Agent 2.25.0 default is |
1## Gremlin Identifier; uniquely identifies this machine with Gremlin2## (can also set with GREMLIN_IDENTIFIER environment variable)3identifier: gremlin-0145## Gremlin Team Id; you can find this value at https://app.gremlin.com/settings/teams6## (can also be set with GREMLIN_TEAM_ID environment variable)7team_id: 11111111-1111-1111-1111-11111111111189## Gremlin Client Tags; Tag your machine with key-value pairs that help you target this machine during experiments10## (can also set with GREMLIN_CLIENT_TAGS environment variable)11tags:12 service: pet-store13 interface: http1415## Gremlin Team Secret, should not be set when using `team_certificate`+`team_private_key`16## (can also set with GREMLIN_TEAM_SECRET environment variable)17#team_secret: 11111111-1111-1111-1111-1111111111111819## Gremlin Team Certificate, should not be set when using `team_secret`.20## Paste certificate content here or a paths to the file (prefixed with `file://`)21## (can also set with GREMLIN_TEAM_CERTIFICATE_OR_FILE environment variable)22team_certificate: |23 -----BEGIN CERTIFICATE-----24 111111111111111111111111111111111111111111111111111111111111111125 111111111111111111111111111111111111111111111111111111111111111126 111111111111111111111111111111111111111111111111111111111111111127 111111111111111111111111111111111111111111111111111111111111111128 111111111111111111111111111111111111111111111111111111111111111129 111111111111111111111111111111111111111111111111111111111111111130 111111111111111111111111111111111111111111111111111111111111111131 111111111111111111111111111111111111111111111111111111111111111132 111111111111111111111111111111111111111111111111111111111111111133 11111111111111111111111111111111111111111111111111==34 -----END CERTIFICATE-----3536## Gremlin Team Certificate, should not be set when using `team_secret`.37## Paste certificate content here or a paths to the file (prefixed with `file://`)38## (can also set with GREMLIN_TEAM_PRIVATE_KEY_OR_FILE environment variable)39team_private_key: file:///var/lib/gremlin/key.pem4041## HTTPS Proxy, set this when routing outbound Gremlin HTTPS traffic through a proxy42## (can also set with HTTPS_PROXY or https_proxy environment variables)43https_proxy: https://localhost:31284445## SSL CERT FILE, set this when using a https proxy with a self-signed certificate46## Paste certificate content here or a paths to the file (prefixed with `file://`)47## (can also set with SSL_CERT_FILE environment variable)48ssl_cert_file: file:///var/lib/gremlin/proxy_cert.pem4950## Push Metrics, tell Gremlin whether to send system metrics to the control plane for charting the impact of experiments in51## real time. Metrics are only collected during active experiments, and only metrics relevant to the experiment are collected.52## defaults to `true`53## (can also set with PUSH_METRICS environment variable)54push_metrics: true5556## Collect Process Data, data about running processes is sent to Gremlin for service discovery.57## defaults to `true` as of Gremlin Linux Agent 2.25.058collect_processes: true
To restart the Gremlin Agent and apply your new changes, run the following commands (depending on your environment):
1sudo systemctl restart gremlind
1Restart-Service -Name gremlind
The daemon supports the following environment variables:
|Your Team ID (required for authentication)|
|Your Team Secret (should only require secret or PEM certificates, not both)|
|Your PEM-encoded private key or path to a file containing the private key (required for authentication). Paths should be prefixed with |
|The PEM-encoded public-key certificate or path/filename to the file containing your PEM-encoded public-key certificate (required for authentication). Paths should be prefixed with |
|Custom name for this client (default as the host's IP address)|
|Comma-separated list of custom tags to assign to this client. For example: |
The following are optional environment variables that may be required in Docker containerized deployments:
|Indicates to run the Gremlin Daemon on the same Docker namespace as the host. By default, Gremlin does not launch with a namespace defined. To set this variable, change the value to |
|Indicates the location and version of the Gremlin Docker image to use. This variable can be used to indicate an internal repository. For example: |
|Indicates to run the Gremlin Daemon to use the host network. By default, Gremlin network experiments will not affect the host network for containerized environments.|
|Indicates to run the Gremlin Daemon to affect host processes. By default, Gremlin process killer will not affect host processes for containerized environments.|
In addition, the following standard Linux environment variables allow proxy configuration:
|In the form |
|Indicates location of the proxy certificates used to authenticate traffic with the proxy. For Example: |
If both the environment variables and the configuration file are used when configuring Gremlin, the environment variable values will take priority. For example if you have the
GREMLIN_IDENTIFIER environment variable set to
foo and in the
config.yaml file the
identifier field is set to
bar, Gremlin will end up using
foo as its identifier when registering with the API.
While configuring the daemon with config.yaml is recommended, process managers like
sysvinit can pass environment variables directly to the daemon process from
/etc/default/gremlind. Your installation comes with an example of this file at
1# Gremlin Identifier; uniquely identifies this machine with Gremlin2GREMLIN_IDENTIFIER=gremlin-0134# Gremlin Team ID; you can find this value at https://app.gremlin.com/settings/teams5GREMLIN_TEAM_ID=11111111-1111-1111-1111-11111111111167# `gremlin init` will run automatically when the gremlind service starts.8# Supply extra options to `gremlin init` via this variable9GREMLIN_INIT_OPTS="--tag service=pet-store --tag interface=http"1011# Gremlin Team Secret, should not be set when using `team_certificate`+`team_private_key`12GREMLIN_TEAM_SECRET=11111111-1111-1111-1111-111111111111
You can set any of the environment variables listed in the previous section in the configuration file.
The Gremlin Agent automatically detects tags from the host system, such as operating system, zone, and local hostname. Gremlin also detects additional tags from certain cloud providers, including Amazon Web Services and Azure. You can also create custom tags and assign them to your Gremlin Agent(s) during installation. See Network Tags for instructions on adding custom tags to Gremlin.
Zone tags are required for the Zone Reliability Test.
In order to run dependency tests using Gremlin Reliability Management (RM), the Gremlin agent must be configured to collect process data by enabling Process Collection. When Process Collection is enabled, the Gremlin Agent collects process information from hosts, containers, and Kubernetes objects, and uses it to detect dependencies.
To learn more about enabling or disabling process collection, see Process Collection.