Replace # with - in Zabbix host names (Zabbix 7.x compatibility)

Zabbix 7.x rejects '#' in host names. Changed hostname format from
'yodeck#<id>' to 'yodeck-<id>' (e.g. yodeck-54239).
Updated SNMP col 1 value and docs for consistency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 10:21:05 +02:00
parent fc6a0c1605
commit 5db8beb847
4 changed files with 7 additions and 7 deletions

View File

@@ -25,7 +25,7 @@ from app.config import DB_PATH, ENTERPRISE_OID
from app.database import get_all_players, get_player_counts
COLUMNS = [
(1, 'STRING', 'hostname', lambda p: f"yodeck#{p['id']}"),
(1, 'STRING', 'hostname', lambda p: f"yodeck-{p['id']}"),
(2, 'STRING', 'name', lambda p: p.get('name') or ''),
(3, 'INTEGER', 'online', lambda p: str(p.get('online', 0))),
(4, 'STRING', 'last_seen', lambda p: p.get('last_seen') or ''),
@@ -62,7 +62,7 @@ def main():
for p in players:
pid = p['id']
print(f" -- yodeck#{pid} ({p['name']})")
print(f" -- yodeck-{pid} ({p['name']})")
for col, typ, label, getter in COLUMNS:
oid = f".{base}.{col}.{pid}"
val = getter(p)