Initial commit: Yodmon Yodeck→Zabbix bridge

- Yodeck API poller (every 10 min, paginated, 310 players)
- SQLite persistence (players + activity logs)
- SNMP v2c agent via net-snmp pass_persist
- Zabbix API auto host creation/update (6.0+)
- Flask web dashboard with live player status and log
- Docker deployment with persistent volume
- dev_server.py for local testing without Docker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 09:31:00 +02:00
commit 9fc3e97546
18 changed files with 1027 additions and 0 deletions

26
app/config.py Normal file
View File

@@ -0,0 +1,26 @@
import os
# Yodeck API
YODECK_API_TOKEN = os.environ.get('YODECK_API_TOKEN', '')
YODECK_API_BASE = 'https://app.yodeck.com/api/v2'
YODECK_POLL_INTERVAL_MINUTES = int(os.environ.get('YODECK_POLL_INTERVAL_MINUTES', '10'))
# Zabbix (all optional — leave ZABBIX_URL empty to disable)
ZABBIX_URL = os.environ.get('ZABBIX_URL', '')
ZABBIX_USER = os.environ.get('ZABBIX_USER', 'Admin')
ZABBIX_PASSWORD = os.environ.get('ZABBIX_PASSWORD', '')
ZABBIX_HOST_GROUP = os.environ.get('ZABBIX_HOST_GROUP', 'Yodeck Players')
ZABBIX_SNMP_COMMUNITY = os.environ.get('ZABBIX_SNMP_COMMUNITY', 'public')
# IP/hostname of this app reachable by the Zabbix server for SNMP polling
APP_HOST = os.environ.get('APP_HOST', '127.0.0.1')
# SNMP
SNMP_COMMUNITY = os.environ.get('SNMP_COMMUNITY', 'public')
# Private Enterprise Number OID used for all player data
ENTERPRISE_OID = os.environ.get('ENTERPRISE_OID', '.1.3.6.1.4.1.99999')
# Database
DB_PATH = os.environ.get('DB_PATH', '/data/yodmon.db')
# Web UI
WEB_PORT = int(os.environ.get('WEB_PORT', '8080'))