-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfiguration.edn
51 lines (41 loc) · 2 KB
/
configuration.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; A semicolon comments everything until the end of the line.
; Whole configuration is a nested map of key-value pairs. In EDN, map starts by '{' and ends by '}'.
{
; Bellow is configuration of all files to be watched.
:files
{
; Key in the ':files' map is a string denoting file path (relative or absolute),
; value is another map containing file-specific options.
; Note: On all platforms, it is better to use forward slashes in the file path.
; This is a log file in which we are interested in ERROR-level messages only.
; Also, the file belongs to file group named "A".
; Note that the file groups are completely optional.
"test/resources/errors.log"
{
; Java regular expression for ERROR-level messages.
; An alert is raised when a matching line is found in the file.
:line-regex "^ERROR.*$"
; File group into which this file belongs (Optional key-value pair).
:file-group "A"
; Optional per-file options
; Don't rely of reported file size and last modification timestamp. Check the file always.
; Note: If this override is enabled, consider making the ":check-interval-ms" higher.
;:always-check-override true
; Never try to skip bytes that have (supposedly) been read during the last file check. Read the whole file.
; Note: If this override is enabled, consider making the ":check-interval-ms" higher.
;:never-seek-override true
}
; Configuration of another file to check. This time we are interested also
; in WARN-level messages.
"/home/user/log-watchdog/test/resources/warns.log"
{
:line-regex "^(ERROR|WARN).*$"
:file-group "A"
}
}
; Application-wide options.
; How often should all the files be checked for new alert lines?
:check-interval-ms 1000
; How often can the app show notification when there are alerts with unacknowledged alerts?
:nagging-interval-ms 60000
}