Upgraded version

This commit is contained in:
2025-10-16 00:03:31 +02:00
parent 0b5559be69
commit c67b2b54c8
2 changed files with 134 additions and 79 deletions

View File

@@ -1,43 +1,72 @@
{
"log-fetcher":{
"type": "loki",
"config": {
"url": "http://fileserver.home:3100"
"log-fetchers": [
{
"name": "loki-fileserver",
"type": "loki",
"config": {
"url": "http://fileserver.home:3100"
}
}
},
"alert-manager":{
"type": "gotify",
"config": {
"url": "https://paris.nappez.com/gotify/message",
"token-from-env": "{GOTIFY_TOKEN}"
],
"alert-managers":[
{
"name": "gotify-paris",
"type": "gotify",
"config": {
"url": "https://paris.nappez.com/gotify/message",
"token-from-env": "{GOTIFY_TOKEN}"
}
}
},
"check-interval": 60,
],
"log-alerts": [
{
"name": "SSH outside connection",
"filters": {
"labels": {
"container": "openssh-server"
},
"text": "Accepted",
"match": "Accepted (?P<method>\\w+) for (?P<username>\\w+) from (?P<ip>[^\\s]+)"
"check-interval": 60,
"log-fetcher": {
"name": "loki-fileserver",
"filters": {
"labels": {
"container": "openssh-server"
},
"text": "Accepted"
}
},
"alert": {
"filters": [
{
"type": "regexp",
"config": {
"match": "Accepted (?P<method>\\w+) for (?P<username>\\w+) from (?P<ip>[^\\s]+)"
}
}
],
"alert-manager": {
"name": "gotify-paris",
"title": "Outside SSH login",
"message": "New SSH login for {username} on {instance} from ip {ip} (method: {method})"
}
},
{
"name": "SSH local connection",
"filters": {
"labels": {
"filename": "/var/log/host/auth.log"
},
"text": "Accepted",
"match": "Accepted (?P<method>\\w+) for (?P<username>\\w+) from (?P<ip>[^\\s]+)"
"check-interval": 30,
"log-fetcher": {
"name": "loki-fileserver",
"filters": {
"labels": {
"filename": "/var/log/host/auth.log"
},
"text": "Accepted"
}
},
"alert": {
"filters": [
{
"type": "regexp",
"config": {
"match": "Accepted (?P<method>\\w+) for (?P<username>\\w+) from (?P<ip>[^\\s]+)"
}
}
],
"alert-manager": {
"name": "gotify-paris",
"title": "Local SSH login",
"message": "New SSH login for {username} on {instance} from ip {ip} (method: {method})"
}