-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 socket stat collection for systemd socket units #968
Conversation
Oh, very cool! |
Would you mind adding an entry to the CHANGELOG.md file?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general but would be great to have some tests for this.
I've added the changelog entry, I'll add some tests for this feature this week. |
In terms of testing, reading over the coreos/dbus documentation, there's no straightforward way to set up these counters in a mocked unit: https://godoc.org/github.com/coreos/go-systemd/dbus#UnitStatus. I can probably hack something into a Property, but that seems like shoehorning something in that should not be there (https://godoc.org/github.com/coreos/go-systemd/dbus#Property). Alternatively, I can add a call to |
@xginn8 Yes. let's just call collectSockets there and merge it for now. |
Updated as requested, @discordianfish PTAL! |
LGTM, @SuperQ? |
Looks like it needs a rebase, but otherwise LGTM. |
Signed-off-by: xginn8 <[email protected]>
@SuperQ the commits have been rebased. thanks for looking! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: xginn8 <[email protected]>
Query dbus for each socket unit's connection statistics.