The HTTP pull model that Prometheus uses perfectly aligns with the separation of concerns between observability and monitoring itself. The component or machine is responsible for exposing appropriate data and metrics—it allows being observed—and Prometheus periodically consumes the available data in the process called scraping. This means that if you have a way of exposing metrics in Prometheus format at some HTTP endpoint, you can use Prometheus for monitoring! It can be hardware telemetry exposed by a system service or even your own metrics accessible by an additional HTTP endpoint in your .NET application.
Now, there is the question of how to gather the metrics data on the Windows operating system and expose it. We are interested in the following:
- Hardware-related metrics, for example, CPU, memory, network, and I/O metrics...