Configure Grafana Alloy to use the Linux server integration
After you’ve installed Grafana Alloy, the next step is to configure it for the Linux Server integration. This configuration process requires you to copy a code snippet from Grafana Cloud and add it to the Alloy configuration file.
Did you know? By default, the integration only collects the metrics and logs necessary to populate the Linux server dashboards and alerts. Although you have the option to configure Alloy to collect all available metrics and logs, we recommend starting with the default configuration.
To configure Alloy to use the Linux server integration:
In the Set up Grafana Alloy to use the Linux server integration section, click Copy to clipboard.
On your Linux machine, run the following command to open the Alloy configuration file:
sudo nano /etc/alloy/config.alloyScroll to the end of the configuration file and paste the code snippet you copied from Grafana Cloud.
Press
Ctrl+Oto write the changes to the file, then press Enter to save. PressCtrl+Xto exit the editor.In the next step of your journey, you’ll restart Alloy and test the configuration.

More to explore (optional)
- Configure Grafana Alloy to collect all metrics and logs (advanced)
- Configure Grafana Alloy
- Logs and relabeling basics in Grafana Alloy (tutorial)
Troubleshooting
Explore the following troubleshooting topics if you need help:
Troubleshooting options
Please tell us what didn't work:
