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

Per-directory file counts in the Filecount plugin #4752

Merged
merged 8 commits into from
Oct 5, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove debug log
  • Loading branch information
Jaeyo committed Sep 26, 2018
commit a3834858ac1d871225d09fa37337648839cc7cf5
2 changes: 0 additions & 2 deletions plugins/inputs/filecount/filecount.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ func absDuration(x time.Duration) time.Duration {
func (fc *FileCount) count(acc telegraf.Accumulator, basedir string, recursive bool) {
numFiles := int64(0)
walkFn := func(path string, file os.FileInfo, err error) error {
fmt.Println("###, cp2, path: ", path)
if path == basedir {
return nil
}
Expand All @@ -154,7 +153,6 @@ func (fc *FileCount) count(acc telegraf.Accumulator, basedir string, recursive b
return
}

fmt.Println("###, cp1, numFiles", numFiles)
acc.AddFields("filecount",
map[string]interface{}{
"count": numFiles,
Expand Down