marcingminski / sqlwatch

SQL Server Performance Monitor
https://docs.sqlwatch.io
Other
436 stars 173 forks source link

Performance - Average Values Over Time --- Repository Dashboard -- missing values #413

Open funooni opened 3 years ago

funooni commented 3 years ago

Did you check DOCS to make sure there is no workaround? https://sqlwatch.io/docs/

Yes

Describe the bug The table "Performance - Average Values Over Time" does not show values for the columns:

Blocked, Batch Requests , Transactions, Connections, Logins/Sec

To Reproduce Steps to reproduce the behavior:

  1. Go to repository Dashboard, Expand the "Performance - Average Values Over Time"
  2. The values for above mentioned columns will not be there

Expected behavior The columns must have values

Screenshots Repository_Dashboard_issue

Windows Server (please complete the following information):

SQL Server (please complete the following information):

SQL Server Management Studio (SSMS -> about -> copy info): Microsoft SQL Server Management Studio 13.0.16106.4 Microsoft Analysis Services Client Tools 13.0.1700.441 Microsoft Data Access Components (MDAC) 10.0.17763.1 Microsoft MSXML 3.0 6.0 Microsoft Internet Explorer 9.11.17763.0 Microsoft .NET Framework 4.0.30319.42000 Operating System 6.3.17763

SQLWATCH version (from DACPAC or from sysinstances)

Additional context The table gets data from the below query SELECT --repository_dashboard_table 'Batch Requests/sec' = avg(case when counter_name = 'Batch Requests/sec' then [cntr_value_calculated] else null end) ,'Readahead pages/sec' = avg(case when counter_name = 'Readahead pages/sec' then [cntr_value_calculated] else null end) ,'Transactions/sec' = max(case when counter_name = 'Transactions/sec' then [cntr_value_calculated] else null end) ,'Processes blocked' = avg(case when counter_name = 'Processes blocked' then [cntr_value_calculated] else null end) ,'User Connections' = avg(case when counter_name = 'User Connections' then [cntr_value_calculated] else null end) ,'Logins/sec' = avg(case when counter_name = 'Logins/sec' then cntr_value_calculated else null end) ,pc.sql_instance FROM [dbo].[vw_sqlwatch_report_fact_perf_os_performance_counters] pc WHERE [aggregation_interval_minutes] = 1 AND $__timeFilter(snapshot_time) AND counter_name IN ('Batch Requests/sec','Readahead pages/sec','Transactions/sec','Processes blocked','CPU usage %','User Connections','Logins/sec') GROUP BY pc.sql_instance

If i remove the condition "[aggregation_interval_minutes] = 1" in the where condition then i see the data.

Please check whether this is a fix or I need to check something else.

Many thanks Zee