zabbix-agent-extensions icon indicating copy to clipboard operation
zabbix-agent-extensions copied to clipboard

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

Open jeroenvermeulen opened this issue 1 year ago • 2 comments

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 avatar May 27 '24 14:05 jeroenvermeulen

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

jeroenvermeulen avatar May 27 '24 14:05 jeroenvermeulen

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

scoopex avatar May 27 '24 21:05 scoopex