Add modification_time field to filestat input plugin (#3305)

This commit is contained in:
Pierre Tessier
2017-11-07 17:32:48 -05:00
committed by Daniel Nelson
parent 5141f8a2a0
commit dcff769fed
3 changed files with 65 additions and 56 deletions

View File

@@ -86,6 +86,7 @@ func (f *FileStat) Gather(acc telegraf.Accumulator) error {
fileName)
} else {
fields["size_bytes"] = fileInfo.Size()
fields["modification_time"] = fileInfo.ModTime().UnixNano()
}
if f.Md5 {