Yes user ID and password of the user you created earlier should be used in the connectionstring in telegraf. App name is a name that will be used when telegraf connecting to mssql. If you run a trace in mssql you’ll be able to see what specific application that’s executing queries in question.
Please inspect the telegraf agent log for errors to investigate what may be the problem.
Thanks for the reply, I’m still having some issues.
So i added the user to SQL, installed InfluxDb and telegraf on my grafana server (ubunto).
In the telegraf.conf I then added the connection string:
# Read metrics from Microsoft SQL Server
# servers = [
# "Server=10.x.x.x;Port=1443;User Id=telegraf;Password=Password1234!;app name = telegraf;log1;",
# ]
I still see no instances showing up when i load up module 409…what am i doing wrong? Where are the logs that i can check to see if any issues/errors?
So i’ve taken out the #'s and I’m still not seeing the instances show up in the grafana.
Server1 = grafana/influxdb
Server2 = MS SQL
the connection string looks like
vim telegraf.conf
(added to the end of the file)
# Read metrics from Microsoft SQL Server
[[inputs.sqlserver]]
servers = [
"Server=SERVER2;Port=1443;User Id=telegraf;Password=Password1234!;app name = telegraf;log1;",
]
I want to put the MS SQL server’s ip in the “Server=” tag right?
I tried that but I’m still not seeing anything
In the data source tab on Grafana I added a influxDB datasource with the HTTP pointing to http://GRAFANASERVER:8086 // Access: Direct
InfluxDB Details:
Database: SQL_Metrics (database i created in influx)
User: blank
Password: blank
I’m not sure telegraf supports windows authentication - please start with validating this!
Please note that you can start telegraf with just console output enabled (no data will be sent to influx) which can help you verify that telegraf at least can extract correct metrics. See telegraf console arguments for more information.
If you would like to exclude some of the metrics queries, list them here
Possible choices:
- PerformanceCounters
- WaitStatsCategorized
- DatabaseIO
- DatabaseProperties
- CPUHistory
- DatabaseSize
- DatabaseStats
- MemoryClerk
- VolumeSpace
exclude_query = [ ‘DatabaseIO’ ]
but dashboard https://grafana.com/dashboards/409 does not show anything, cant select any instance, and SHOW TAG VALUES WITH KEY = “servername” on the influxdb returns nothing, changing it to SHOW TAG VALUES WITH KEY = “my host that sends data” does not make the dashboard work either
I’ve tested the data flow and from what i can see i get the data in Influx, but what the dashboard is looking for does not look to match what is there, do you know a working dashboard?
I have loaded 409 dashboard and i see telegraph is pushing data to influxdb but still i see data in dashboard is empty. . i followed all the steps “https://github.com/influxdata/telegraf/tree/master/plugins/inputs/sqlserver” but still its empty . can you let me know what would be the reason ?
configuration of influxdb says test connection is successfull inside grafana.