Change visible name format to QRS-{site}MB-{screen}
New format: QRS- + first 4 chars + MB- + remainder Example: AMS-COF1 -> QRS-AMS-MB-COF1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ Zabbix API client for automatic host management.
|
|||||||
|
|
||||||
Each Yodeck player becomes a Zabbix host with:
|
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)
|
- visible name: "QRS-" + first 4 chars + "MB-" + remainder (e.g. AMS-COF1 -> QRS-AMS-MB-COF1)
|
||||||
- SNMP v2c interface pointing to this app (APP_HOST:161)
|
- SNMP v2c interface pointing to this app (APP_HOST:161)
|
||||||
- Four SNMP items: online, last_seen, updating, registered
|
- Four SNMP items: online, last_seen, updating, registered
|
||||||
"""
|
"""
|
||||||
@@ -172,7 +172,7 @@ def sync_to_zabbix(players, add_log_fn):
|
|||||||
for player in players:
|
for player in players:
|
||||||
yid = player['id']
|
yid = player['id']
|
||||||
hostname = f"yodeck-{yid}"
|
hostname = f"yodeck-{yid}"
|
||||||
visible = f"QRS-{player['name']}"
|
visible = f"QRS-{player['name'][:4]}MB-{player['name'][4:]}"
|
||||||
|
|
||||||
if hostname not in existing:
|
if hostname not in existing:
|
||||||
hostid = zbx.create_host(hostname, visible, groupid)
|
hostid = zbx.create_host(hostname, visible, groupid)
|
||||||
|
|||||||
Reference in New Issue
Block a user