- zabbix_template.yaml: importable template "Yodmon Yodeck Player"
- 5 SNMP items using {$YODECK_ID} host macro for per-host OIDs
- Trigger: offline warning after 30 minutes (yodeck.online < 1)
- Trigger: last seen > 4 hours (now() - yodeck.last_seen_ts > 14400)
- snmp/pass_persist.py: add col 7 — last_seen as Unix timestamp
- app/zabbix.py: link hosts to template, upsert {$YODECK_ID} macro;
existing hosts get template linked on next sync automatically
- app/config.py: add ZABBIX_TEMPLATE setting
Import zabbix_template.yaml once via Zabbix UI, then redeploy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
2.1 KiB
YAML
44 lines
2.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
yodmon:
|
|
build: .
|
|
container_name: yodmon_qwe
|
|
restart: unless-stopped
|
|
ports:
|
|
- "161:161/udp" # SNMP — polled by Zabbix every minute
|
|
- "8088:8080" # Web UI
|
|
volumes:
|
|
- yodmon_qwe_data:/data
|
|
environment:
|
|
# ── Yodeck ────────────────────────────────────────────────────────────
|
|
YODECK_API_TOKEN: "yodeck:fXQKm1hLvJY88necL3GiLVntpmyNS5BpKp8MpDK8GH2UvCPrg8BeHwpBSQaEtF0q"
|
|
YODECK_POLL_INTERVAL_MINUTES: "10"
|
|
|
|
# ── SNMP ──────────────────────────────────────────────────────────────
|
|
SNMP_COMMUNITY: "public"
|
|
# Private Enterprise Number OID for this application.
|
|
# All player data is served under this subtree.
|
|
ENTERPRISE_OID: ".1.3.6.1.4.1.99999"
|
|
|
|
# ── Network ───────────────────────────────────────────────────────────
|
|
# IP address (or hostname) of THIS host, reachable by the Zabbix server.
|
|
# Zabbix will send SNMP polls to this address on port 161.
|
|
APP_HOST: "10.16.2.20" # ← change to your actual host IP
|
|
|
|
# ── Zabbix API (optional) ─────────────────────────────────────────────
|
|
# Leave ZABBIX_URL empty to disable automatic host management.
|
|
# Requires Zabbix 5.4+.
|
|
ZABBIX_URL: "https://monitor.stranto.com"
|
|
# Use an API token (preferred) OR user + password — not both.
|
|
# Create token in Zabbix: Administration → API tokens → Create API token
|
|
ZABBIX_API_TOKEN: "c27569968398e149bb7d0958338ecd574b72bd919c75587dd667421a44c9b1e1"
|
|
ZABBIX_USER: ""
|
|
ZABBIX_PASSWORD: ""
|
|
ZABBIX_HOST_GROUP: "Yodeck Players"
|
|
ZABBIX_TEMPLATE: "Yodmon Yodeck Player"
|
|
ZABBIX_SNMP_COMMUNITY: "public"
|
|
|
|
volumes:
|
|
yodmon_qwe_data:
|