Cosium / zabbix_zfs-on-linux

zabbix template and user parameters to monitor zfs on linux
MIT License
76 stars 50 forks source link

Cannot send request: wrong discovery rule type. #11

Closed KingHorse2015 closed 4 years ago

KingHorse2015 commented 4 years ago

When hitting the check now button, I get a error message that it has a wrong discorvery rule type.

Zabbix version: 4.2.8

I have follewed the setup guide. I checked every step it is all in place.

But maybe I missed something?

AceSlash commented 4 years ago

Hey @KingHorse2015 ,

Unfortunately I currently don't have access to a Zabbix agent version 4.2.8, but could you try to test the discovery rule directly on the agent?

To do that, try those commands:

zabbix_agentd -t zfs.pool.discovery
zabbix_agentd -t zfs.fileset.discovery
zabbix_agentd -t zfs.vdev.discovery

Every commands should return a JSON with the discovered items.

lightelfua commented 4 years ago

zabbix_agentd -t zfs.pool.discovery zfs.pool.discovery [t|{ "data":[{"{#POOLNAME}":"storage-pool"}]}]

zabbix_agentd -t zfs.fileset.discovery zfs.fileset.discovery [t|{ "data":[{"{#FILESETNAME}":"storage-pool"}, {"{#FILESETNAME}":"storage-pool/raid"}]}]

zabbix_agentd -t zfs.vdev.discovery zfs.vdev.discovery [t|{ "data":[{"{#VDEV}":"sdb"}, {"{#VDEV}":"sdc"}, {"{#VDEV}":"sdd"}, {"{#VDEV}":"sde"}, {"{#VDEV}":"sdf"}, {"{#VDEV}":"sdg"}]}]

zabbix_agentd -V zabbix_agentd (daemon) (Zabbix) 4.2.4

upd. I'm check log zabbix agent and find 13304:20200226:071155.456 no active checks on server [127.0.0.1:10051]: host [Zabbix server] not found After fix hostname template work properly.

AceSlash commented 4 years ago

Ok great, active checks need the correct hostname as you just noticed ;-)

Closing.