It is possible to discover mounted filesystems and their properties (mountpoint name, mountpoint type, filesystem size and inode statistics).
To do that, you may use a combination of:
vfs.fs.get
agent item as the master itemCreate a Zabbix agent item using the following key:
Set the type of information to "Text" for possibly big JSON data.
The data returned by this item will contain something like the following for a mounted filesystem:
{
"fsname": "/",
"fstype": "rootfs",
"bytes": {
"total": 1000,
"free": 500,
"used": 500,
"pfree": 50.00,
"pused": 50.00
},
"inodes": {
"total": 1000,
"free": 500,
"used": 500,
"pfree": 50.00,
"pused": 50.00
}
}
Create a low-level discovery rule as "Dependent item" type:
As master item select the vfs.fs.get
item we created.
In the "LLD macros" tab define custom macros with the corresponding JSONPath:
Cree un prototipo de métrica con el tipo "Métrica dependiente" en esta regla LLD. Como métrica principal para este prototipo, seleccione la métrica vfs.fs.get
que creamos.
Tenga en cuenta el uso de macros personalizadas en el nombre y la clave del prototipo de la métrica:
Como tipo de información utilice:
En la pestaña "Preprocesamiento" del prototipo de la métrica, seleccione JSONPath y use la siguiente expresión JSONPath como parámetro:
Cuando comience el descubrimiento, se creará una métrica por cada punto de montaje. Esta métrica devolverá la cantidad de bytes libres para el punto de montaje dado.