Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

Grot cannot remember your choice unless you click the consent notice at the bottom.

We’ve added first-class Windows support to Grafana Agent

We’ve added first-class Windows support to Grafana Agent

22 Apr, 2021 3 min

The Grafana Agent team is happy to announce that Grafana Agent 0.14.0-rc2 includes improved Windows support.

Start here!

The path to Windows

Up until now, running Grafana Agent — our tool for gathering metrics, logs, and traces — in Windows was difficult and not well supported for Windows best practices. In short, it was not a good Windows citizen. In the new release candidate, we’re making changes to improve the experience, based on feedback from GitHub issues, customer contacts, and our own experience. Compiling this list, the Grafana Agent team narrowed down the most immediate needs to a few simple concepts.

What does being a Windows citizen mean?

Before the release candidate, Grafana Agent was an executable that ran on Windows but had significant downsides to adoption: 

  • Lack of support for running as Windows Service
  • Lack of Integration with windows_exporter
  • Lack of writing Grafana Agent log as Windows Event Logs

Windows Service support

Running Grafana Agent previously as a Windows Service required using shim software such as NSSM. The shim software created additional external dependencies and required highly locked-down environments to review additional software. This dependency also created more effort and paths for debugging an issue. 

Grafana Agent now supports running as a Windows Service natively. Windows Service support means that Grafana Agent will respond to both start and stop commands.

Integration of windows_exporter

A long-requested feature has been bundling of windows_exporter into Grafana Agent to reduce the number of dependencies and installed services. During the Grafana Agent installation, you can enable the windows_exporter integration. Windows_exporter will then collect Windows metrics. Grafana Agent uses a fork of windows_exporter to make it function as a library. The Grafana team is currently working with the Prometheus community on contributing those changes upstream.

Installer and uninstaller

The Windows world expects software to come packaged with an installer and an uninstaller. That installer is now a release artifact for the Grafana Agent builds. The installer will create a default configuration, add itself as a Windows Service, and add the appropriate hooks to uninstall itself. The installer also includes silent installation and will not overwrite your config on re-installs, allowing you to update the software in place.

Writing logs to the event log

At Grafana Labs, logs are a central tenet of our observability story. Those logs were lost when running Grafana Agent as a Windows Service. Now Grafana Agent logs are easily read and allow reuse of the current Windows log workflow. Logs can then be pushed with Grafana Agent’s Loki integration.

Give it a try and give us feedback!

You can influence future changes to the Windows experience with Grafana Agent. The Grafana Agent team is very open to any suggestions or feedback, and the best way to do that is via GitHub Issues. The goal is to make Grafana Agent the best tool for gathering metrics, logs, and traces on the Windows platform!