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

Initial XFS collector #568

Merged
merged 1 commit into from Apr 25, 2017
Merged

Initial XFS collector #568

merged 1 commit into from Apr 25, 2017

Conversation

mdlayher
Copy link
Contributor

There are tons more metrics available, but here's a first pass. I tried something a little different to avoid making a big repetitive mess like I did in mountstats.

Fixes #456 .

/r @discordianfish @SuperQ @grobie

@SuperQ
Copy link
Member

SuperQ commented Apr 22, 2017

Do you have a link to the documentation on the xfs stats file format?

"checksumSHA1": "kOWRcAHWFkId0aCIOSOyjzC0Zfc=",
"checksumSHA1": "eiBAd4edewJTOtTwxh/ubJdjd+I=",
"path": "github.com/prometheus/procfs/sysfs",
"revision": "9a96e5d8ebd419449a76f5827bf58d605bd7f7d7",
Copy link
Member

Choose a reason for hiding this comment

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

Let's use the same revision for all packages coming from prometheus/procfs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This must have been an oversight on my part, will fix.

metrics := []struct {
name string
desc string
field float64
Copy link
Member

Choose a reason for hiding this comment

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

We call this the value.

field float64
}{
{
name: "extent_allocation_extents_allocated_total",
Copy link
Member

Choose a reason for hiding this comment

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

Our usual naming pattern for counters is namespace_thing_action_total where action is a noun, like extent_allocations_total, btree_comparisons_total, etc. Your current one is consistent as well, I'll leave it to @SuperQ.

Copy link
Member

Choose a reason for hiding this comment

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

This is why I was wondering about the format documentation. 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to explain the naming scheme with references to the wiki.

@mdlayher
Copy link
Contributor Author

Any more thoughts?

Copy link
Member

@grobie grobie left a comment

Choose a reason for hiding this comment

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

LGTM. The reasoning to follow the XFS wiki metric naming sounds fair.

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

LGTM

@SuperQ SuperQ merged commit 8f3cddf into prometheus:master Apr 25, 2017
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.

None yet

3 participants