mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 18:19:04 +02:00
smb: fix metric types and names, extend 32-bit counters in smb and smbclient (#2710)
Signed-off-by: Claude <noreply@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
39277da8e5
commit
9015955cfa
@@ -17,14 +17,16 @@ None
|
||||
## Metrics
|
||||
Name | Description | Type | Labels
|
||||
-----|-------------|------|-------
|
||||
`windows_smb_server_shares_current_open_file_count` | Current total count open files on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_tree_connect_count` | Count of user connections to the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_current_open_file_count` | Current total count open files on the SMB Server Share | gauge | `share`
|
||||
`windows_smb_server_shares_tree_connect_count` | Count of user connections to the SMB Server Share | gauge | `share`
|
||||
`windows_smb_server_shares_received_bytes_total` | Received bytes on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_write_requests_count_total` | Writes requests on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_read_requests_count_total` | Read requests on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_metadata_requests_count_total` | Metadata requests on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_write_requests_total` | Writes requests on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_read_requests_total` | Read requests on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_metadata_requests_total` | Metadata requests on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_sent_bytes_total` | Sent bytes on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_files_opened_count_total` | Files opened on the SMB Server Share | counter | `share`
|
||||
`windows_smb_server_shares_files_opened_total` | Files opened on the SMB Server Share | counter | `share`
|
||||
|
||||
Windows keeps `Read Requests/sec` and `Write Requests/sec` as 32-bit raw counters. The collector extends them past 2^32 per share, so `read_requests_total` and `write_requests_total` don't drop back to a low value when the raw counter wraps. The extended value starts at the raw value and follows the raw counter when the share restarts.
|
||||
|
||||
### Example metric
|
||||
_This collector does not yet have explained examples, we would appreciate your help adding them!_
|
||||
|
||||
@@ -35,6 +35,11 @@ Name | Description | Type | Labels
|
||||
`windows_smbclient_write_requests_total` | The write requests on this share | counter | `server`, `share`|
|
||||
`windows_smbclient_read_seconds_total` | Seconds waiting for read requests on this share | counter | `server`, `share`|
|
||||
`windows_smbclient_write_seconds_total` | Seconds waiting for write requests on this share | counter | `server`, `share`|
|
||||
|
||||
Windows keeps several raw counters at 32 bits: the time sums behind `read_seconds_total`, `write_seconds_total` and `request_seconds_total`, and the counts behind `requests_total`, `read_requests_total`, `write_requests_total`, `metadata_requests_total`, `stalls_total`, `turbo_io_reads_total`, `turbo_io_writes_total`, `read_requests_via_smbdirect_total` and `write_requests_via_smbdirect_total`. The collector extends them past 2^32 per share, so they don't drop back to a low value when the raw counter wraps. The extended value starts at the raw value and follows the raw counter when the share reconnects.
|
||||
|
||||
The time sums wrap after 2^32 ticks, about 430 seconds of summed request time, and that sum grows by one second per second for each outstanding request. The collector can only detect one wrap between two scrapes, so with about 7 or more requests outstanding on average over a 60 second scrape interval, the `*_seconds_total` values undercount. Scrape more often on busy shares.
|
||||
|
||||
## Useful queries
|
||||
```
|
||||
# Average request queue length (includes read and write).
|
||||
|
||||
Reference in New Issue
Block a user