A YAML file is a simplified object notation file, in that I can read in the file directly into my program's config data structures and validate the input for sanity... Then I would use your config data as the criteria to do the blocking... I would invite you to look at the Wikipedia pages for both JSON and YAML, as you have the proclivity to learn new things...
YAML is basically the config file you would use if you plan to edit it manually
JSON is usually a better fit for a config file that is handled directly by a program
YAML and JSON are usually interchangeable in that they are both textual object representations, one is more for humans and the other is more for programs to store (marshalling) their configuration data or communicate object data to other programs...
In short, you would create the YAML file in a text editor,
paying attention to the spacing, and uploading it in Unix mode to ensure it only contains LF (LineFeed) terminators... This YAML or JSON file is just an intermediate step until the configuration controls are placed into the CNC and we'll store the config files automatically...
As far as the configuration, what the default will cause the scanner to do is:
1) scan your log file data in realtime
2) record each 404 log lines IP address
3) if same IP has more than 3 (maxretry) 404's within a 600 (findtime) second time window, then firewall (REJECT) their IP for 600 (bantime) seconds
Given this will be written for scale, I will probably write this in the Go language (golang) as it is a natural fit for running many watchers in concurrency and being crazy fast about it in the process...
As it stands now, I'm thinking about the implementation, and I may tie this into another subsystem I'm writing for inline log file rotations... I'm rewriting it from scratch because I wasn't happy with its processing overhead, not to mention it didn't handle the leap second properly which led to a brief amount of schizophrenia on our testing sites... Going this route, I can dispense completely with the inotify complexity and attain K.I.S.S. realtime operational properties... Once the data structures are mapped out, the actual implementation will become less in flux and the direction it wants to go will make itself (organically) apparent...