Search documentation
Dashboard
Getting Started

Installing Gremlin on a virtual machine

General steps for deploying the Gremlin Agent to a virtual machine:

Gather your credentials

All Gremlin integration installations require authentication with the Gremlin Control Plane. We recommend using the Client Configuration File method, as it contains everything needed to authenticate and configure the Gremlin Agent in one file. To create and download a client configuration file:

  • Access the Team Settings page in the Gremlin web app.
  • Click the Configuration tab.
  • On the Client Configuration File line, click Download to download the file. You'll receive a file named config.yaml.
  • Optionally, make any additional configurations to the config.yaml file.

If you wish to use another method of authenticating, see the Authentication docs.

Install Gremlin packages

Choose the format that corresponds to your distribution:

DEB packages

For DEB-based Linux distributions such as Ubuntu, Debian, and so on.

bash
1# Add packages needed to install and verify gremlin (already on many systems)
2sudo apt update && sudo apt install -y apt-transport-https dirmngr
3
4# Add the Gremlin repo
5echo "deb https://deb.gremlin.com/ release non-free" | sudo tee /etc/apt/sources.list.d/gremlin.list
6
7# Import the GPG key
8sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9CDB294B29A5B1E2E00C24C022E8EF3461A50EF6
9
10# Install Gremlin
11sudo apt update && sudo apt install -y gremlin gremlind

RPM packages

SUSE-based distributions

For distributions based on SUSE Linux, such as SUSE Linux Enterprise Server (SLES), openSUSE, etc.:

bash
1# Install dependencies
2sudo zypper install -y iproute-tc libcap-progs
3
4# Add the Gremlin repo
5sudo zypper addrepo https://rpm.gremlin.com/gremlin.repo gremlin
6
7# Install Gremlin and dependencies
8sudo zypper refresh && sudo zypper install gremlin gremlind
Non SUSE-based distributions

For non SUSE-based RPM distributions such as Amazon Linux, RHEL, CentOS, etc.:

bash
1# Install dependencies
2sudo yum install -y iproute-tc
3
4# Add the Gremlin repo
5sudo curl https://rpm.gremlin.com/gremlin.repo -o /etc/yum.repos.d/gremlin.repo
6
7# Install Gremlin
8sudo yum install -y gremlin gremlind

Docker image

Alternatively, instead of installing Gremlin directly on the host operating system, you can deploy Gremlin from the Docker image on DockerHub.

To run the daemon, use the following command. Replace $GREMLIN_TEAM_ID with your team ID and $GREMLIN_TEAM_SECRET with your team's secret key:

bash
1docker run -d --net=host \
2 --cap-add=NET_ADMIN --cap-add=SYS_BOOT --cap-add=SYS_TIME \
3 --cap-add=KILL \
4 --pid=host \
5 -v $PWD/var/lib/gremlin:/var/lib/gremlin \
6 -v $PWD/var/log/gremlin:/var/log/gremlin \
7 -v /var/run/docker.sock:/var/run/docker.sock \
8 -e GREMLIN_TEAM_ID="$GREMLIN_TEAM_ID" \
9 -e GREMLIN_TEAM_SECRET="$GREMLIN_TEAM_SECRET" \
10 gremlin/gremlin daemon

If you want to run tests on other Docker containers, you'll need to add the gremlin user to the docker group after installing both Gremlin and Docker:

bash
1sudo adduser gremlin docker

Configure Gremlin

The minimum configuration required to authenticate the Gremlin Agent is:

  • Team ID
  • Secret or certificate

If you downloaded a client configuration file, you already have everything needed to register the Agent. Just follow these instructions:

  • Copy the configuration file (named config.yaml) to the /etc/gremlin/ directory. The final path should be /etc/gremlin/config.yaml:

    bash
    1sudo cp config.yaml /etc/gremlin/config.yaml
  • Restart the gremlind service:

    bash
    1sudo systemctl restart gremlind

Additional configuration options

Read this section if you wish to further configure the Gremlin Agent. Otherwise, skip to the next section.

For Reliability Management, Gremlin uses tags such as operating system, zone, and local-hostname to identify each service's fingerprint. Gremlin automatically detects many tags, but if you wish to apply custom tags (e.g. environment, location, or service name), read the Network tags documentation.

For more information and additional configuration options, see Configuring Gremlin for more information.

Make any edits to the /etc/gremlin/config.yaml file, then restart the gremlind service after you've made your changes.

Customize Gremlin's Linux user and group

By default on Linux, Gremlin installs a gremlin Linux user and group, and sets the suid bit on /usr/bin/gremlin so that all users can run the Gremlin executable. These defaults can be overridden at installation time by supplying environment variables to the installer.

For example, to run Gremlin as root and restrict executable access to root:root, you would run:

shell
1GREMLIN_INSTALL_USER=root GREMLIN_INSTALL_GROUP=root GREMLIN_INSTALL_BIN_MODE=0770 \
2 sudo -E yum install gremlin gremlind

The full list of variables available at install time, and their defaults are as follows:

VariableDefaultDescription
GREMLIN_INSTALL_USERgremlinThe Linux user to own all file installed by Gremlin. This user is created if it does not exist
GREMLIN_INSTALL_GROUPgremlinThe Linux group to own all file installed by Gremlin. This group is created if it does not exist
GREMLIN_INSTALL_BIN_MODE07501The file mode for executable files installed by Gremlin.
GREMLIN_INSTALL_BIN_CAPABILITIESunsetA boolean argument specifying whether Gremlin's required capabilities should be set on the binaries themselves. The default is false. Any value supplied to this variable evaluates to true.

1. Gremlin versions before 2.33.0 default this value to 6111 instead.

Validate the installation

There are two ways to ensure your installation was successful and your Agents authenticated successfully:

Check the Gremlin web app

The easiest way to verify connectivity is to open the Agents list in the Gremlin web app. Check for your newly installed Agent by name or by tag. You can also use the search box to search by name or tag, Agent version, operating system (OS), or region. If your Agent does not appear in this list, it may not have been installed or configured correctly, or it might not be able to reach Gremlin's servers.

Check the Gremlin Agent

First, verify that the Gremlin Agent is running on the target system:

shell
1sudo systemctl status gremlind

This should return the following:

1● gremlind.service - Gremlin Daemon
2 Loaded: loaded (/etc/systemd/system/gremlind.service; enabled; vendor preset: enabled)
3 Active: active (running) since Wed 2023-01-04 10:44:12 EST; 5 days ago

If the service is instead reporting as inactive or failed, try restarting the service using:

shell
1sudo systemctl restart gremlind

After verifying that the Gremlin Agent is running, use gremlin check auth to check the Gremlin Agent's authentication status:

shell
1gremlin check auth

If the Gremlin Agent authenticated successfully, the output will be similar to the following:

1auth
2====================================================
3Auth Input Type : Certificate
4API Response : OK

If not, the output will explain why the Gremlin Agent was unable to authenticate:

1auth
2====================================================
3Auth Input Type : No valid auth found
4========= Identification ============:
5Team ID Source : Team ID not found
6Gremlin Identifier : [Host identifier]
7Gremlin Identifier Source : Not supplied explicitly, using the default
8========= Secret/Token Info =========:
9Team Secret Source : Team Secret not found
10.credentials valid : /var/lib/gremlin/.credentials file not found
11========= Certificate Info ==========:
12Team Certificate Source : Team Certificate not found
13========= Private Key Info ==========:
14Team Private Key Source : Team Private Key not found

Troubleshooting

If the Agent is connected but is reporting as unhealthy, see Troublehsooting Unhealthy State in the Gremlin Knowledge Base. If you're having trouble authenticating, see the Authentication FAQ in the Gremlin Knowledge Base for possible causes and solutions.

Uninstalling Gremlin from a virtual machine

The command for uninstalling the Gremlin agent from a Linux virtual machine will vary depending on your distribution.

DEB packages

For DEB-based Linux distributions such as Ubuntu and Debian:

bash
1sudo apt remove gremlin gremlind

RPM packages

SUSE-based distributions

For distributions based on SUSE Linux, such as SUSE Linux Enterprise Server (SLES), openSUSE, etc.:

bash
1sudo zypper remove gremlin gremlind
Non SUSE-based distributions

For non SUSE-based RPM distributions such as Amazon Linux, RHEL, CentOS, etc.:

bash
1sudo yum remove gremlin gremlind

Docker image

If you deployed Gremlin using Docker, use the following command to uninstall it. Note that the container name may be different than gremlin, depending on whether you specified a name:

bash
1sudo docker stop gremlin
2sudo docker rm gremlin