Skip to content

Filenotify is a small daemon to write file modification or deletion in log, api, or execute bash-command.

License

Notifications You must be signed in to change notification settings

matgou/filenotify

Repository files navigation

Filenotify

Filenotify is a binary tools for monitoring filesystem modification and store event in influxdb.

Donwload

Installation

Use Make to build and install the binarny

libtoolize
autoreconf
automake --add-missing
./configure 

make && sudo make install

Exemple of usage 

Idea 1 : A Influx/Grafana dashboard of file status

With filenotify daemon, you can store file's presence status in influxdb (and time) to build Grafana dashboard. The goal is to visualise file in directory whitout accessing to server, and keep file modification timestamp.

influxgrafanascreenshot

Idea 2 : A sftp proxy gateway

Filenotify can watch directory and bounce each receive file to an other server. This is usefull when final server is behind a firewall.

graph TB
  subgraph "Intranet"
  FileBoucer[File Bouncer DMZ] --> BuisnessServer[Buisness Server]
  end

  subgraph "Internet"
  RemoteFileSender -. Firewall .-> FileBoucer
  end
Loading

Idea 3 : A clamav live scan agent

TODO : Filenotify can watch directory and call clamav on each file writing.

General usage

bin/filenotify -c filenotify.config -d

Filenotify will listen kernel's inotify event to do some stuff when file creating or deleting. He can store event in influxdb database or log it in a logfile. But he can also lauch a shell script.

graph TB

  SubGraph1 --> SubGraph1Flow

  subgraph "InfluxDB"
  SubGraph1Flow(Http interface)
  SubGraph1Flow --> Database
  end

  subgraph "FileNotify"
  kernel[Inotify Kernel Event] --> daemon[Filenotify daemon]
  daemon --> SubGraph1[Module influxdb]
  daemon --> mlog[Module log]
  mlog --> log[logfile]
  daemon --> mexec[Module exec]
  mexec --> bash[Bash command]
  end
Loading

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU

About

Filenotify is a small daemon to write file modification or deletion in log, api, or execute bash-command.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published