Hi currently I have some configuration telegraf.conf for on windows server using export inputs.sql
[[inputs.sql]]
driver = "sqlserver"
dsn = "grafanasql:mypassword@192.168.101.152:1433/dbname?param=value"
[[inputs.sql.query]]
query="select session_id,blocking_session_id,total_elapsed_time,wait_type,blocked_by_session,@@servername as servername from DBA_MANAGE.dbo.v_locking"
measurement = "sql_locking_x1"
tag_columns_include = ["session_id","blocking_session_id","total_elapsed_time","wait_type","blocked_by_session","servername"]
field_columns_int = ["session_id","blocking_session_id"]
field_columns_string = ["total_elapsed_time","wait_type","blocked_by_session","servername"]
field_columns_exclude = ["session_id","blocking_session_id","total_elapsed_time","wait_type","blocked_by_session","servername"]
[[inputs.sql.query]]
query="SELECT count(s.host_name) as total_ex, s.host_name FROM sys.dm_exec_sessions AS s JOIN sys.dm_exec_requests AS r ON r.session_id = s.session_id CROSS APPLY sys.Dm_exec_sql_text(r.sql_handle) AS st WHERE r.session_id != @@SPID AND r.total_elapsed_time > 10000 GROUP BY s.host_name"
measurement = "sql_slowquery_x3"
field_columns_int = ["total_ex"]
field_columns_string = ["host_name"]
field_columns_exclude = ["total_ex","host_name"]
For measurement “sql_slowquery_x3” is shown on influxdb but for measurement “sql_locking_x1” is doesn’t show on influxdb
any suggestion ?
Thanks