{"id":14972016,"url":"https://github.com/czantoine/microsoft-sql-server-with-grafana","last_synced_at":"2025-10-23T20:54:14.989Z","repository":{"id":247706576,"uuid":"826624532","full_name":"czantoine/microsoft-sql-server-with-grafana","owner":"czantoine","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-10T15:57:56.000Z","size":1278,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T21:52:44.424Z","etag":null,"topics":["grafana","grafana-dashboard","microsoft-sql-server","microsoft-sqlserver-database","sql-server"],"latest_commit_sha":null,"homepage":"https://medium.com/@antoinecichowicz/monitoring-microsoft-sql-server-with-grafana-a-comprehensive-guide-da370ca4c356","language":"TSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/czantoine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-10T04:24:41.000Z","updated_at":"2025-01-21T08:10:42.000Z","dependencies_parsed_at":"2024-10-24T07:17:40.765Z","dependency_job_id":"42f04195-1631-473c-8509-c034a9bf0749","html_url":"https://github.com/czantoine/microsoft-sql-server-with-grafana","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"8704c78652576e653f76122221b1b7c6568afbfe"},"previous_names":["czantoine/microsoft-sql-server-with-grafana"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2Fmicrosoft-sql-server-with-grafana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2Fmicrosoft-sql-server-with-grafana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2Fmicrosoft-sql-server-with-grafana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czantoine%2Fmicrosoft-sql-server-with-grafana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/czantoine","download_url":"https://codeload.github.com/czantoine/microsoft-sql-server-with-grafana/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238375182,"owners_count":19461565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grafana","grafana-dashboard","microsoft-sql-server","microsoft-sqlserver-database","sql-server"],"created_at":"2024-09-24T13:46:12.048Z","updated_at":"2025-10-23T20:54:14.970Z","avatar_url":"https://github.com/czantoine.png","language":"TSQL","funding_links":["https://ko-fi.com/V7V22V693"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://twitter.com/cz_antoine\"\u003e\u003cimg alt=\"Twitter\" src=\"https://img.shields.io/twitter/follow/cz_antoine?style=social\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://www.linkedin.com/in/antoine-cichowicz-837575b1\"\u003e\u003cimg alt=\"Linkedin\" src=\"https://img.shields.io/badge/-Antoine-blue?style=flat-square\u0026logo=Linkedin\u0026logoColor=white\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/czantoine/microsoft-sql-server-with-grafana\"\u003e\u003cimg alt=\"Stars\" src=\"https://img.shields.io/github/stars/czantoine/microsoft-sql-server-with-grafana\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/czantoine/microsoft-sql-server-with-grafana\"\u003e\u003cimg alt=\"Issues\" src=\"https://img.shields.io/github/issues/czantoine/microsoft-sql-server-with-grafana\"\u003e\u003c/a\u003e\n\t\u003cimg alt=\"Last Commit\" src=\"https://img.shields.io/github/last-commit/czantoine/microsoft-sql-server-with-grafana\"\u003e\n\u003c/p\u003e\n\nIf you enjoy my projects and want to support my work, consider buying me a coffee! ☕️\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/V7V22V693)\n\n# Monitoring Microsoft SQL Server with Grafana\n\n\u003ca href=\"https://grafana.com/dashboards/21378\"\u003e\n    \u003cimg src=\"https://grafana-dashboard-badge.netlify.app/.netlify/functions/api/badge?id_dashboard=21378\u0026logo=true\" alt=\"Grafana Dashboard Badge\"\u003e\n\u003c/a\u003e\n\nExample of the metrics you should expect to retrieve; the detailed list of exported metrics is maintained [here](docs/metrics.md).\n\nA Docker Compose setup is available if you wish to test the dashboard. Available [here](quickstart/README.md).\n\n## Features\n\nThis is a comprehensive Grafana dashboard designed for monitoring Microsoft SQL Server. It provides real-time insights into your SQL Server environment, making it easy for both technical and non-technical users to understand the performance of their SQL Server instances.\n\n## Data Source Setup\nThe data source for this dashboard can directly be your SQL Server database instance. Ensure that the SQL Server instance is accessible to Grafana.\n\n### General\n- **Database name**: Displays the database name.\n- **Uptime**: Displays the SQL Server start time.\n- **Active User Sessions**: Shows the count of active user sessions by login name.\n\n![grafana_dashboard_microsoft_sql_server_section_general](docs/images/grafana_dashboard_microsoft_sql_server_section_general.png)\n\n### Query Performance\n- **Top 10 Longest Running Queries**: Lists the top 10 queries with the longest average duration.\n- **Queries per Second**: Provides average duration and execution count of queries.\n- **Query Cache Hit Rate**: Visualizes the cache hit ratio for queries.\n- **Query Plan Cache Efficiency**: Shows the efficiency of cached query plans.\n- **Wait Stats Overview**: Displays an overview of wait statistics in SQL Server.\n- **Current Connections**: Indicates the current number of connections to the SQL Server.\n- **Query Latency**: Visualizes latency for recent queries.\n- **Execution Plans Performance**: Monitors performance metrics of executed plans.\n\n![grafana_dashboard_microsoft_sql_server_section_query_performance](docs/images/grafana_dashboard_microsoft_sql_server_section_query_performance.png)\n\n### Server Performance\n- **Query Latency**: Displays the top 10 longest running queries based on total elapsed time.\n- **Running Threads**: Displays the number of running threads in the SQL Server.\n- **Open Files Limit**: Shows the count of currently open files.\n- **Active Transactions**: Provides details on active transactions in the system.\n- **Temp Tables Created On Disk**: Monitors the number of temporary tables created on disk.\n- **Table Locks**: Displays information on current table locks.\n- **Waiting Times Monitoring**: Provides an overview of wait statistics in SQL Server.\n\n![grafana_dashboard_microsoft_sql_server_section_server_performance](docs/images/grafana_dashboard_microsoft_sql_server_section_server_performance.png)\n\n### Buffer and Index Management\n- **Buffer Pool Hit Rate**: Visualizes the hit rate of the buffer pool.\n- **Buffer Pool Usage**: Monitors the overall usage of the buffer pool.\n- **Index Usage**: Displays usage statistics for database indexes.\n- **Page Life Expectancy**: Shows the average time pages stay in the buffer pool.\n\n![grafana_dashboard_microsoft_sql_server_section_buffer_and_index_management](docs/images/grafana_dashboard_microsoft_sql_server_section_buffer_and_index_management.png)\n\n### Database Space Usage\n- **Total Space**: Displays the total space allocated to all tables in the database.\n- **Used Space**: Shows the space currently used by all tables.\n- **Unused Space**: Provides information on unused space in the database.\n- **Memory Grants Pending**: Indicates the count of pending memory grants.\n- **Transaction Log Space Usage**: Displays the usage of transaction log space.\n- **Database File Usage**: Shows details about database files and their sizes.\n- **Table Locks**: Provides information on current table locks.\n- **Backups Status**: Displays the status of recent database backups.\n- **Memory Usage**: Visualizes overall memory usage in SQL Server.\n- **TempDB Disk Monitoring**: Monitors I/O stalls for TempDB files.\n- \n![grafana_dashboard_microsoft_sql_server_section_database_space_usage](docs/images/grafana_dashboard_microsoft_sql_server_section_database_space_usage.png)\n\n### Jobs Monitoring\n- **Job Execution Frequency**: Displays the execution count of jobs over the last week.\n- **Job Execution History Duration**: Shows job execution history along with durations.\n- **Jobs in Progress**: Lists jobs that are currently running along with their durations.\n- **Failed Jobs Overview**: Provides an overview of recently failed jobs and their error messages.\n- **Scheduled and Running Jobs**: Displays the status of scheduled and currently running jobs.\n\n![grafana_dashboard_microsoft_sql_server_section_jobs_monitoring](docs/images/grafana_dashboard_microsoft_sql_server_section_jobs_monitoring.png)\n\nYou can directly find the [dashboard here](https://grafana.com/grafana/dashboards/21378-microsoft-sql-server-dashboard/) or use the ID: 21378.\n\n--- \n\nIf you find this project useful, please give it a star ⭐️ ! Your support is greatly appreciated. Also, feel free to contribute to this project. All contributions, whether bug fixes, improvements, or new features, are welcome!\n\n## Stargazers overt time\n[![Stargazers over time](https://starchart.cc/czantoine/microsoft-sql-server-with-grafana.svg?variant=adaptive)](https://starchart.cc/czantoine/microsoft-sql-server-with-grafana)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczantoine%2Fmicrosoft-sql-server-with-grafana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fczantoine%2Fmicrosoft-sql-server-with-grafana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczantoine%2Fmicrosoft-sql-server-with-grafana/lists"}