14 Discovery of block devices
Item key
The item key to use in the is
You may create discovery rules using this discovery item and:
- filter: {#DEVNAME} matches - to discover devices named “sd0”, “sd1”, “sd2”, …
- filter: {#DEVTYPE} matches
disk
AND {#DEVNAME} does not match^loop.*
- to discover disk type devices whose name does not start with “loop”
Supported macros
[
{
"{#DEVNAME}":"loop1",
{
"{#DEVNAME}":"dm-0",
"{#DEVTYPE}":"disk"
},
{
"{#DEVNAME}":"sda",
},
{
"{#DEVNAME}":"sda1",
"{#DEVTYPE}":"partition"
}
]
Block device discovery allows to use and vfs.dev.write[]
items to create item prototypes using the {#DEVNAME} macro, for example:
- “vfs.dev.read[{#DEVNAME},sps]“