Add Zabbix template with offline and last-seen triggers
- zabbix_template.yaml: importable template "Yodmon Yodeck Player"
- 5 SNMP items using {$YODECK_ID} host macro for per-host OIDs
- Trigger: offline warning after 30 minutes (yodeck.online < 1)
- Trigger: last seen > 4 hours (now() - yodeck.last_seen_ts > 14400)
- snmp/pass_persist.py: add col 7 — last_seen as Unix timestamp
- app/zabbix.py: link hosts to template, upsert {$YODECK_ID} macro;
existing hosts get template linked on next sync automatically
- app/config.py: add ZABBIX_TEMPLATE setting
Import zabbix_template.yaml once via Zabbix UI, then redeploy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
106
zabbix_template.yaml
Normal file
106
zabbix_template.yaml
Normal file
@@ -0,0 +1,106 @@
|
||||
zabbix_export:
|
||||
version: '7.4'
|
||||
template_groups:
|
||||
- uuid: 7df96b18c230490a9a0a9e2307226338
|
||||
name: Templates
|
||||
templates:
|
||||
- uuid: a1b2c3d4e5f6789012345678deadbeef
|
||||
template: Yodmon Yodeck Player
|
||||
name: Yodmon Yodeck Player
|
||||
description: |
|
||||
Yodmon: monitors a Yodeck digital signage player via SNMP.
|
||||
|
||||
Required host macro: {$YODECK_ID} — set automatically by Yodmon.
|
||||
The SNMP interface must point to the Yodmon host on port 161 with
|
||||
the configured community string.
|
||||
|
||||
OID base: .1.3.6.1.4.1.99999.1.1.<column>.{$YODECK_ID}
|
||||
groups:
|
||||
- name: Templates
|
||||
items:
|
||||
- uuid: 11111111222233334444555566667701
|
||||
name: Online
|
||||
type: SNMP_AGENT
|
||||
snmp_oid: '.1.3.6.1.4.1.99999.1.1.3.{$YODECK_ID}'
|
||||
key: yodeck.online
|
||||
delay: 1m
|
||||
history: 90d
|
||||
value_type: UNSIGNED
|
||||
description: '1 = online, 0 = offline'
|
||||
tags:
|
||||
- tag: yodmon
|
||||
|
||||
- uuid: 11111111222233334444555566667702
|
||||
name: Last Seen Timestamp
|
||||
type: SNMP_AGENT
|
||||
snmp_oid: '.1.3.6.1.4.1.99999.1.1.7.{$YODECK_ID}'
|
||||
key: yodeck.last_seen_ts
|
||||
delay: 1m
|
||||
history: 90d
|
||||
value_type: UNSIGNED
|
||||
description: 'Unix timestamp of last contact with Yodeck cloud (used for age-based trigger)'
|
||||
tags:
|
||||
- tag: yodmon
|
||||
|
||||
- uuid: 11111111222233334444555566667703
|
||||
name: Last Seen
|
||||
type: SNMP_AGENT
|
||||
snmp_oid: '.1.3.6.1.4.1.99999.1.1.4.{$YODECK_ID}'
|
||||
key: yodeck.last_seen
|
||||
delay: 1m
|
||||
history: 90d
|
||||
value_type: TEXT
|
||||
description: 'ISO-8601 timestamp of last contact with Yodeck cloud'
|
||||
tags:
|
||||
- tag: yodmon
|
||||
|
||||
- uuid: 11111111222233334444555566667704
|
||||
name: Updating
|
||||
type: SNMP_AGENT
|
||||
snmp_oid: '.1.3.6.1.4.1.99999.1.1.5.{$YODECK_ID}'
|
||||
key: yodeck.updating
|
||||
delay: 1m
|
||||
history: 90d
|
||||
value_type: UNSIGNED
|
||||
description: '1 = firmware update in progress, 0 = idle'
|
||||
tags:
|
||||
- tag: yodmon
|
||||
|
||||
- uuid: 11111111222233334444555566667705
|
||||
name: Registered
|
||||
type: SNMP_AGENT
|
||||
snmp_oid: '.1.3.6.1.4.1.99999.1.1.6.{$YODECK_ID}'
|
||||
key: yodeck.registered
|
||||
delay: 1m
|
||||
history: 90d
|
||||
value_type: UNSIGNED
|
||||
description: '1 = registered with Yodeck cloud, 0 = not registered'
|
||||
tags:
|
||||
- tag: yodmon
|
||||
|
||||
triggers:
|
||||
- uuid: 22222222333344445555666677778801
|
||||
expression: 'max(/Yodmon Yodeck Player/yodeck.online,30m)<1'
|
||||
name: '{HOST.NAME} is offline'
|
||||
priority: WARNING
|
||||
description: |
|
||||
The player has reported offline status for 30 consecutive minutes.
|
||||
Check the device, network, and Yodeck dashboard.
|
||||
tags:
|
||||
- tag: yodmon
|
||||
|
||||
- uuid: 22222222333344445555666677778802
|
||||
expression: 'now()-last(/Yodmon Yodeck Player/yodeck.last_seen_ts)>14400 and last(/Yodmon Yodeck Player/yodeck.last_seen_ts)>0'
|
||||
name: '{HOST.NAME} not seen for 4+ hours'
|
||||
priority: WARNING
|
||||
description: |
|
||||
The last contact timestamp from Yodeck is more than 4 hours old.
|
||||
The player may be disconnected or the Yodeck cloud may not be
|
||||
receiving heartbeats from the device.
|
||||
tags:
|
||||
- tag: yodmon
|
||||
|
||||
macros:
|
||||
- macro: '{$YODECK_ID}'
|
||||
value: ''
|
||||
description: 'Yodeck player ID — set automatically by Yodmon on host creation'
|
||||
Reference in New Issue
Block a user