The new 0.1.8 version of Sonar for monitoring Windows containers and hosts has been released with support for performance counters. The Web API sample in GitHub repository has been updated with latest version of configuration files.
Why Sonar was developed and how it compares with other metric collectors available today? There are very few free choices for metric collection on Windows. Most notable options are:
- Telegraf - metric collector built by InfluxData.
- WMI exporter - metric collector for Prometheus. It exposes metrics to Prometheus via HTTP.
This metric collector is open source and written in Go. It supports over 100 metric sources and remains being actively developed. For collecting Windows metrics it supports performance counters. However, it does not support WMI nor collecting metrics remotely. This means that monitoring complex metrics and Windows event logs is not possible with Telegraf. This monitoring agent does not support evaluating performance cost for collecting a specific metric.
This metric collector does support collecting metrics from WMI metrics out of the box. However, it supports limited set of metrics. Thus, if the metric you are looking for is not supported, developer has to generate code and metric collector should be recompiled. This means for any new metric that this exporter does not support out of the box, the end result will be new custom version of collector and time for development and testing. It appears that this exporter does not emit performance metrics associated with cost of scraping a metric.
This project was started because none of the above collectors could satisfy all our requirements for gathering performance metrics on Windows:
- No coding for defining new metrics.
- Query metrics from WMI locally and remotely on Windows ( including Nano Server containers).
- Gather performance counters on Windows ( including Nano Server containers).
- Monitoring Event Logs on Windows (including Nano Server containers).
- Deployment on Docker as Linux or Windows containers (sidecar pattern).
- Deployment on Kubernetes as Linux or Windows containers (sidecar pattern).
- Deployment as Windows service on Nano Server container.
- Deployment as Windows service on host OS.
- Monitor relational data from SQL Server for Linux or Windows on Docker or Kubernetes.
- Sending collected metrics to Prometheus.
- Sending collected metrics to InfluxDb.
- Ability to measure performance to determine cost of collecting any given metric.
The first feature implemented for Sonar was WMI adapter for collecting queries locally and remotely using containers and hosts. Using Sonar with container orchestrators (Docker or Kubernetes) includes many advantages, including ability to monitor metrics from multiple containers as well as Windows host using Sonar as sidecar. In addition each metric can be exposed to time series database you choose (Prometheus or InfluxDb). Next, we added data collection from SQL Server and then support for performance counters. Starting with version 0.1.8 all features for the above requirements are now implemented and available to use.
Unlike Telegraf and WMI exporter that are written in Go, Sonar uses .NET Core framework 2.0 This means that same bits can run on Nano Server or Windows hosts and Linux container is also available. Sonar depends only on libraries and .NET Core framework built by Microsoft.
Being cloud native from reliability engineering perspective means building and deploying Windows container that can be monitored same way in datacenter or any cloud without any changes. Most importantly, developers or reliability engineers should be able to focus on metrics around their business, not a specific cloud business. Also, modernizing traditional Windows applications means comprehensive monitoring for metrics that container orchestrators do not collect. Modernizing Windows applications with Sonar allows you can go cloud native all the way, not the half way.