New Azure Data Explorer output plugin for Telegraf enables SQL monitoring at huge scale

Published Nov 03 2021 03:03 PM 2,123 Views
Microsoft

Let me share what instigated the need for this plugin before we dive into details. I work with some of the largest enterprise customers of Microsoft with massive SQL environments ranging from thousands to up to a million databases. So you can imagine how painful it would be to monitor such a large fleet of SQL Servers (IaaS and PaaS offerings). Creating a cost-effective solution for the collection of meaningful data to gain the near real-time insights needed to take timely actions before business is impacted, was a daunting task.

 

Telegraf has a SQL Server input plugin that collects metrics from SQL Server instances using DMVs to collect data. This is by far one of the best way to collect rich, comprehensive, and meaningful data to monitor SQL Servers. The Microsoft SQL Server engineering team is one of the major contributors to this plugin. Customers wanted to combine the power of the plugin along with the platform that is purpose-built for such scenarios as a destination – Azure Data Explorer. Hence, we got multiple requests from large SQL customers to develop the Telegraf output plugin for Azure Data Explorer that enables direct ingestion of SQL metrics. 

 

What is Azure Data Explorer

Azure Data Explorer is purpose-built for log analytics and IoT analytics scenarios. It is a low latency, high throughput, distributed, columnar store with native capabilities for time series analytics, parsing, full text search, pattern recognition, forecasting, anomaly detection, pre-aggregations using materialized views, automatic indexing and partitioning, predictive autoscale, and many more features. 

 

What is Telegraf

Telegraf is an opensource, lightweight, minimal memory foot print agent for collecting, processing and writing telemetry data (including logs, metrics, and IoT data). Telegraf supports hundreds of input and output plugins. It is widely used and very well supported by the open source community. 

 

Brief on Azure Data Explorer plugin

We are very excited to introduce the new Telegraf output plugin for Azure Data Explorer (GA) and Azure Synapse Data Explorer (public preview). This plugin is completely configuration-based and very easy to deploy and monitor. It can be deployed on containerized environments, VMs, or servers that need to be monitored. Just to give you an idea of the complexity that existed before and the simplicity introduced by this new plugin, see the following before/after architecture diagram.

WhyPlugin.png

 

Benefits of the plugin

  • Simplifies the SQL monitoring solution - plugin simplifies the overall monitoring of different flavors of SQL Servers including Azure SQL Databases, elastic pools, SQL MI, and SQL Server on VM/on-premises.
  • Reduces cost, complexity, and maintenance overheads - provides a direct ingestion path to Azure Data Explorer and hence removes the need for additional components resulting in a reduction of cost and complexity. 
  • Low latency ingestion to gain near real-time insights - supports low latency ingestion of ~10 seconds.
  • Richness of data – collects much more meaningful data compared to the alternatives.
  • Makes the SQL monitoring solution affordable - one of the biggest advantages of Azure Data Explorer is cost effectiveness. Check it out yourself using our pricing calculator and compare it with any of the big data analytics alternatives.

 

Use cases for the plugin

In this blog post I have mainly focused on the SQL monitoring use case as this is one of the most popular scenarios. However, it can be leveraged for different scenarios such as the collection of telemetry generated by docker containers, kubernetes environments, windows event logs, syslogs, or any of the supported input plugins to ingest logs, metrics, IoT data into Azure Data Explorer and extract insights by building near real-time analytics dashboards.

The following dashboard is an example of insights that can be achieved with this plugin. It's built using Azure Data Explorer dashboards and the Kusko Query Language queries to build it are attached.

SQLDashboard.png

 

 

To get started, you just need two things

  1. Binary - Telegraf is written in Go and compiled into a single binary that can be downloaded from here
  2. Config - It uses a single config file for all plugins. Attached is a sample Telegraf.conf file with the SQL Server input plugin and the Azure Data Explorer output plugin. You can add any other input and output plugins in the same way.

As this is an open source solution, we welcome contributions from the community. Try it out and do share your feedback.

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2829444%22%20slang%3D%22en-US%22%3ENew%20Azure%20Data%20Explorer%20output%20plugin%20for%20Telegraf%20enables%20SQL%20monitoring%20at%20huge%20scale%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2829444%22%20slang%3D%22en-US%22%3E%3CP%3ELet%20me%20share%20what%20instigated%20the%20need%20for%20this%20plugin%20before%20we%20dive%20into%20details.%20I%20work%20with%20some%20of%20the%20largest%20enterprise%20customers%20of%20Microsoft%20with%20massive%20SQL%20environments%20ranging%20from%20thousands%20%3CSPAN%3Eto%20up%20to%20a%20million%20databases%3C%2FSPAN%3E.%20So%20you%20can%20imagine%20how%20painful%20it%20would%20be%20to%20monitor%20such%20a%20large%20fleet%20of%20SQL%20Servers%20(IaaS%20and%20PaaS%20offerings).%26nbsp%3B%3CSPAN%3ECreating%20a%20cost-effective%20solution%20for%20the%20collection%20of%20meaningful%20data%20to%20gain%20the%20near%20real-time%20insights%20needed%20to%20take%20timely%20actions%20before%20business%20is%20impacted%2C%20was%20a%20daunting%20task.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETelegraf%20has%20a%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Finfluxdata%2Ftelegraf%2Ftree%2Fmaster%2Fplugins%2Finputs%2Fsqlserver%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESQL%20Server%20input%20plugin%3C%2FA%3E%20that%20collects%20metrics%20from%20SQL%20Server%20instances%20using%20DMVs%20to%20collect%20data.%20This%20is%20by%20far%20one%20of%20the%20best%20way%20to%20collect%20rich%2C%20comprehensive%2C%20and%20meaningful%20data%20to%20monitor%20SQL%20Servers.%20The%20Microsoft%20SQL%20Server%20engineering%20team%20is%20one%20of%20the%20major%20contributors%20to%20this%20plugin.%20Customers%20wanted%20to%20combine%20the%20power%20of%20the%20plugin%20along%20with%20the%20platform%20that%20is%20purpose-built%20for%20such%20scenarios%20as%20a%20destination%20%E2%80%93%20%3CEM%3EAzure%20Data%20Explorer%3C%2FEM%3E.%20Hence%2C%20we%20got%20multiple%20requests%20from%20large%20SQL%20customers%20to%20develop%20the%20Telegraf%20output%20plugin%20for%20Azure%20Data%20Explorer%20that%20enables%20direct%20ingestion%20of%20SQL%20metrics.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWhat%20is%20Azure%20Data%20Explorer%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-au%2Fservices%2Fdata-explorer%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Data%20Explorer%3C%2FA%3E%20is%20purpose-built%20for%20log%20analytics%20and%20IoT%20analytics%20scenarios.%20It%20is%20a%20low%20latency%2C%20high%20throughput%2C%20distributed%2C%20columnar%20store%20with%20native%20capabilities%20for%20time%20series%20analytics%2C%20parsing%2C%20full%20text%20search%2C%20pattern%20recognition%2C%20forecasting%2C%20anomaly%20detection%2C%20pre-aggregations%20using%20materialized%20views%2C%20automatic%20indexing%20and%20partitioning%2C%20predictive%20autoscale%2C%20and%20many%20more%20features.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EWhat%20is%20Telegraf%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.influxdata.com%2Ftime-series-platform%2Ftelegraf%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ETelegraf%3C%2FA%3E%20is%20an%20opensource%2C%20lightweight%2C%20minimal%20memory%20foot%20print%20agent%20for%20collecting%2C%20processing%20and%20writing%20telemetry%20data%20(including%20logs%2C%20metrics%2C%20and%20IoT%20data).%20Telegraf%20supports%20hundreds%20of%20input%20and%20output%20%3CA%20href%3D%22https%3A%2F%2Fdocs.influxdata.com%2Ftelegraf%2Fv1.20%2Fplugins%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Eplugins%3C%2FA%3E.%20It%20is%20widely%20used%20and%20very%20well%20supported%20by%20the%20open%20source%20community.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EBrief%20on%20Azure%20Data%20Explorer%20plugin%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EWe%20are%20very%20excited%20to%20introduce%20the%20new%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Finfluxdata%2Ftelegraf%2Ftree%2Fmaster%2Fplugins%2Foutputs%2Fazure_data_explorer%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ETelegraf%20output%20plugin%3C%2FA%3E%20for%20Azure%20Data%20Explorer%20(GA)%20and%20Azure%20Synapse%20Data%20Explorer%20(public%20preview).%20This%20plugin%20is%20completely%20configuration-based%20and%20very%20easy%20to%20deploy%20and%20monitor.%20It%20can%20be%20deployed%20on%20containerized%20environments%2C%20VMs%2C%20or%20servers%20that%20need%20to%20be%20monitored.%20Just%20to%20give%20you%20an%20idea%20of%20the%20complexity%20that%20existed%20before%20and%20the%20simplicity%20introduced%20by%20this%20new%20plugin%2C%20see%20the%20following%20before%2Fafter%20architecture%20diagram.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WhyPlugin.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F323610i0A4DAD20DF2220E1%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22WhyPlugin.png%22%20alt%3D%22WhyPlugin.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EBenefits%20of%20the%20plugin%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3ESimplifies%20the%20SQL%20monitoring%20solution%20-%20%3C%2FSTRONG%3Eplugin%20simplifies%20the%20overall%20monitoring%20of%20different%20flavors%20of%20SQL%20Servers%20including%20Azure%20SQL%20Databases%2C%20elastic%20pools%2C%20SQL%20MI%2C%20and%20SQL%20Server%20on%20VM%2Fon-premises.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EReduces%20cost%2C%20complexity%2C%20and%20maintenance%20overheads%20-%26nbsp%3B%3C%2FSTRONG%3Eprovides%20a%20direct%20ingestion%20path%20to%20Azure%20Data%20Explorer%20and%20hence%20removes%20the%20need%20for%20additional%20components%20resulting%20in%20a%20reduction%20of%20cost%20and%20complexity.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ELow%20latency%20ingestion%20to%20gain%20near%20real-time%20insights%20-%3C%2FSTRONG%3E%26nbsp%3Bsupports%20low%20latency%20ingestion%20of%20~10%20seconds.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ERichness%20of%20data%3C%2FSTRONG%3E%20%E2%80%93%20collects%20much%20more%20meaningful%20data%20compared%20to%20the%20alternatives.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EMakes%20the%20SQL%20monitoring%20solution%20affordable%26nbsp%3B%3C%2FSTRONG%3E-%20one%20of%20the%20biggest%20advantages%20of%20Azure%20Data%20Explorer%20is%20cost%20effectiveness.%20Check%20it%20out%20yourself%20using%20our%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-au%2Fpricing%2Fcalculator%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Epricing%20calculator%3C%2FA%3E%20and%20compare%20it%20with%20any%20of%20the%20big%20data%20analytics%20alternatives.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EUse%20cases%20for%20the%20plugin%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EIn%20this%20blog%20post%20I%20have%20mainly%20focused%20on%20the%20SQL%20monitoring%20use%20case%20as%20this%20is%20one%20of%20the%20most%20popular%20scenarios.%20However%2C%20it%20can%20be%20leveraged%20for%20different%20scenarios%20such%20as%20the%20collection%20of%20telemetry%20generated%20by%20docker%20containers%2C%20kubernetes%20environments%2C%20windows%20event%20logs%2C%20syslogs%2C%20or%20any%20of%20the%20supported%20input%20plugins%20to%20ingest%20logs%2C%20metrics%2C%20IoT%20data%20into%20Azure%20Data%20Explorer%20and%20extract%20insights%20by%20building%20near%20real-time%20analytics%20dashboards.%3C%2FP%3E%0A%3CP%3EThe%20following%20dashboard%20is%20an%20example%20of%20insights%20that%20can%20be%20achieved%20with%20this%20plugin.%26nbsp%3BIt's%20built%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdata-explorer%2Fazure-data-explorer-dashboards%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Data%20Explorer%20dashboards%3C%2FA%3E%26nbsp%3Band%20the%20Kusko%20Query%20Language%20queries%20to%20build%20it%20are%20attached.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22SQLDashboard.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316486i646A00C73BE1A44F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SQLDashboard.png%22%20alt%3D%22SQLDashboard.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ETo%20get%26nbsp%3Bstarted%2C%20you%20just%20need%20two%20things%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EBinary%20-%20Telegraf%20is%20written%20in%20%3CA%20href%3D%22https%3A%2F%2Fgolang.org%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGo%3C%2FA%3E%26nbsp%3Band%20compiled%20into%20a%20single%20binary%20that%20can%20be%20downloaded%20from%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Finfluxdata%2Ftelegraf%2Ftree%2Frelease-1.20%23installation%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EConfig%20-%20It%20uses%20a%20single%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Finfluxdata%2Ftelegraf%2Ftree%2Fmaster%2Fconfig%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Econfig%3C%2FA%3E%20file%20for%20all%20plugins.%20Attached%20is%20a%20sample%20%3CSTRONG%3ETelegraf.conf%3C%2FSTRONG%3E%20file%20with%20the%20SQL%20Server%20input%20plugin%20and%20the%20Azure%20Data%20Explorer%20output%20plugin.%20You%20can%20add%20any%20other%20input%20and%20output%20plugins%20in%20the%20same%20way.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EAs%20this%20is%20an%20open%20source%20solution%2C%20we%20welcome%20contributions%20from%20the%20community.%20Try%20it%20out%20and%20do%20share%20your%20feedback.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2829444%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EWith%20this%20plugin%2C%20you%20can%20write%20telemetry%20collected%20by%20Telegraf%20(open%20source%20agent)%20input%20plugins%20to%20Azure%20Data%20Explorer.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Nov 03 2021 03:03 PM
Updated by: