ZABBIX_API_TOKEN env var can now be used instead of ZABBIX_USER + ZABBIX_PASSWORD. When set, the token is passed directly as the auth value in JSON-RPC calls and no login/logout session is created. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
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', '')
|
|
# Authentication: set ZABBIX_API_TOKEN (preferred) OR ZABBIX_USER + ZABBIX_PASSWORD
|
|
ZABBIX_API_TOKEN = os.environ.get('ZABBIX_API_TOKEN', '')
|
|
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'))
|