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

@@ -2,7 +2,7 @@
Zabbix API client for automatic host management.
Each Yodeck player becomes a Zabbix host with:
- hostname : yodeck#<yodeck_id>
- hostname : yodeck-<yodeck_id>
- visible name: "QRS-" + the Yodeck player's display name (e.g. QRS-AMS-COF1)
- SNMP v2c interface pointing to this app (APP_HOST:161)
- Four SNMP items: online, last_seen, updating, registered
@@ -171,7 +171,7 @@ def sync_to_zabbix(players, add_log_fn):
created = updated = 0
for player in players:
yid = player['id']
hostname = f"yodeck#{yid}"
hostname = f"yodeck-{yid}"
visible = f"QRS-{player['name']}"
if hostname not in existing: