Linux
This guide walks you through installing the Infrastructure Agent (Infra Agent) on a Linux machine. These instructions can also be found on the Installation page in the Middleware application.
We offer two install scripts based on your operating system. Please note that not all Linux distributions are officially supported. A list of officially supported distributions can be found under Prerequisites.
Prerequisites
1 System Requirements
- CPU Architecture: Both arm and x86 architectures are supported
- Memory: At least 1GB of Memory. The agent itself uses ~200 MB.
2 Officially Supported Distributions
The officially supported distributions are as follows:
- DEB based: Ubuntu, Debian
- RPM based: Red Hat, Fedora, CentOS, SUSE, Rocky Linux, Oracle Linux, Amazon Linux
Any other DEB or RPM based distribution may work but has not been officially tested.
3 AWS Instances
For AWS instances using Red Hat, please install the Docker Infra Agent
Install
Step 1: Run Linux Install Command
Copy the appropriate installation command based on your machine’s operating system. Logging in to docs ensures your API key and UID are inserted accurately.
DEB
: Compatible with Debian or Debian-based operating systems. For AWS instances this includes Ubuntu and Debian.
MW_API_KEY="<MW_API_KEY>" MW_TARGET=https://<MW_UID>.middleware.io:443 bash -c "$(curl -L https://install.middleware.io/scripts/deb-install.sh)"
RPM
: Compatible with Red Hat Package Manager and operating systems like Red Hat or CentOS. Use this for AWS instances using Amazon Linux.
MW_API_KEY="<MW_API_KEY>" MW_TARGET=https://<uid>.middleware.io:443 bash -c "$(curl https://install.middleware.io/scripts/rpm-install.sh)"
Step 2: Add Host Tags [Optional]
Create filterable custom tags by adding the MW_HOST_TAGS
environment variable to the installation command as comma-separated key-value pairs. Use the tag name
to create an alias for the host (e.g. production).
Check your host tags have been embedded by navigating to Infrastructure -> Your Desired Host -> System Information
MW_HOST_TAGS=key1:value1,key2:value2,... MW_API_KEY="<MW_API_KEY>"
Step 3: Verify Installation
Run the following command to verify the Infra Agent status:
Shell
sudo systemctl status mw-agent
Troubleshooting
Run only one Infra Agent per node per host. Multiple agents will cause unexpected behavior.
Once the Infra Agent is installed metrics should begin appearing in the Middleware application within a few minutes. If metrics do not appear, confirm that the machine has access to the internet, either directly or through a proxy, and that only one Infra Agent is running per node.
Uninstall
To uninstall the MW agent, use one of the following commands:
Shell
bash -c "$(curl -L https://install.middleware.io/scripts/deb-uninstall.sh)"
Shell
bash -c "$(curl -L https://install.middleware.io/scripts/rpm-uninstall.sh)"
Need assistance or want to learn more about Middleware? Contact our support team in Slack.