aboutsummaryrefslogtreecommitdiffstats
path: root/templates/usr_local_etc_pylogsentinel.conf.j2
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-10-15 09:21:37 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-10-15 09:21:37 +0300
commit28b9f0736e43d188abc8a5b63eee1e428cca2935 (patch)
tree8f99c06addb532e7a2200ced634b2f0c60aae9e1 /templates/usr_local_etc_pylogsentinel.conf.j2
parent9105c2d8936b0256e5aa3068fbeb7cc440144968 (diff)
Add pylogsentinel
Diffstat (limited to 'templates/usr_local_etc_pylogsentinel.conf.j2')
-rw-r--r--templates/usr_local_etc_pylogsentinel.conf.j213
1 files changed, 13 insertions, 0 deletions
diff --git a/templates/usr_local_etc_pylogsentinel.conf.j2 b/templates/usr_local_etc_pylogsentinel.conf.j2
new file mode 100644
index 0000000..8eb154a
--- /dev/null
+++ b/templates/usr_local_etc_pylogsentinel.conf.j2
@@ -0,0 +1,13 @@
+[system]
+state_dir = /var/run/pylogsentinel
+max_block_size = 10M
+
+[logs]
+cmd = find / -type d -path '*/var/log'
+
+[action.default]
+cmd = echo -e "---------\nMatched $RULE_ID in $FILE at line $LINE, context:\n\n$CONTEXT\n" >> /tmp/pylogsentinel.daily
+
+[rule.error]
+description = Error-like conditions
+pattern = /(error|fatal|exception|kill|crash)/i