mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 18:19:04 +02:00
3.7 KiB
3.7 KiB
smb collector
The collector reads the SMB Server Shares PDH object with
pdh.CounterTypeRaw. The object comes with the SMB server (LanmanServer)
and is multi-instance, one instance per share. These notes were recorded on a
Windows Server 2025 (build 26100) domain controller running as a Hyper-V
guest.
- Instance names are UNC paths with
*as the host, for example\\*\IPC$,\\*\SYSVOLand\\*\NETLOGON. Scoped shares use the scope name instead, here\\MSCLUSTER\ClusterStorage$. There is also an aggregate_Total, whichinternal/pdhdrops because the collector asks forpdh.InstancesAll. The instance name is thesharelabel. Current Open File CountandTree Connect Countare gauges: the help text calls them the handles "currently open" and "the current number of tree connects". With one test client connected,\\*\SmbClientTesthadTree Connect Count1 andCurrent Open File Count1.- The
/seccounters (PERF_COUNTER_BULK_COUNTandPERF_COUNTER_COUNTER) are cumulative.Files Opened/secwas 28 on\\*\SYSVOLwhile its open file count was 0. Received Bytes/secandSent Bytes/secare bytes and include SMB protocol data such as packet headers, per the help text.- The sample instance
\\*\ADMIN$had no traffic, so all its values are 0.
Counter reference
Recorded on Windows Server 2025 (build 26100). Raw and Base are the first and second
values that pdh.CounterTypeRaw returns for the sample instance.
SMB Server Shares
Multi-instance. Instances: \\*\ADMIN$, \\*\C$, \\*\IPC$, \\*\MSCLUSTER, \\*\NETLOGON, \\*\SmbClientTest, \\*\SYSVOL, \\MSCLUSTER\ClusterStorage$, ... (9 in total). Sample instance: \\*\ADMIN$.
Counters the collector reads:
| Counter | Type | Raw | Base |
|---|---|---|---|
Current Open File Count |
PERF_COUNTER_LARGE_RAWCOUNT |
0 | |
Files Opened/sec |
PERF_COUNTER_BULK_COUNT |
0 | |
Metadata Requests/sec |
PERF_COUNTER_BULK_COUNT |
0 | |
Read Requests/sec |
PERF_COUNTER_COUNTER |
0 | |
Received Bytes/sec |
PERF_COUNTER_BULK_COUNT |
0 | |
Sent Bytes/sec |
PERF_COUNTER_BULK_COUNT |
0 | |
Tree Connect Count |
PERF_COUNTER_LARGE_RAWCOUNT |
0 | |
Write Requests/sec |
PERF_COUNTER_COUNTER |
0 |
Not read by the collector:
PERF_AVERAGE_BULK:Avg. Bytes/Read,Avg. Bytes/Write,Avg. Data Bytes/RequestPERF_AVERAGE_TIMER:Avg. sec/Data Request,Avg. sec/Read,Avg. sec/Request,Avg. sec/WritePERF_COUNTER_100NS_QUEUELEN_TYPE:Avg. Data Queue Length,Avg. Read Queue Length,Avg. Write Queue LengthPERF_COUNTER_BULK_COUNT:Attempted Compressed Responses/sec,Bytes Compressed/sec,Compressed Requests/sec,Data Bytes/sec,Read Bytes transmitted ByPassCSV/sec,Read Bytes transmitted via SMB Direct/sec,Read Bytes/sec,Requests/sec,Successful Compressed Responses/sec,Transferred Bytes/sec,Write Bytes transmitted ByPassCSV/sec,Write Bytes transmitted via SMB Direct/sec,Write Bytes/secPERF_COUNTER_COUNTER:Data Requests/sec,Read Requests transmitted via BypassCSV/sec,Read Requests transmitted via SMB Direct/sec,Write Requests transmitted via BypassCSV/sec,Write Requests transmitted via SMB Direct/secPERF_COUNTER_LARGE_RAWCOUNT:Current Bypass Open File Count,Current Data Queue Length,Current Durable Open File Count,Current Pending Requests,Total Durable Handle Reopen Count,Total Failed Durable Handle Reopen Count,Total Failed Persistent Handle Reopen Count,Total Failed Resilient Handle Reopen Count,Total File Open Count,Total Persistent Handle Reopen Count,Total Resilient Handle Reopen CountPERF_LARGE_RAW_FRACTION:% Persistent Handles,% Resilient Handles