macOS
This guide walks you through installing the Middleware Agent (MW Agent) on a macOS machine. These instructions can also be found on the Installation page in the Middleware application.
We offer an install script specifically for macOS. Please note that not all macOS versions are supported. A list of supported versions can be found under Prerequisites.
Prerequisites
- macOS Version: macOS
v10.15
(Catalina) or above. - Hardware: Both Apple Silicon and Intel based macOS machines are supported.
Install
By default, MW Agent is installed at /opt/mw-agent
. The configuration files are located at /etc/mw-agent
and log files can be found at /var/log/mw-agent
. MW Agent is installed as a systemwide LaunchDaemon that runs in the background and collects telemetry data from the system.
Installing MW Agent on macOS requires administrative privileges.
Step 1: Install MW Agent using Bash or GUI
Bash
You can install MW Agent by issuing the following command on a Terminal window. Ensure that you have correct values for MW_API_KEY
and MW_TARGET
.
MW_API_KEY="<MW_API_KEY>" MW_TARGET="https://<MW_UID>.middleware.io:443" bash -c "$(curl -L https://install.middleware.io/scripts/mw-macos-agent-install.sh)"
Installation Bash script will automatically detect Apple Silicon or Intel macOS machine architecture and install the appropriate MW Agent
GUI
Alternatively, if you wish to install MW Agent using a graphical user interface(GUI), download the MW Agent installer depending on your macOS architecture.
For Apple Silicon(M1/M2/M3/M4) based macOS machines, download the MW Agent installer from here.
For Intel based macOS machines, download the MW Agent installer from here.
After the running the downloaded file, you will see an installation wizard screen like below.
Follow the prompts of the installation wizard and enter your MW_API_KEY
and MW_TARGET
when requested.
MW_API_KEY="<MW_API_KEY>" MW_TARGET="https://<MW_UID>.middleware.io:443"
Step 2: Verify Installation
Run the following command to verify the Infra Agent status:
Shell
sudo launchctl list | grep mw-agent
A successful installation will return the following MW Agent Status report.
33105 0 io.middleware.mw-agent
The MW Agent has been successfully installed and is running on your macOS machine.
Troubleshooting
Run only one MW Agent per macOS machine. Multiple MW Agents will cause an unexpected behavior.
Once the MW Agent is installed, metrics & logs should begin appearing in the Middleware application within a few minutes. If metrics & logs do not appear, confirm that the machine has access to the internet, either directly or through a proxy, and that only one MW Agent is running per machine.
Uninstall
To uninstall the MW agent, use the following command:
Shell
/opt/mw-agent/uninstall.sh
Need assistance or want to learn more about Middleware? Contact our support team in Slack.