Grafana Alloy can be used to monitor Windows servers and desktops. In this guide we will show you how to install Grafana Alloy on a Windows machine and how to configure it to monitor the following system attributes:
- Windows Performance Metrics
- Windows Event Logs
- Git - You will need Git to clone the repository.
- Docker - In this tutorial we assume you are using Docker desktop for Windows. This is where we host Grafana, Loki and Prometheus. Note that you can also install native Windows versions of Grafana, Loki and Prometheus if you prefer or host them on a Linux server.
- Windows Server or Desktop - We will be monitoring a Windows machine, so you will need a Windows server or desktop to monitor.
- Admin access to the Windows machine - You will need admin access to the Windows machine to install the Grafana Alloy and configure it to collect metrics and logs.
Clone the repository to your Windows machine.
git clone https://github.com/grafana/alloy-scenarios.git
First, you need to deploy Grafana, Loki and Prometheus on your Windows machine. Within this tutorial, we have included a docker-compose file that will deploy Grafana, Loki and Prometheus on your Windows machine.
cd alloy-scenarios/windows
docker-compose up -d
You can check the status of the containers by running the following command:
docker ps
Grafana should be running on http://localhost:3000.
Follow the instructions in the Grafana Alloy documentation to install Grafana Alloy on your Windows machine.
Recommended steps:
- Install Grafana Alloy as a Windows service.
- Use Windows Installer to install Grafana Alloy.
Make sure to also checkout the Grafana Alloy configuration documentation.
Personal recommendation: If you would like to see the Alloy UI from a remote machine you need to change the run arguments of the Grafana Alloy service. To do this:
- Open Registery Editor.
- Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\GrafanaLabs\Alloy
. - Double click on
Arguments
- Change the contents to the following:
run
C:\Program Files\GrafanaLabs\Alloy\config.alloy
--storage.path=C:\ProgramData\GrafanaLabs\Alloy\data
--server.http.listen-addr=0.0.0.0:12345
- Restart the Grafana Alloy service. (Search for
Services
in the start menu, findGrafana Alloy
, right click and restart)
You should now be able to access the Alloy UI from a remote machine by going to http://<windows-machine-ip>:12345
.
Now that you have Grafana Alloy installed, you need to configure it to monitor your Windows machine. Grafana Alloy will currently be running a default configuration file. This needs to be replaced with the config.alloy
file that is included in the alloy-scenarios/windows
directory. To do this:
- Stop the Grafana Alloy service.
- Replace the
config.alloy
file inC:\Program Files\GrafanaLabs\Alloy
with theconfig.alloy
file from thealloy-scenarios/windows
directory. - Start the Grafana Alloy service.
- Open your browser and go to
http://localhost:12345
to access the Alloy UI.
You will now be able to view the Windows Performance Metrics and Event Logs in Grafana:
-
Open your browser and go to http://localhost:3000/explore/metrics. This will take you to the metrics explorer in Grafana.
-
Open your browser and go to http://localhost:3000/a/grafana-lokiexplore-app. This will take you to the Loki explorer in Grafana.