Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana-Dashboard does not show the correct Database-Count #462

Open
hvoges opened this issue Oct 6, 2022 · 4 comments
Open

Grafana-Dashboard does not show the correct Database-Count #462

hvoges opened this issue Oct 6, 2022 · 4 comments

Comments

@hvoges
Copy link

hvoges commented Oct 6, 2022

Describe the bug
If Grafana-Dashboard uses a Central Repository as the Data-Source, the Instance-Overview always shows only the database-Number of the last Instance in the List.

To Reproduce
Open the Grafana-Dashboard for a Central Repository and open the SQL Instance Overview. All-Databases shows the same number of databases for each instance.

Expected behavior
Database Count and Growth should be shown according to the filter settings.

Screenshots
image

if the SQLWatch-DB from the instance is used:
image

This is the result from the sqlwatch-query

image

To me it seems as if the dashboard always shows the last result.

Windows Server (please complete the following information):

  • OS Version: Server 2016

SQL Server (please complete the following information):

  • SQL Version: SQL Server 2017
  • SQL Edition: Enterprise

SQL Server Management Studio (SSMS -> about -> copy info):

  • paste "about" info here:

SQLWATCH version (from DACPAC or from sysinstances)

  • 4.4.0.523

Additional context
Add any other context about the problem here.

@marcingminski
Copy link
Owner

Thanks. I recall this issue but thought it was fixed. I'll look into it.

@hvoges
Copy link
Author

hvoges commented Oct 6, 2022

I used the Json-Files from the Github-Repo here:
https://github.com/marcingminski/sqlwatch/tree/main/SqlWatch.Dashboard/Grafana
Is there a more current version?

@marcingminski
Copy link
Owner

marcingminski commented Oct 13, 2022

I just checked this in my test env, and the count is correct. Can you check if this view [dbo].[vw_sqlwatch_report_dim_database] returns the right databases, or let me see the results in CSV please?

And could you let me see results from this:

select *
from dbo.sqlwatch_meta_server s
outer apply (
	select *
	from [dbo].[vw_sqlwatch_report_dim_database] db
	where db.sql_instance = s.sql_instance
	and db.database_name = DB_NAME()
) dbs

@hvoges
Copy link
Author

hvoges commented Oct 21, 2022

Attached you find the results of the SQLwatch_meta_Server query.
sqlwatch_meta.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants