Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NFS Server metrics collector. #803

Merged
merged 12 commits into from
Feb 12, 2018
Merged

Add NFS Server metrics collector. #803

merged 12 commits into from
Feb 12, 2018

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Jan 26, 2018

Adds support for various Linux NFS Kernel Server metrics read from /proc/net/rpc/nfsd.

Closes: #607

@SuperQ SuperQ requested a review from mdlayher January 26, 2018 15:51
Copy link
Contributor

@mdlayher mdlayher left a comment

Choose a reason for hiding this comment

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

LGTM

)

var (
nfsdReplyCacheHitsDesc = prometheus.NewDesc(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, but I'd make these fields on the nfsdCollector type so you don't pollute the package level with variables.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I'll move things around.

return nil
}

// updateNFSdReplyCacheStats collects statistics for a single XFS filesystem.
Copy link
Contributor

Choose a reason for hiding this comment

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

XFS? :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy pasta!

@SuperQ SuperQ force-pushed the superq/nfsd branch 2 times, most recently from 63db1c1 to 460f5ff Compare January 26, 2018 16:30
@SuperQ
Copy link
Member Author

SuperQ commented Jan 26, 2018

@mdlayher Ok, I moved the desc stuff into the update function, does that seem like the right way to you?

@discordianfish
Copy link
Member

LGTM, beside the help strings.

@mdlayher
Copy link
Contributor

LGTM

ch <- prometheus.MustNewConstMetric(
prometheus.NewDesc(
prometheus.BuildFQName(namespace, nfsdSubsystem, "reply_cache_hits_total"),
"NFSd Reply Cache client did not receive a reply and decided to re-transmit its request and the reply was cached. (bad).",
Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with having an explaination here, but it should still follow the form of metric help strings, e.g "Total number of something something".

Copy link
Member Author

Choose a reason for hiding this comment

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

This was a copy-n-paste from the blog post. I'll clean it up a bit.

@SuperQ SuperQ changed the title WIP: Add NFS Server metrics collector. Add NFS Server metrics collector. Jan 30, 2018
@SuperQ
Copy link
Member Author

SuperQ commented Feb 9, 2018

@discordianfish Ok, I've updated all the help text, PTAL.

@SuperQ SuperQ merged commit 6a04169 into master Feb 12, 2018
@SuperQ SuperQ deleted the superq/nfsd branch February 12, 2018 16:56
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
* Add NFS Server metrics collector.

* Add File Handles metrics.

* Add nfsd IO stats.

* Add metrics for NFSd threads.

* Add metrics for NFSd read ahead cache.

* Add NFSd network traffic counters.

* Add RPC metrics.

* Add V2 requests metrics.

* Add NFSv3 metrics.

* Add NFSv4 metrics.

* Update reply cache comment.

* Update help text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants