You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the directory parameter to a symbolic link that links to a directory, and run Telegraf.
Expected behavior:
File counts and sizes are reported for the directory.
Actual behavior:
Dec 01 14:03:20 SOLARA telegraf[20595]: 2019-12-01T22:03:20Z E! [inputs.filecount] Error in plugin: cannot Walk non-directory: /path/to/a/symlink/that/resolves/to/a/directory
Additional info:
The filecount input depends on karrick/godirwalk, which exposes an option to follow symbolic links:
I'm happy to submit a PR to address this. I'm thinking it would be best to add a new plugin config option, follow_symlinks, so to not introduce any breaking changes.
(I haven't actually tried this yet, but from a quick grok of the code, this seems like the only change needed to support symlinks.)
The text was updated successfully, but these errors were encountered:
Relevant telegraf.conf:
Default config as shown in https://github.com/influxdata/telegraf/blob/master/plugins/inputs/filecount/README.md#configuration
Steps to reproduce:
Set the
directory
parameter to a symbolic link that links to a directory, and run Telegraf.Expected behavior:
File counts and sizes are reported for the directory.
Actual behavior:
Additional info:
The filecount input depends on karrick/godirwalk, which exposes an option to follow symbolic links:
https://github.com/karrick/godirwalk/blob/master/walk.go#L35
It doesn't seem to be enabled currently:
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/filecount/filecount.go#L207
I'm happy to submit a PR to address this. I'm thinking it would be best to add a new plugin config option,
follow_symlinks
, so to not introduce any breaking changes.(I haven't actually tried this yet, but from a quick grok of the code, this seems like the only change needed to support symlinks.)
The text was updated successfully, but these errors were encountered: