Op een vergelijkbare manier als bestandssystemen worden ontdekt, is het ook mogelijk om blokapparaten en hun type te ontdekken.
The item key to use in the discovery rule is
This item is supported on Linux platforms only, since Zabbix agent 4.4.
You may create discovery rules using this discovery item and:
sd[\D]$
- to discover devices named "sd0", "sd1", "sd2", ...disk
AND {#DEVNAME} does not match ^loop.*
- to discover disk type devices whose name does not start with "loop"This discovery key returns two macros - {#DEVNAME} and {#DEVTYPE} identifying the block device name and type respectively, e.g.:
[
{
"{#DEVNAME}":"loop1",
"{#DEVTYPE}":"disk"
},
{
"{#DEVNAME}":"dm-0",
"{#DEVTYPE}":"disk"
},
{
"{#DEVNAME}":"sda",
"{#DEVTYPE}":"disk"
},
{
"{#DEVNAME}":"sda1",
"{#DEVTYPE}":"partition"
}
]
Block device discovery allows to use vfs.dev.read[]
and vfs.dev.write[]
items to create item prototypes using the {#DEVNAME} macro, for example:
{#DEVTYPE} is intended for device filtering.