# Inspiration help: Monitoring SQL server and sending the data to Azure monitor

**URL:** https://community.influxdata.com/t/inspiration-help-monitoring-sql-server-and-sending-the-data-to-azure-monitor/58352
**Category:** Telegraf
**Tags:** telegraf, getting-started, docker
**Created:** [March 6, 2026, 8:50am UTC](https://community.influxdata.com/t/inspiration-help-monitoring-sql-server-and-sending-the-data-to-azure-monitor/58352 "2026-03-06T08:50:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JanLD](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@JanLD](https://community.influxdata.com/u/JanLD)
#### Post date: [March 6, 2026, 8:50am UTC](https://community.influxdata.com/t/inspiration-help-monitoring-sql-server-and-sending-the-data-to-azure-monitor/58352/1 "2026-03-06T08:50:42Z")

</div>

**Hi all,**

I am new to the InfluxData/Telegraf world, and what I’m trying to do is use a Telegraf Docker setup to monitor a SQL Server installation running on a VM—either in Azure or Azure Stack/Local.

I have a running Docker container on Rocky Linux.

The Docker container is running, it connects to one of our SQL Servers, and it is successfully sending metrics to Azure Monitor.

Some of the data is useful when it ends up as metrics, but most of it doesn’t make much sense in Azure Metrics.

It might be due to my limited experience with Telegraf, but what I’d like to achieve is a setup where I can create a dashboard showing the state and performance of the SQL Server, as well as the state and performance of the individual databases.  
We build dashboards in SquaredUp, which allows us to query almost anything in Azure, so it doesn’t matter too much whether the data ends up in Metrics or Log Analytics—but personally, I would prefer Log Analytics.

My Telegraf config file currently looks like this:  
(Of course, I have anonymized it.)

_[agent]  
interval = “10s” # Collect every 10s; Azure Monitor output will aggregate into 1m buckets  
round\_interval = true  
flush\_interval = “15s”  
flush\_jitter = “0s”  
metric\_batch\_size = 1000  
metric\_buffer\_limit = 20000  
precision = “1s”  
omit\_hostname = false  
debug = true  
quiet = false_

_#========================================================================_

# _INPUTS_

_#========================================================================_

_[[inputs.sqlserver]]  
servers = [“Server=1.2.3.4;User Id=telegraf;Password=pw;app name=telegraf;”]  
database\_type = “SQLServer”_

_query\_timeout = “30s”  
#========================================================================_

# _OUTPUTS_

_#========================================================================_

_[[outputs.azure\_monitor]]  
timeout = “20s”  
region = “westeurope”  
resource\_id = “/subscriptions/xxx/resourceGroups/rg-xxxx-vm-p-we/providers/Microsoft.Compute/virtualMachines/xxx”  
namespace\_prefix = “Telegraf/”_

_strings\_as\_dimensions = false_

If I change **strings\_as\_dimensions** to **true** , I get a lot of errors about the length of the input.

So—does anyone have suggestions for how I can make the data more useful in Azure Monitor and SquaredUp?  
Or any good ideas for an alternative approach to reach the same goal?

Reagards

Jan Dam

---

<div class="post-metadata">

### Author: ![JanLD](https://avatars.discourse-cdn.com/v4/letter/j/f05b48/32.png) [@JanLD](https://community.influxdata.com/u/JanLD)
#### Post date: [March 6, 2026, 11:04am UTC](https://community.influxdata.com/t/inspiration-help-monitoring-sql-server-and-sending-the-data-to-azure-monitor/58352/2 "2026-03-06T11:04:06Z")

</div>

This is the error i get in the log, when i set strings\_as\_dimensions = true

E! [agent] Error writing to outputs.azure\_monitor: failed to write batch: [400] 400 Bad Request: {“error”:{“code”:“BadRequest”,“message”:“The field Items in DimValues must be a string with a maximum length of 256.\r\n”}}

Is there a way i can see what metric it is there is to long?

---

<div class="post-metadata">

### Author: ![scott](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/scott/32/16492_2.png) [@scott](https://community.influxdata.com/u/scott)
#### Post date: [March 7, 2026, 11:51pm UTC](https://community.influxdata.com/t/inspiration-help-monitoring-sql-server-and-sending-the-data-to-azure-monitor/58352/3 "2026-03-07T23:51:39Z")

</div>

@JanLD, you could add a [file output plugin](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/file) to your config so it would output all the metrics to a local file as well as Azure. This would allow you to inspect the actual metrics being sent.
