Skip to content

Commit

Permalink
add documentation around configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
symonk committed Jul 22, 2024
1 parent 49608ac commit e1141ef
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,21 @@ log-analyse

-----

## Configuring log-analyse

Log analyse can be configured on a per `glob` basis. It is possible with overlapping globs
that the same file on disk may be traversed, this behaviour is controlled by the `strict`
flag at the top level and duplicate files can cause an exit during the collection phase.

The config is composed of an array of objects, each of which currently supports the following:

* `glob`: A glob pattern for file collection
* `options`: An object of object for all files matching the glob
* `hits`: How many matches before alerting.
* `period`: Over what period should hits be considered before alerting.
* `patterns`: Per line regex patterns for lines of interest.
* `notify`: Which notification mechanism to fire for detections.
* `mode`: Which strategy/mode to apply when scanning the files.


-----

0 comments on commit e1141ef

Please sign in to comment.