This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
zabbix_lld_-_это_просто [2020/09/09 11:57] val |
zabbix_lld_-_это_просто [2020/09/09 13:23] val [Модуль 3. Использование LLD для решения новой задачи] |
||
---|---|---|---|
Line 163: | Line 163: | ||
* [[https://www.zabbix.com/documentation/4.0/ru/manual/config/items/itemtypes/zabbix_agent|Zabbix Documentation 4.0/ZABBIX АГЕНТ]] | * [[https://www.zabbix.com/documentation/4.0/ru/manual/config/items/itemtypes/zabbix_agent|Zabbix Documentation 4.0/ZABBIX АГЕНТ]] | ||
+ | * [[https://www.zabbix.com/documentation/4.4/ru/manual/config/items/itemtypes/zabbix_agent|Zabbix Documentation 4.4/ZABBIX АГЕНТ]] | ||
+ | |||
+ | <code> | ||
+ | # lsblk | ||
+ | |||
+ | # lsblk -dJ | jq | ||
+ | |||
+ | # lsblk -dJ | /bin/sed -e 's/blockdevices/data/' -e 's/name/{#NAME}/g' -e 's/type/{#TYPE}/g' | jq | ||
+ | |||
+ | # cat /etc/zabbix/zabbix_agentd.conf.d/vfs.dev.discovery.conf | ||
+ | </code><code> | ||
+ | UserParameter=vfs.dev.discovery,/bin/lsblk -dJ | /bin/sed -e 's/blockdevices/data/' -e 's/name/{#NAME}/g' -e 's/type/{#TYPE}/g' | ||
+ | </code><code> | ||
+ | # service zabbix-agent restart | ||
+ | |||
+ | # zabbix_agentd -p | grep vfs.dev | ||
+ | |||
+ | # zabbix_get -s 127.0.0.1 -k vfs.dev.discovery | jq | ||
+ | </code><code> | ||
+ | Configuration->Templates->Template OS Linux | ||
+ | Discovery rules->Create discovery rule | ||
+ | Name: Disk discovery | ||
+ | Key: vfs.dev.discovery | ||
+ | Filters-> | ||
+ | {#TYPE} matches disk | ||
+ | |||
+ | |||
+ | |||
+ | Item prototypes-> | ||
+ | Name: disk {#NAME} read bytes | ||
+ | Key: vfs.dev.read[{#NAME},sps] | ||
+ | Type of information: Numeric (float) | ||
+ | Units: Байт | ||
+ | Preprocessing-> | ||
+ | Preprocessing steps | ||
+ | Custom multiplier 512 | ||
+ | |||
+ | Name: disk {#NAME} write bytes | ||
+ | ... | ||
+ | </code> |