Skip to content

User Connections (MSSQL)#21348

Merged
thiagoftsm merged 8 commits intonetdata:masterfrom
thiagoftsm:user_connection
Nov 25, 2025
Merged

User Connections (MSSQL)#21348
thiagoftsm merged 8 commits intonetdata:masterfrom
thiagoftsm:user_connection

Conversation

@thiagoftsm
Copy link
Contributor

@thiagoftsm thiagoftsm commented Nov 25, 2025

Summary

Despite collecting data from Perflib, this PR adds data collection from SQL because it appears to be more reliable when compared to other MSSQL tools.

Test Plan
  1. Compile this branch and generate an installer.
  2. Run it on a server running MSSQL.
Additional Information
For users: How does this change affect me?

Summary by cubic

Add SQL-based collection for MSSQL user connections to improve reliability when Perflib is incomplete. Also adds a config flag to control this collection and updates charts to plot the metric.

  • New Features
    • Collect user connections via SQL: SELECT COUNT(*) FROM sys.dm_exec_sessions WHERE is_user_process = 1.
    • New option: collect user connections (default: yes) to enable/disable this query.
    • Charts updated to plot user connections from the SQL path.
    • Docs updated to include the new option.

Written for commit df56ce5. Summary will update automatically on new commits.

@thiagoftsm thiagoftsm requested a review from stelfrag November 25, 2025 02:20
@github-actions github-actions bot added area/collectors Everything related to data collection area/metadata Integrations metadata collectors/windows labels Nov 25, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="src/collectors/windows.plugin/perflib-mssql.c">

<violation number="1" location="src/collectors/windows.plugin/perflib-mssql.c:423">
Perflib user-connection collection is now gated on `collect_user_connections`, so disabling the SQL probe also disables the perflib fallback and the metric never updates.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

@thiagoftsm thiagoftsm requested a review from stelfrag November 25, 2025 16:27
@thiagoftsm thiagoftsm merged commit d137eb9 into netdata:master Nov 25, 2025
118 checks passed
@thiagoftsm thiagoftsm deleted the user_connection branch November 25, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/collectors Everything related to data collection area/metadata Integrations metadata collectors/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants