a-schild / Zabbix-HyperV-Templates

Zabbix Templates and agent script for HyperV monitoring
51 stars 29 forks source link

Guest VMs hosts not discovered/created within Zabbix - Using Zabbix 3.0 #5

Closed virento closed 8 years ago

virento commented 8 years ago

I'm running a Zabbix 3.0 installation and have setup my Hyper-V hosts with the Zabbix 3.0 agent configured as you described in your instructions. I've ensured the PowerShell file is in the appropriate folder and the UserParameter paths to it are correct.

The Zabbix server is monitoring everything related to each Hyper-V host just fine that's included with the 'host' template however it never discovers/creates host entries for the Hyper-V guests on each of them. I don't see any errors in the Zabbix server logs to indicate a problem.

Is this template and PS script compatible with Zabbix 3.0?

ZegalPL commented 8 years ago

I have same problem with zabbix 3.0, furthermore, when i use zabbix_get with key hyperv.discover or hyperv.check with specific VM, i get the data, could You please verify if that issue can be addressed?

ameiji commented 8 years ago

I'll look into that, thanks for the reports!

ameiji commented 8 years ago

@virento and @ZegalPL could you please check what the Info filed shows for your Discovery Rule under Host Configuration, is there any error?

ZegalPL commented 8 years ago

Mine says - "Value Should be a JSON object." info

ameiji commented 8 years ago

@ZegalPL that the problem ;) Please check on your zabbix server what zabbix_get -k 'hyperv.discovery' -s <your_host> shows

ZegalPL commented 8 years ago

@ameiji Big Thanks for tip, i reuploaded fresh copy of script to my host and discovery fired up properly, case closed from my side :) very appreciated.

ameiji commented 8 years ago

@ZegalPL glad it helped!

avatar5555555 commented 8 years ago

Hi! I've tried to use zabbix_get but there is error "ZBX_NOTSUPPORTED: Timeout while executing a shell script." Timeout on zabbix-server and zabbix-agent is 30. I'm looking forward to hearing from you.

ameiji commented 8 years ago

@avatar5555555 please check your agent's config file that UserParameter (hyperv.discovery, hyperv.discoveryitem and hyperv.check) all point to correct location of the zabbix-vm-perf.ps1 script. If that's not the case, you may want to try running the script locally on your hyper-v host and see what's going on.

avatar5555555 commented 8 years ago

Locally it worked. Thnx! Moreover there needs to use Unblock-File PS cmdlet for proper work. But there's another problem - all perf items have status 'Not Supported: Cannot obtain performance information from collector.' Looks like it's because of Russian localisation Windows Server.