Configure Grafana Alloy on macOS
To configure Alloy on macOS, perform the following steps:
Edit the default configuration file at
$(brew --prefix)/etc/alloy/config.alloy
.Run the following command in a terminal to restart the Alloy service:
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:
Run the following command in a terminal:
brew edit alloy
This opens the Alloy Homebrew Formula in an editor.
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.
Save the modified file.
Reinstall the Alloy Formula by running the following command in a terminal:
brew reinstall --formula alloy
Restart the Alloy service by running the command in a terminal:
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:
Follow Configure the Alloy service to edit command line flags passed to Alloy.
Modify the line inside the
service
block containing--server.http.listen-addr=127.0.0.1:12345
, replacing127.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
with0.0.0.0
.