Menu

This is documentation for the next version of Alloy. For the latest stable release, go to the latest version.

Open source

Configure Grafana Alloy on macOS

To configure Alloy on macOS, perform the following steps:

  1. Edit the default configuration file at $(brew --prefix)/etc/alloy/config.alloy.

  2. Run the following command in a terminal to restart the Alloy service:

    shell
    brew services restart alloy

Configure the Alloy service

Note

Due to limitations in Homebrew, customizing the service used by Alloy on macOS requires changing the Homebrew formula and reinstalling Alloy.

To customize the Alloy service on macOS, perform the following steps:

  1. Run the following command in a terminal:

    shell
    brew edit alloy

    This will open the Alloy Homebrew Formula in an editor.

  2. Modify the service section as desired to change things such as:

    • The configuration file used by Alloy.
    • Flags passed to the Alloy binary.
    • Location of log files.

    When you are done, save the file.

  3. Reinstall the Alloy Formula by running the following command in a terminal:

    shell
    brew reinstall alloy
  4. Restart the Alloy service by running the command in a terminal:

    shell
    brew services restart alloy

Expose the UI to other machines

By default, Alloy listens on the local network for its HTTP server. This prevents other machines on the network from being able to access the UI for debugging.

To expose the UI to other machines, complete the following steps:

  1. Follow Configure the Alloy service to edit command line flags passed to Alloy.

  2. Modify the line inside the service block containing --server.http.listen-addr=127.0.0.1:12345, replacing 127.0.0.1 with the IP address which other machines on the network have access to. For example, the IP address of the machine Alloy is running on.

    To listen on all interfaces, replace 127.0.0.1 with 0.0.0.0.