Config changes.
This commit is contained in:
+13
-13
@@ -2,9 +2,11 @@ http:
|
|||||||
pprof:
|
pprof:
|
||||||
port: 6060
|
port: 6060
|
||||||
enabled: false
|
enabled: false
|
||||||
address: 127.0.0.1:45158
|
address: 0.0.0.0:80
|
||||||
session_ttl: 720h
|
session_ttl: 720h
|
||||||
users: []
|
users:
|
||||||
|
- name: admin
|
||||||
|
password: {{ lookup('community.hashi_vault.vault_kv2_get', 'env', engine_mount_point='rikku-docker', url=vault_addr, token=vault_token_cleaned)['secret']['ADGUARD_BCRYPT'] }}
|
||||||
auth_attempts: 5
|
auth_attempts: 5
|
||||||
block_auth_min: 15
|
block_auth_min: 15
|
||||||
http_proxy: ""
|
http_proxy: ""
|
||||||
@@ -12,11 +14,7 @@ language: ""
|
|||||||
theme: auto
|
theme: auto
|
||||||
dns:
|
dns:
|
||||||
bind_hosts:
|
bind_hosts:
|
||||||
- 192.168.1.252
|
- 0.0.0.0
|
||||||
- fe80::b978:acda:fbab:ca7a%wlan0
|
|
||||||
- 172.30.32.1
|
|
||||||
- 127.0.0.1
|
|
||||||
- ::1
|
|
||||||
port: 53
|
port: 53
|
||||||
anonymize_client_ip: false
|
anonymize_client_ip: false
|
||||||
ratelimit: 20
|
ratelimit: 20
|
||||||
@@ -28,7 +26,7 @@ dns:
|
|||||||
- 192.168.1.254
|
- 192.168.1.254
|
||||||
upstream_dns_file: ""
|
upstream_dns_file: ""
|
||||||
bootstrap_dns:
|
bootstrap_dns:
|
||||||
- 1.1.1.1:53
|
- 1.1.1.1
|
||||||
fallback_dns: []
|
fallback_dns: []
|
||||||
upstream_mode: load_balance
|
upstream_mode: load_balance
|
||||||
fastest_timeout: 1s
|
fastest_timeout: 1s
|
||||||
@@ -41,6 +39,7 @@ dns:
|
|||||||
trusted_proxies:
|
trusted_proxies:
|
||||||
- 127.0.0.0/8
|
- 127.0.0.0/8
|
||||||
- ::1/128
|
- ::1/128
|
||||||
|
cache_enabled: true
|
||||||
cache_size: 4194304
|
cache_size: 4194304
|
||||||
cache_ttl_min: 0
|
cache_ttl_min: 0
|
||||||
cache_ttl_max: 0
|
cache_ttl_max: 0
|
||||||
@@ -59,7 +58,7 @@ dns:
|
|||||||
bootstrap_prefer_ipv6: false
|
bootstrap_prefer_ipv6: false
|
||||||
upstream_timeout: 10s
|
upstream_timeout: 10s
|
||||||
private_networks: []
|
private_networks: []
|
||||||
use_private_ptr_resolvers: false
|
use_private_ptr_resolvers: true
|
||||||
local_ptr_upstreams: []
|
local_ptr_upstreams: []
|
||||||
use_dns64: false
|
use_dns64: false
|
||||||
dns64_prefixes: []
|
dns64_prefixes: []
|
||||||
@@ -145,14 +144,15 @@ filtering:
|
|||||||
parental_block_host: family-block.dns.adguard.com
|
parental_block_host: family-block.dns.adguard.com
|
||||||
safebrowsing_block_host: standard-block.dns.adguard.com
|
safebrowsing_block_host: standard-block.dns.adguard.com
|
||||||
rewrites: []
|
rewrites: []
|
||||||
safe_fs_patterns: []
|
safe_fs_patterns:
|
||||||
|
- /opt/adguardhome/work/userfilters/*
|
||||||
safebrowsing_cache_size: 1048576
|
safebrowsing_cache_size: 1048576
|
||||||
safesearch_cache_size: 1048576
|
safesearch_cache_size: 1048576
|
||||||
parental_cache_size: 1048576
|
parental_cache_size: 1048576
|
||||||
cache_time: 30
|
cache_time: 30
|
||||||
filters_update_interval: 24
|
filters_update_interval: 24
|
||||||
blocked_response_ttl: 10
|
blocked_response_ttl: 10
|
||||||
filtering_enabled: false
|
filtering_enabled: true
|
||||||
parental_enabled: false
|
parental_enabled: false
|
||||||
safebrowsing_enabled: false
|
safebrowsing_enabled: false
|
||||||
protection_enabled: true
|
protection_enabled: true
|
||||||
@@ -160,7 +160,7 @@ clients:
|
|||||||
runtime_sources:
|
runtime_sources:
|
||||||
whois: true
|
whois: true
|
||||||
arp: true
|
arp: true
|
||||||
rdns: false
|
rdns: true
|
||||||
dhcp: true
|
dhcp: true
|
||||||
hosts: true
|
hosts: true
|
||||||
persistent: []
|
persistent: []
|
||||||
@@ -177,4 +177,4 @@ os:
|
|||||||
group: ""
|
group: ""
|
||||||
user: ""
|
user: ""
|
||||||
rlimit_nofile: 0
|
rlimit_nofile: 0
|
||||||
schema_version: 29
|
schema_version: 30
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "signoz-alert",
|
||||||
|
"execute-command": "/opt/webhook_scripts/signoz-alert.sh",
|
||||||
|
"command-working-directory": "/tmp",
|
||||||
|
"pass-arguments-to-command": [
|
||||||
|
{
|
||||||
|
"source": "entire-payload"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "value",
|
||||||
|
"name": "debug",
|
||||||
|
"default": "false"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response-message": "Apprise notification triggered"
|
||||||
|
}
|
||||||
|
]
|
||||||
+45
@@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Accept arguments:
|
||||||
|
# $1 -> payload from SigNoz
|
||||||
|
# $2 -> debug flag ("true" or "false"), defaults to false
|
||||||
|
PAYLOAD="$1"
|
||||||
|
DEBUG="${2:-false}"
|
||||||
|
|
||||||
|
# Save raw payload for debugging if debug is true
|
||||||
|
if [ "$DEBUG" = "true" ]; then
|
||||||
|
echo "$PAYLOAD" > /tmp/raw_payload.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Iterate over each alert in the "alerts" array
|
||||||
|
printf '%s' "$PAYLOAD" | jq -c '.alerts[]' | while read -r alert; do
|
||||||
|
|
||||||
|
# Transform the alert into Apprise-compatible JSON
|
||||||
|
TRANSFORMED=$(printf '%s' "$alert" | jq -r '
|
||||||
|
. as $a |
|
||||||
|
{
|
||||||
|
title: ($a.labels.alertname // "SigNoz Alert"),
|
||||||
|
body: (
|
||||||
|
(
|
||||||
|
($a.annotations // {})
|
||||||
|
+ ($a.labels // {} | del(.alertname))
|
||||||
|
+ {
|
||||||
|
status: ($a.status // "unknown"),
|
||||||
|
startsAt: ($a.startsAt // "unknown")
|
||||||
|
}
|
||||||
|
+ (if $a.endsAt != null and $a.endsAt != "" then {endsAt: $a.endsAt} else {} end)
|
||||||
|
) | to_entries | map("\(.key): \(.value)") | join("\n")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
')
|
||||||
|
|
||||||
|
# Save transformed alert for debugging if debug is true
|
||||||
|
if [ "$DEBUG" = "true" ]; then
|
||||||
|
echo "$TRANSFORMED" | jq . > /tmp/out_$(echo "$alert" | jq -r '.fingerprint').json
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Send to Apprise API
|
||||||
|
echo "$TRANSFORMED" | jq -c . | curl -s -X POST -H "Content-Type: application/json" -d @- http://192.168.1.254:54995/notify/apprise
|
||||||
|
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user