Add README and CONFIG in RU and EN
This commit is contained in:
96
CONFIG.en.md
Normal file
96
CONFIG.en.md
Normal file
@@ -0,0 +1,96 @@
|
||||
# Configuration
|
||||
|
||||
This project uses `config.yaml`. Start from `config.example.yaml`.
|
||||
|
||||
## telegram
|
||||
|
||||
- `token` (string, required): Telegram bot token.
|
||||
- `admin_id` (int, required): Telegram user id with admin access.
|
||||
|
||||
## paths
|
||||
|
||||
- `artifact_state` (string): JSON file for artifact state.
|
||||
- `restic_env` (string): Path to a file with RESTIC_* environment variables.
|
||||
|
||||
## thresholds
|
||||
|
||||
- `disk_warn` (int, percent): Disk usage warning threshold.
|
||||
- `load_warn` (float): System load warning threshold.
|
||||
|
||||
## alerts
|
||||
|
||||
- `enabled` (bool): Enable resource alerts.
|
||||
- `interval_sec` (int): Poll interval.
|
||||
- `cooldown_sec` (int): Cooldown between alerts.
|
||||
- `notify_recovery` (bool): Send recovery notifications.
|
||||
- `smart_enabled` (bool): Enable SMART health polling.
|
||||
- `smart_interval_sec` (int): SMART poll interval.
|
||||
- `smart_cooldown_sec` (int): SMART alert cooldown.
|
||||
- `smart_temp_warn` (int): SMART temperature warning (C).
|
||||
|
||||
## audit
|
||||
|
||||
- `enabled` (bool): Enable audit logging.
|
||||
- `path` (string): Log file path. Default `/var/server-bot/audit.log`.
|
||||
- `rotate_when` (string): Rotation schedule for `TimedRotatingFileHandler`. Example `W0` for weekly on Monday.
|
||||
- `backup_count` (int): How many rotated files to keep.
|
||||
|
||||
## arcane
|
||||
|
||||
- `base_url` (string): Arcane API base url.
|
||||
- `api_key` (string): Arcane API key.
|
||||
- `env_id` (int): Arcane environment id.
|
||||
|
||||
## npmplus
|
||||
|
||||
Used for SSL certificate status.
|
||||
|
||||
- `base_url` (string): NPMplus API base url, for example `https://10.10.10.10:81/api`.
|
||||
- `identity` (string): Login email.
|
||||
- `secret` (string): Login password.
|
||||
- `token` (string): Optional static token (not recommended if it expires).
|
||||
- `verify_tls` (bool): Set to `false` for self-signed TLS.
|
||||
|
||||
Token flow:
|
||||
|
||||
- First token: `POST /api/tokens` with `identity` and `secret`.
|
||||
- Refresh: `GET /api/tokens` using the cached token.
|
||||
|
||||
## security
|
||||
|
||||
- `reboot_password` (string): Password required before reboot.
|
||||
|
||||
## docker
|
||||
|
||||
- `autodiscovery` (bool): Discover containers by name/label.
|
||||
- `watchdog` (bool): Enable container watchdog notifications.
|
||||
- `label` (string): Optional label filter `key=value`.
|
||||
- `match` (list): Name substrings used for discovery.
|
||||
- `aliases` (map): Alias -> real container name.
|
||||
- `containers` (map): Explicit container list (legacy modules). Each item can define:
|
||||
- `name` (string): Container name.
|
||||
- `url` (string): Health URL for the URLs check.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
telegram:
|
||||
token: "YOUR_TELEGRAM_BOT_TOKEN"
|
||||
admin_id: 123456789
|
||||
|
||||
paths:
|
||||
artifact_state: "/opt/tg-bot/state.json"
|
||||
restic_env: "/etc/restic/restic.env"
|
||||
|
||||
audit:
|
||||
enabled: true
|
||||
path: "/var/server-bot/audit.log"
|
||||
rotate_when: "W0"
|
||||
backup_count: 8
|
||||
|
||||
npmplus:
|
||||
base_url: "https://10.10.10.10:81/api"
|
||||
identity: "your@email.com"
|
||||
secret: "yourPassword"
|
||||
verify_tls: false
|
||||
```
|
||||
Reference in New Issue
Block a user