zabbix-tooling / zabbix-agent-extensions

zabbix-agent-extensions
GNU General Public License v2.0
111 stars 45 forks source link

vfs.dev.discovery is replaced but does not match original output #46

Open jeroenvermeulen opened 1 month ago

jeroenvermeulen commented 1 month ago

zabbix-agent-extensions replaces the default vfs.dev.discovery by custom.vfs.dev.discovery using an Alias However the output from the command used for custom.vfs.dev.discovery does not return the expected macros {#DEVNAME} and {#DEVTYPE}.

/usr/bin/zabbix_discovery_devices --config /etc/zabbix/item_zabbix_discovery_devices.json

Returns something like:

[
   { 
      "{#BLOCKDEVICE}":"sda"
   }
]

While according to the Zabbix manual it should look like this:

[
   { 
      "{#DEVNAME}":"sda",
      "{#DEVTYPE}":"disk"
   },
   { 
      "{#DEVNAME}":"sda1",
      "{#DEVTYPE}":"partition"
   }
]
jeroenvermeulen commented 1 month ago

Do we still need to override the default vfs.dev.discovery? Or can we maybe just remove this line:

Alias=vfs.dev.discovery:custom.vfs.dev.discovery
scoopex commented 1 month ago

I think we still need it, because this script provides extra functionalities. See: ./zabbix_discovery_devices --help