Refactor NFS client collector (#816)
* Update vendor github.com/prometheus/procfs/... * Refactor NFS collector Use new procfs library to parse NFS client stats. * Ignore nfs proc file not existing. * Refactor with reflection to walk the structs.
This commit is contained in:
parent
52c031890e
commit
01bd99fb1a
5 changed files with 202 additions and 156 deletions
4
vendor/github.com/prometheus/procfs/fs.go
generated
vendored
4
vendor/github.com/prometheus/procfs/fs.go
generated
vendored
|
|
@ -46,8 +46,8 @@ func (fs FS) XFSStats() (*xfs.Stats, error) {
|
|||
return xfs.ParseStats(f)
|
||||
}
|
||||
|
||||
// NFSdClientRPCStats retrieves NFS daemon RPC statistics.
|
||||
func (fs FS) NFSdClientRPCStats() (*nfs.ClientRPCStats, error) {
|
||||
// NFSClientRPCStats retrieves NFS client RPC statistics.
|
||||
func (fs FS) NFSClientRPCStats() (*nfs.ClientRPCStats, error) {
|
||||
f, err := os.Open(fs.Path("net/rpc/nfs"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue