-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathalerts.env.example
More file actions
40 lines (36 loc) · 1.74 KB
/
Copy pathalerts.env.example
File metadata and controls
40 lines (36 loc) · 1.74 KB
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
# Copy to /opt/erpnext_docker_scripts/.configs/alerts.env on the prod host.
#
# Holds secrets -> git-ignored (/.* in .gitignore) and NOT copied by
# `deploy sync`. Create it directly on the server.
#
# Consumed by scripts/notify.sh, scripts/disk-watch.sh and
# scripts/erpnext-s3-backup.sh.
# --- Telegram (primary alert channel) ---------------------------------------
# 1. Talk to @BotFather in Telegram -> /newbot -> copy the token.
# 2. Create a group, add the bot to it, and post one message in the group.
# 3. Read the chat id:
# curl -s "https://api.telegram.org/bot<TOKEN>/getUpdates" \
# | grep -o '"chat":{"id":-\?[0-9]*' | head -1
# Group ids are negative (e.g. -1001234567890) -- keep the minus sign.
# A group beats a direct chat: people can be added or removed without
# reconfiguring the server, and nobody is the single point of failure.
ALERT_TELEGRAM_TOKEN=
ALERT_TELEGRAM_CHAT_ID=
# --- Optional generic webhook (Slack/Discord/Teams/ntfy) --------------------
# Receives {"text": "..."}. Can be used alongside Telegram.
ALERT_WEBHOOK=
# --- Backup dead-man switch -------------------------------------------------
# External check-in URL (e.g. https://hc-ping.com/<uuid> from healthchecks.io,
# free tier). erpnext-s3-backup.sh pings <url>/start, <url> on success and
# <url>/fail on error.
#
# Why external: systemd `OnFailure=` only fires when the unit RUNS and FAILS.
# It cannot fire when the run never happens -- timer disabled, host down, or
# the unit unable to exec the script at all (exit 203, as seen 2026-08-07).
# Set the check's period to 1 day with a grace of ~2 h.
HEALTHCHECK_URL=
# --- Disk watchdog thresholds (optional, defaults shown) --------------------
#DISK_MOUNT=/
#DISK_WARN_PCT=80
#DISK_CRIT_PCT=90
#INODE_WARN_PCT=85