Plugins like this provide extra functionality beyond Scout's default monitoring capabilities. This and 90+ other plugins are available via a one-click install in our web interface.

File Stat

File

Monitor whether a file exists and various attributes of that file. Also works on directories, links, pipes, sockets, device files.

Overview

This plugin is able to report the following metrics:

  • status: The path’s status, -3 EACCES (permission denied), -2 ENOENT (does not exist), -1 UNKNOWN, 1 OK (exists and can read stats)
  • ctime: Change time of file in UTC
  • ctime_diff: The ctime difference from now, in seconds
  • mtime: Modification time of file in UTC (seconds since epoch)
  • mtime_diff: The mtime difference from now, in seconds
  • atime: Last access time of file in UTC (seconds since epoch)
  • atime_diff: The atime difference from now, in seconds
  • blksize: The native file system’s block size where file resides
  • blocks: The number of native file system blocks allocated for file
  • dev: An integer representing the device on which stat resides
  • ftype: Identifies the type of file: unknown=-1, file=1, directory=2, characterSpecial=3, blockSpecial=4, fifo=5, link=6, socket=7
  • gid: The numeric group id of the owner of file
  • inode: The inode number for file
  • mode: Integer representing the permission bits of file. Platform dependent; on Unix systems, see stat(2)
  • nlink: The number of hard links to file
  • setgid: 1 (true) if file has the set-group-id permission bit set, 0 (false) otherwise
  • setuid: 1 (true) if file has the set-user-id permission bit set, 0 (false) otherwise
  • size: The size of file in bytes
  • sticky: 1 (true) if file has its sticky bit set, 0 (false) otherwise
  • uid: The numeric user id of the owner