-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Use golang.org/x/sys/unix instead of syscall in diskio #3384
Conversation
plugins/inputs/system/disk.go
Outdated
@@ -166,14 +167,13 @@ func (s *DiskIOStats) Gather(acc telegraf.Accumulator) error { | |||
var varRegex = regexp.MustCompile(`\$(?:\w+|\{\w+\})`) | |||
|
|||
func (s *DiskIOStats) diskName(devName string) string { | |||
// if len(s.NameTemplates) == 0 { |
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.
Commented out so that the diskInfo code will still be exercised as before, will skip it when not using this option.
plugins/inputs/system/disk.go
Outdated
@@ -200,14 +200,13 @@ func (s *DiskIOStats) diskName(devName string) string { | |||
} | |||
|
|||
func (s *DiskIOStats) diskTags(devName string) map[string]string { | |||
// if len(s.DeviceTags) == 0 { |
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.
Same as above
@jackzampolin Can you retest with this code? |
Just built it and pushing up to server |
It's hard to type but my fingers are crossed. |
Still no panics, and since the bug tended to present quickly I'm going to go ahead and say MERGE IT! |
(cherry picked from commit 9a06249)
This pull request is currently for testing only, it might fix the crash reported in #3373, #3299.
Required for all PRs: