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:
29
entrypoint.sh
Normal file
29
entrypoint.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
COMMUNITY="${SNMP_COMMUNITY:-public}"
|
||||
ENT_OID="${ENTERPRISE_OID:-.1.3.6.1.4.1.99999}"
|
||||
|
||||
# Write snmpd.conf from environment variables so community/OID are configurable
|
||||
cat > /etc/snmp/snmpd.conf <<EOF
|
||||
# Listen on all interfaces
|
||||
agentAddress udp:0.0.0.0:161
|
||||
|
||||
# Read-only SNMPv2c community
|
||||
rocommunity ${COMMUNITY} default
|
||||
|
||||
# Delegate our private OID tree to the Python pass_persist script
|
||||
pass_persist ${ENT_OID} /app/snmp/pass_persist.py
|
||||
|
||||
# Reduce noise in logs
|
||||
syslog 5
|
||||
EOF
|
||||
|
||||
echo "[entrypoint] snmpd.conf written (community=${COMMUNITY}, oid=${ENT_OID})"
|
||||
|
||||
# Start snmpd in the background
|
||||
snmpd -f -Lo &
|
||||
echo "[entrypoint] snmpd started (PID $!)"
|
||||
|
||||
# Hand off to the Python application
|
||||
exec python main.py
|
||||
Reference in New Issue
Block a user