Menu
Open source

Install Grafana Agent on macOS

You can use Homebrew to install Grafana Agent on macOS.

Before you begin

Ensure that Homebrew is installed on your machine.

Install Grafana Agent with Homebrew

  1. Open a terminal and run the following commands:

    brew update
    brew install grafana-agent
    

    The brew install command downloads Grafana Agent and installs it at /opt/homebrew/Cellar/grafana-agent/VERSION.

    Grafana Agent logs are in /opt/homebrew/var/log/ by default.

  2. Open a terminal and run the following commands:

    mkdir -p $(brew --prefix)/etc/grafana-agent/
    touch $(brew --prefix)/etc/grafana-agent/config.yml
    
  3. Modify config.yml with your configuration requirements.

    Refer to Configure Grafana Agent for informatuon about the Agent configuration .

  4. Open a terminal and run the following command to start Grafana Agent:

    brew services start grafana-agent

    For logs, see:

    • stdout: $(brew --prefix)/var/log/grafana-agent.log
    • stderr: $(brew --prefix)/var/log/grafana-agent.err.log
  5. Open a terminal and run the following command to upgrade Grafana Agent:

    brew upgrade grafana-agent.

Note: To send your data to Grafana Cloud, set up Grafana Agent using the Grafana Cloud integration. Refer to how to install an integration and macOS integration.