zabbix-templates/zabbix-7.0/zabbix_LibreElec_by_SSH-template.yaml
2025-01-16 20:23:26 +01:00

379 lines
13 KiB
YAML

zabbix_export:
version: '7.0'
template_groups:
- uuid: 40cc3baad80b4c0c815f809ea20e2875
name: 'Templates/Operating systems'
templates:
- uuid: 1031dcca36664db29af81023ec57fe3a
template: 'LibreElec by SSH'
name: 'LibreElec by SSH'
description: |
LibreElec monitoring SSH-val. A használatához szükség lesz a "Linux by SSH" nevű template-re!
Figyelem! Ha nem használsz swap-ot, akkor tiltsd le a "Memory swap space free in %" nevű item-et, hogy ne kapj állandó hibaüzenetet!
A [/] fájlrendszert szükségtelen figyelni, mivel az egy squashfs loop device.
Három változóval (macros) rendelkezik:
- {$SSH.PORT}: default: 22
- {$SSH.USER}: default: root
- {$SSH.PWD}: default: libreelec
Egy tipikus telepítés esetén ez a 3 változó értéke, így csak akkor kell a hostnál felvenni az {$SSH.PWD} változót, ha lecserélted a kodi felületén.
Tesztelve:
- 12.0.1 x86 (VIA-GO)
- 12.0.1 arm (Raspberry Pi 3 Model B Rev 1.2)
- 9.2.6 arm (Raspberry Pi Model B Rev 2)
https://msandor.hu/libreelec-monitorozasa-zabbixszal/
vendor:
name: msandor
version: 7.0-0
templates:
- name: 'ICMP Ping'
- name: 'Linux by SSH'
groups:
- name: 'Templates/Operating systems'
items:
- uuid: dd5e90077e334161a379a257b21b6a31
name: 'HTTP service is running'
type: SIMPLE
key: 'net.tcp.service[http,,8080]'
history: 1w
tags:
- tag: component
value: 'HTTP service'
- tag: vendor
value: msandor
- uuid: b5f0ddfca74a4bc8a8fc876f253296d5
name: 'FS: /flash: Space: Used, in %'
type: SSH
key: 'ssh.run[/flash.pused,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: '%'
params: 'df -h /flash | grep dev | awk ''{print $5}'' | awk -F"%" ''{print $1}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /flash meghajtó foglaltsága %-ban.'
tags:
- tag: component
value: storage
- tag: filesystem
value: /flash
- tag: fstype
value: vfat
- tag: vendor
value: msandor
triggers:
- uuid: e0d305cf35aa452e847de9e278d996e1
expression: 'min(/LibreElec by SSH/ssh.run[/flash.pused,,{$SSH.PORT}],5m)>{$VFS.FS.PUSED.MAX.WARN:"/flash"}'
name: 'FS [/flash]: Space is low'
opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
priority: WARNING
description: |
The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%` limit.
The trigger expression is based on the current used and maximum available spaces.
Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: capacity
- uuid: a97c575f88694827bb925d67f4d4c865
name: 'FS: /storage: Space: Used, in %'
type: SSH
key: 'ssh.run[/storage.pused,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: '%'
params: 'df -h /storage | grep dev | awk ''{print $5}'' | awk -F"%" ''{print $1}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /storage meghajtó foglaltsága %-ban.'
tags:
- tag: component
value: storage
- tag: filesystem
value: /storage
- tag: fstype
value: ext4
- tag: vendor
value: msandor
triggers:
- uuid: 907f71b397f44da0a874d7ad484ff6ab
expression: 'min(/LibreElec by SSH/ssh.run[/storage.pused,,{$SSH.PORT}],5m)>{$VFS.FS.PUSED.MAX.WARN:"/storage"}'
name: 'FS [/storage]: Space is low'
opdata: 'Space used: {{ITEM.LASTVALUE1}.fmtnum(1)}%'
priority: WARNING
description: |
The volume's space usage exceeds the `{$VFS.FS.PUSED.MAX.WARN:"{#FSNAME}"}%` limit.
The trigger expression is based on the current used and maximum available spaces.
Event name represents the total volume space, which can differ from the maximum available space, depending on the filesystem type.
manual_close: 'YES'
tags:
- tag: scope
value: availability
- tag: scope
value: capacity
- uuid: 2cb8fb9f86e2426a89a56ef0b1802986
name: 'FS: /storage: Space: Used'
type: SSH
key: 'ssh.run[/storage.used,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: B
params: 'df /storage | grep dev | awk ''{print $3}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /storage meghajtó foglaltsága.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: storage
- tag: filesystem
value: /storage
- tag: fstype
value: ext4
- tag: vendor
value: msandor
- uuid: 6081f009b3d64a148d70c19aee8b8909
name: 'FS: /flash: Space: Available'
type: SSH
key: 'ssh.run[flash.free,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: B
params: 'df /flash | grep dev | awk ''{print $4}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /flash meghajtó szabad területe.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: storage
- tag: filesystem
value: /flash
- tag: fstype
value: vfat
- tag: vendor
value: msandor
- uuid: 49249e4dff644d1cba913b4f596ffe55
name: 'FS: /flash: Space: Total'
type: SSH
key: 'ssh.run[flash.total,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: B
params: 'df /flash | grep dev | awk ''{print $2}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /flash meghajtó mérete.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: storage
- tag: filesystem
value: /flash
- tag: fstype
value: vfat
- tag: vendor
value: msandor
- uuid: 59188440de684e74902499b4fa975704
name: 'FS: /flash: Space: Used'
type: SSH
key: 'ssh.run[flash.used,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: B
params: 'df /flash | grep dev | awk ''{print $3}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /flash meghajtó foglaltsága.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: storage
- tag: filesystem
value: /flash
- tag: fstype
value: vfat
- tag: vendor
value: msandor
- uuid: 447edf2af0874a0ebe6cbf347ebcbad0
name: 'Interface eth0: Bits received'
type: SSH
key: 'ssh.run[net.if.in.eth0,,{$SSH.PORT}]'
delay: 3m
history: 7d
units: bps
params: 'grep eth0 /proc/net/dev | awk ''{print $2}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
- type: MULTIPLIER
parameters:
- '8'
tags:
- tag: component
value: network
- tag: interface
value: eth0
- tag: vendor
value: msandor
- uuid: d0037fbb0f634c6b968e1e7471866b41
name: 'Interface wlan0: Bits received'
type: SSH
key: 'ssh.run[net.if.in.wlan0,,{$SSH.PORT}]'
delay: 3m
history: 7d
units: bps
params: 'grep wlan0 /proc/net/dev | awk ''{print $2}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
- type: MULTIPLIER
parameters:
- '8'
tags:
- tag: component
value: network
- tag: interface
value: wlan0
- tag: vendor
value: msandor
- uuid: 3f8d6c825bf943ce86ce7a65ce74a544
name: 'Interface eth0: Bits sent'
type: SSH
key: 'ssh.run[net.if.out.eth0,,{$SSH.PORT}]'
delay: 3m
history: 7d
units: bps
params: 'grep eth0 /proc/net/dev | awk ''{print $10}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
- type: MULTIPLIER
parameters:
- '8'
tags:
- tag: component
value: network
- tag: interface
value: eth0
- tag: vendor
value: msandor
- uuid: 5293c18554b447dca7cdd256823bba78
name: 'Interface wlan0: Bits sent'
type: SSH
key: 'ssh.run[net.if.out.wlan0,,{$SSH.PORT}]'
delay: 3m
history: 7d
units: bps
params: 'grep wlan0 /proc/net/dev | awk ''{print $10}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
preprocessing:
- type: CHANGE_PER_SECOND
parameters:
- ''
- type: MULTIPLIER
parameters:
- '8'
tags:
- tag: component
value: network
- tag: interface
value: wlan0
- tag: vendor
value: msandor
- uuid: 2d0b94a06a5c428f9b5940c34eb81cfd
name: 'FS: /storage: Space: Available'
type: SSH
key: 'ssh.run[storage.free,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: B
params: 'df /storage | grep dev | awk ''{print $2}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /storage meghajtó szabad területe.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: storage
- tag: filesystem
value: /storage
- tag: fstype
value: vfat
- tag: vendor
value: msandor
- uuid: 03daee96d4944c27b6ef6b876c22b2b3
name: 'FS: /storage: Space: Total'
type: SSH
key: 'ssh.run[storage.total,,{$SSH.PORT}]'
delay: 10m
history: 90d
value_type: FLOAT
units: B
params: 'df /storage | grep dev | awk ''{print $2}'''
username: '{$SSH.USER}'
password: '{$SSH.PWD}'
description: 'A LibreElec /storage meghajtó mérete.'
preprocessing:
- type: MULTIPLIER
parameters:
- '1024'
tags:
- tag: component
value: storage
- tag: filesystem
value: /storage
- tag: fstype
value: vfat
- tag: vendor
value: msandor
tags:
- tag: class
value: old
macros:
- macro: '{$SSH.PORT}'
value: '22'
- macro: '{$SSH.PWD}'
value: libreelec
- macro: '{$SSH.USER}'
value: root