In a similar way as file systems are discovered, it is possible to also discover block devices and their type.
The item key to use in the discovery rule is
This item is supported on Linux platforms only.
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.