mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-08-20 18:33:52 -07:00
Merge 566270cf4d
into be19d537cd
This commit is contained in:
commit
5119cedd59
|
@ -2267,44 +2267,44 @@ node_mountstats_nfs_total_write_bytes_total{export="192.168.1.1:/srv/test",mount
|
||||||
node_mountstats_nfs_total_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_total_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
||||||
# HELP node_mountstats_nfs_transport_backlog_queue_total Total number of items added to the RPC backlog queue.
|
# HELP node_mountstats_nfs_transport_backlog_queue_total Total number of items added to the RPC backlog queue.
|
||||||
# TYPE node_mountstats_nfs_transport_backlog_queue_total counter
|
# TYPE node_mountstats_nfs_transport_backlog_queue_total counter
|
||||||
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 0
|
||||||
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_bad_transaction_ids_total Number of times the NFS server sent a response with a transaction ID unknown to this client.
|
# HELP node_mountstats_nfs_transport_bad_transaction_ids_total Number of times the NFS server sent a response with a transaction ID unknown to this client.
|
||||||
# TYPE node_mountstats_nfs_transport_bad_transaction_ids_total counter
|
# TYPE node_mountstats_nfs_transport_bad_transaction_ids_total counter
|
||||||
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 0
|
||||||
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_bind_total Number of times the client has had to establish a connection from scratch to the NFS server.
|
# HELP node_mountstats_nfs_transport_bind_total Number of times the client has had to establish a connection from scratch to the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_bind_total counter
|
# TYPE node_mountstats_nfs_transport_bind_total counter
|
||||||
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 0
|
||||||
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_connect_total Number of times the client has made a TCP connection to the NFS server.
|
# HELP node_mountstats_nfs_transport_connect_total Number of times the client has made a TCP connection to the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_connect_total counter
|
# TYPE node_mountstats_nfs_transport_connect_total counter
|
||||||
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 1
|
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 1
|
||||||
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_idle_time_seconds Duration since the NFS mount last saw any RPC traffic, in seconds.
|
# HELP node_mountstats_nfs_transport_idle_time_seconds Duration since the NFS mount last saw any RPC traffic, in seconds.
|
||||||
# TYPE node_mountstats_nfs_transport_idle_time_seconds gauge
|
# TYPE node_mountstats_nfs_transport_idle_time_seconds gauge
|
||||||
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 11
|
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 11
|
||||||
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_maximum_rpc_slots Maximum number of simultaneously active RPC requests ever used.
|
# HELP node_mountstats_nfs_transport_maximum_rpc_slots Maximum number of simultaneously active RPC requests ever used.
|
||||||
# TYPE node_mountstats_nfs_transport_maximum_rpc_slots gauge
|
# TYPE node_mountstats_nfs_transport_maximum_rpc_slots gauge
|
||||||
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 24
|
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 24
|
||||||
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 24
|
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 24
|
||||||
# HELP node_mountstats_nfs_transport_pending_queue_total Total number of items added to the RPC transmission pending queue.
|
# HELP node_mountstats_nfs_transport_pending_queue_total Total number of items added to the RPC transmission pending queue.
|
||||||
# TYPE node_mountstats_nfs_transport_pending_queue_total counter
|
# TYPE node_mountstats_nfs_transport_pending_queue_total counter
|
||||||
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 5726
|
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 5726
|
||||||
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 5726
|
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 5726
|
||||||
# HELP node_mountstats_nfs_transport_receives_total Number of RPC responses for this mount received from the NFS server.
|
# HELP node_mountstats_nfs_transport_receives_total Number of RPC responses for this mount received from the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_receives_total counter
|
# TYPE node_mountstats_nfs_transport_receives_total counter
|
||||||
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 6428
|
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 6428
|
||||||
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 6428
|
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 6428
|
||||||
# HELP node_mountstats_nfs_transport_sending_queue_total Total number of items added to the RPC transmission sending queue.
|
# HELP node_mountstats_nfs_transport_sending_queue_total Total number of items added to the RPC transmission sending queue.
|
||||||
# TYPE node_mountstats_nfs_transport_sending_queue_total counter
|
# TYPE node_mountstats_nfs_transport_sending_queue_total counter
|
||||||
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 26
|
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 26
|
||||||
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 26
|
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 26
|
||||||
# HELP node_mountstats_nfs_transport_sends_total Number of RPC requests for this mount sent to the NFS server.
|
# HELP node_mountstats_nfs_transport_sends_total Number of RPC requests for this mount sent to the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_sends_total counter
|
# TYPE node_mountstats_nfs_transport_sends_total counter
|
||||||
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 6428
|
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 6428
|
||||||
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 6428
|
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 6428
|
||||||
# HELP node_mountstats_nfs_write_bytes_total Number of bytes written using the write() syscall.
|
# HELP node_mountstats_nfs_write_bytes_total Number of bytes written using the write() syscall.
|
||||||
# TYPE node_mountstats_nfs_write_bytes_total counter
|
# TYPE node_mountstats_nfs_write_bytes_total counter
|
||||||
node_mountstats_nfs_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
||||||
|
|
|
@ -2289,44 +2289,44 @@ node_mountstats_nfs_total_write_bytes_total{export="192.168.1.1:/srv/test",mount
|
||||||
node_mountstats_nfs_total_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_total_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
||||||
# HELP node_mountstats_nfs_transport_backlog_queue_total Total number of items added to the RPC backlog queue.
|
# HELP node_mountstats_nfs_transport_backlog_queue_total Total number of items added to the RPC backlog queue.
|
||||||
# TYPE node_mountstats_nfs_transport_backlog_queue_total counter
|
# TYPE node_mountstats_nfs_transport_backlog_queue_total counter
|
||||||
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 0
|
||||||
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_backlog_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_bad_transaction_ids_total Number of times the NFS server sent a response with a transaction ID unknown to this client.
|
# HELP node_mountstats_nfs_transport_bad_transaction_ids_total Number of times the NFS server sent a response with a transaction ID unknown to this client.
|
||||||
# TYPE node_mountstats_nfs_transport_bad_transaction_ids_total counter
|
# TYPE node_mountstats_nfs_transport_bad_transaction_ids_total counter
|
||||||
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 0
|
||||||
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_bad_transaction_ids_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_bind_total Number of times the client has had to establish a connection from scratch to the NFS server.
|
# HELP node_mountstats_nfs_transport_bind_total Number of times the client has had to establish a connection from scratch to the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_bind_total counter
|
# TYPE node_mountstats_nfs_transport_bind_total counter
|
||||||
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 0
|
||||||
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_bind_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_connect_total Number of times the client has made a TCP connection to the NFS server.
|
# HELP node_mountstats_nfs_transport_connect_total Number of times the client has made a TCP connection to the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_connect_total counter
|
# TYPE node_mountstats_nfs_transport_connect_total counter
|
||||||
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 1
|
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 1
|
||||||
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_connect_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_idle_time_seconds Duration since the NFS mount last saw any RPC traffic, in seconds.
|
# HELP node_mountstats_nfs_transport_idle_time_seconds Duration since the NFS mount last saw any RPC traffic, in seconds.
|
||||||
# TYPE node_mountstats_nfs_transport_idle_time_seconds gauge
|
# TYPE node_mountstats_nfs_transport_idle_time_seconds gauge
|
||||||
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 11
|
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 11
|
||||||
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 0
|
node_mountstats_nfs_transport_idle_time_seconds{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 0
|
||||||
# HELP node_mountstats_nfs_transport_maximum_rpc_slots Maximum number of simultaneously active RPC requests ever used.
|
# HELP node_mountstats_nfs_transport_maximum_rpc_slots Maximum number of simultaneously active RPC requests ever used.
|
||||||
# TYPE node_mountstats_nfs_transport_maximum_rpc_slots gauge
|
# TYPE node_mountstats_nfs_transport_maximum_rpc_slots gauge
|
||||||
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 24
|
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 24
|
||||||
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 24
|
node_mountstats_nfs_transport_maximum_rpc_slots{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 24
|
||||||
# HELP node_mountstats_nfs_transport_pending_queue_total Total number of items added to the RPC transmission pending queue.
|
# HELP node_mountstats_nfs_transport_pending_queue_total Total number of items added to the RPC transmission pending queue.
|
||||||
# TYPE node_mountstats_nfs_transport_pending_queue_total counter
|
# TYPE node_mountstats_nfs_transport_pending_queue_total counter
|
||||||
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 5726
|
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 5726
|
||||||
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 5726
|
node_mountstats_nfs_transport_pending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 5726
|
||||||
# HELP node_mountstats_nfs_transport_receives_total Number of RPC responses for this mount received from the NFS server.
|
# HELP node_mountstats_nfs_transport_receives_total Number of RPC responses for this mount received from the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_receives_total counter
|
# TYPE node_mountstats_nfs_transport_receives_total counter
|
||||||
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 6428
|
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 6428
|
||||||
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 6428
|
node_mountstats_nfs_transport_receives_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 6428
|
||||||
# HELP node_mountstats_nfs_transport_sending_queue_total Total number of items added to the RPC transmission sending queue.
|
# HELP node_mountstats_nfs_transport_sending_queue_total Total number of items added to the RPC transmission sending queue.
|
||||||
# TYPE node_mountstats_nfs_transport_sending_queue_total counter
|
# TYPE node_mountstats_nfs_transport_sending_queue_total counter
|
||||||
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 26
|
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 26
|
||||||
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 26
|
node_mountstats_nfs_transport_sending_queue_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 26
|
||||||
# HELP node_mountstats_nfs_transport_sends_total Number of RPC requests for this mount sent to the NFS server.
|
# HELP node_mountstats_nfs_transport_sends_total Number of RPC requests for this mount sent to the NFS server.
|
||||||
# TYPE node_mountstats_nfs_transport_sends_total counter
|
# TYPE node_mountstats_nfs_transport_sends_total counter
|
||||||
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 6428
|
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp",transport="0"} 6428
|
||||||
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp"} 6428
|
node_mountstats_nfs_transport_sends_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="udp",transport="0"} 6428
|
||||||
# HELP node_mountstats_nfs_write_bytes_total Number of bytes written using the write() syscall.
|
# HELP node_mountstats_nfs_write_bytes_total Number of bytes written using the write() syscall.
|
||||||
# TYPE node_mountstats_nfs_write_bytes_total counter
|
# TYPE node_mountstats_nfs_write_bytes_total counter
|
||||||
node_mountstats_nfs_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
node_mountstats_nfs_write_bytes_total{export="192.168.1.1:/srv/test",mountaddr="192.168.1.1",protocol="tcp"} 0
|
||||||
|
|
|
@ -19,6 +19,7 @@ package collector
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/procfs"
|
"github.com/prometheus/procfs"
|
||||||
|
@ -127,8 +128,9 @@ func NewMountStatsCollector(logger *slog.Logger) (Collector, error) {
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
labels = []string{"export", "protocol", "mountaddr"}
|
labels = []string{"export", "protocol", "mountaddr"}
|
||||||
opLabels = []string{"export", "protocol", "mountaddr", "operation"}
|
opLabels = []string{"export", "protocol", "mountaddr", "operation"}
|
||||||
|
translabels = []string{"export", "protocol", "mountaddr", "transport"}
|
||||||
)
|
)
|
||||||
|
|
||||||
return &mountStatsCollector{
|
return &mountStatsCollector{
|
||||||
|
@ -198,70 +200,70 @@ func NewMountStatsCollector(logger *slog.Logger) (Collector, error) {
|
||||||
NFSTransportBindTotal: prometheus.NewDesc(
|
NFSTransportBindTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_bind_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_bind_total"),
|
||||||
"Number of times the client has had to establish a connection from scratch to the NFS server.",
|
"Number of times the client has had to establish a connection from scratch to the NFS server.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportConnectTotal: prometheus.NewDesc(
|
NFSTransportConnectTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_connect_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_connect_total"),
|
||||||
"Number of times the client has made a TCP connection to the NFS server.",
|
"Number of times the client has made a TCP connection to the NFS server.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportIdleTimeSeconds: prometheus.NewDesc(
|
NFSTransportIdleTimeSeconds: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_idle_time_seconds"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_idle_time_seconds"),
|
||||||
"Duration since the NFS mount last saw any RPC traffic, in seconds.",
|
"Duration since the NFS mount last saw any RPC traffic, in seconds.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportSendsTotal: prometheus.NewDesc(
|
NFSTransportSendsTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_sends_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_sends_total"),
|
||||||
"Number of RPC requests for this mount sent to the NFS server.",
|
"Number of RPC requests for this mount sent to the NFS server.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportReceivesTotal: prometheus.NewDesc(
|
NFSTransportReceivesTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_receives_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_receives_total"),
|
||||||
"Number of RPC responses for this mount received from the NFS server.",
|
"Number of RPC responses for this mount received from the NFS server.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportBadTransactionIDsTotal: prometheus.NewDesc(
|
NFSTransportBadTransactionIDsTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_bad_transaction_ids_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_bad_transaction_ids_total"),
|
||||||
"Number of times the NFS server sent a response with a transaction ID unknown to this client.",
|
"Number of times the NFS server sent a response with a transaction ID unknown to this client.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportBacklogQueueTotal: prometheus.NewDesc(
|
NFSTransportBacklogQueueTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_backlog_queue_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_backlog_queue_total"),
|
||||||
"Total number of items added to the RPC backlog queue.",
|
"Total number of items added to the RPC backlog queue.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportMaximumRPCSlots: prometheus.NewDesc(
|
NFSTransportMaximumRPCSlots: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_maximum_rpc_slots"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_maximum_rpc_slots"),
|
||||||
"Maximum number of simultaneously active RPC requests ever used.",
|
"Maximum number of simultaneously active RPC requests ever used.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportSendingQueueTotal: prometheus.NewDesc(
|
NFSTransportSendingQueueTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_sending_queue_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_sending_queue_total"),
|
||||||
"Total number of items added to the RPC transmission sending queue.",
|
"Total number of items added to the RPC transmission sending queue.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
NFSTransportPendingQueueTotal: prometheus.NewDesc(
|
NFSTransportPendingQueueTotal: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(namespace, subsystem, "transport_pending_queue_total"),
|
prometheus.BuildFQName(namespace, subsystem, "transport_pending_queue_total"),
|
||||||
"Total number of items added to the RPC transmission pending queue.",
|
"Total number of items added to the RPC transmission pending queue.",
|
||||||
labels,
|
translabels,
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -618,74 +620,76 @@ func (c *mountStatsCollector) updateNFSStats(ch chan<- prometheus.Metric, s *pro
|
||||||
)
|
)
|
||||||
|
|
||||||
for i := range s.Transport {
|
for i := range s.Transport {
|
||||||
|
translabelValues := []string{export, protocol, mountAddress, strconv.Itoa(i)}
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportBindTotal,
|
c.NFSTransportBindTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].Bind),
|
float64(s.Transport[i].Bind),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportConnectTotal,
|
c.NFSTransportConnectTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].Connect),
|
float64(s.Transport[i].Connect),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportIdleTimeSeconds,
|
c.NFSTransportIdleTimeSeconds,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(s.Transport[i].IdleTimeSeconds%float64Mantissa),
|
float64(s.Transport[i].IdleTimeSeconds%float64Mantissa),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportSendsTotal,
|
c.NFSTransportSendsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].Sends),
|
float64(s.Transport[i].Sends),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportReceivesTotal,
|
c.NFSTransportReceivesTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].Receives),
|
float64(s.Transport[i].Receives),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportBadTransactionIDsTotal,
|
c.NFSTransportBadTransactionIDsTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].BadTransactionIDs),
|
float64(s.Transport[i].BadTransactionIDs),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportBacklogQueueTotal,
|
c.NFSTransportBacklogQueueTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].CumulativeBacklog),
|
float64(s.Transport[i].CumulativeBacklog),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportMaximumRPCSlots,
|
c.NFSTransportMaximumRPCSlots,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(s.Transport[i].MaximumRPCSlotsUsed),
|
float64(s.Transport[i].MaximumRPCSlotsUsed),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportSendingQueueTotal,
|
c.NFSTransportSendingQueueTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].CumulativeSendingQueue),
|
float64(s.Transport[i].CumulativeSendingQueue),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.NFSTransportPendingQueueTotal,
|
c.NFSTransportPendingQueueTotal,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
float64(s.Transport[i].CumulativePendingQueue),
|
float64(s.Transport[i].CumulativePendingQueue),
|
||||||
labelValues...,
|
translabelValues...,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue