MacOS

The Middleware Infrastructure Agent collects macOS host telemetry to help you monitor resource usage and investigate host performance. Configured logs and application traces add context about the workloads running on the host.

Use this integration to monitor macOS hosts and send their infrastructure and application telemetry to Middleware.

Prerequisites#

Before installing the Middleware Infrastructure Agent on macOS, make sure your system meets the following requirements:

  • macOS Version: v10.15 (Catalina) or later
  • Hardware: Apple Silicon (M1/M2/M3/M4) or Intel (x86_64)
  • Permissions: You’ll need admin (sudo) access to install

Install#

There are two ways you can install the Middleware agent on macOS. You can either use the one-liner command execution or go with the GUI installer.

Copy & paste by replacing the placeholders:

bash
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)"

The above command will trigger the following:

  • Auto-detects your CPU (Apple Silicon vs Intel) and installs into /opt/mw-agent.
  • Config files land in /etc/mw-agent; logs in /var/log/mw-agent.
  1. Download the PKG for your architecture from GitHub:
  2. Double-click the .pkg and follow the wizard.
  3. Enter your MW_API_KEY and MW_TARGET when prompted.
    macOS GUI Installer

Agent Directory Layout#

PathContents
/opt/mw-agentAgent binary & libraries
/etc/mw-agentmw-agent.yaml & conf.d/
/var/log/mw-agentAgent log files

Why this matters: A clear, sandboxed layout makes upgrades, backups, and troubleshooting straightforward.

Verify Installation#

Once you are done with the previous steps, the installation can be verified using the following:

bash
sudo launchctl list | grep mw-agent

A healthy agent returns something like:

bash
33105    0    io.middleware.mw-agent

Verify data collection#

After installing the Agent, allow a few moments for the host to start reporting telemetry.

Go to Infrastructure Monitoring → Hosts and verify that your macOS host appears and is reporting metrics.

After data collection starts, you can:

Troubleshooting#

Common issues and how to resolve them:#

  1. Multiple Agents Running
    • Only one MW Agent should be installed per macOS host.
      bash
      sudo launchctl list | grep mw-agent
    • If you see more than one entry, remove duplicates:
      bash
      sudo /opt/mw-agent/uninstall.sh
  2. No Data Appearing in Middleware.io
    • Network access: Verify the host can reach your MW_TARGET URL on port 443.
    • API key validity: Double-check that MW_API_KEY is correct.
    • Proxy/firewall: Ensure no proxy or firewall is blocking outbound traffic.
  3. Installation Script Errors
    • Permission issues: Rerun the install command with sudo.
    • Inspect logs:
      bash
      ls /var/log/mw-agent/
      tail -n 50 /var/log/mw-agent/install.log

If errors persist, contact support with the log excerpt.

Uninstall#

  • Run the uninstall script:
    bash
    sudo /opt/mw-agent/uninstall.sh
  • Confirm cleanup:
    bash
    ls /opt/mw-agent         # should report "No such file or directory"
    ls /etc/mw-agent         # no directory
    ls /var/log/mw-agent     # no directory

Need assistance or want to learn more about Middleware? Get in touch with us via our Contact Us or join our Slack channel.

What did you think of this content?