Execute SQL Query using Telegraf plugin for MSSQL Server

Need to execute SQL query using telegraf plugin to get listener state information from MSSQL server. Is it possible using telegraf plugin?.
If so please share the details with few example. Thanks in advance.

Hi @bala_rocky,
Here is the documentation for our SQL server monitor. This contains a list of available queries that can be run: telegraf/plugins/inputs/sqlserver at master · influxdata/telegraf · GitHub

could you explain a little more about the data you are trying to pull on the listener state?

Thanks Jay,

Found sql query to see listener state in mssql server and usinginouts.exec, powershell script and sqlcmd command getting outputs in telegraf.

1 Like

Can you please share the solution?

@bala_rocky any reason you are not using the sql input plugin to issue your query?