I am working on making a Hyper-V template using perfmon counters for my Server 2012 HyperV hosts. I am reading up on what counters are useful, testing and tweaking it now and can post it to the template wiki once I am done, but I was wondering if anyone already had one created or comments on what is good to monitor. Currently I am basing most of it off of this article and things I discover along the way that look interesting. I only have a smallish Hyper V cluster (4 nodes but only about 8VMs) right now (but it will be growing soon, which is why I am putting in the time now) so if anyone is interested in testing it on a larger environment that would be helpful as well.
Ad Widget
Collapse
Hyper-V Template
Collapse
X
-
Hyper V Template
Just finished off my first version of a Hyper-V Template. Link here
The template monitors the Hyper V Service, CPU, Memory, and auto discovers the virtual machines running on the server. It uses a powershell script to get some of the information.
I'm still working on improving it, so thanks for the link I will look to add additional monitors. I too have a small but rapidly growing Hyper V cluster. -
I have uploaded mine here:
It uses quite a few perfmon counters on the host to monitor health, I am still working on adding more and taking out things that don't really seem to matter as I learn more about what counters represent in real world performance. I will take a look at yours as well, maybe we can merge the best of the two in to one.Comment
-
I like the powershell output! I wonder if there is another item you could help me add? I want to know if there are snapshots running on a VM. If possible, also I would like to know their age, so I could alert if there were snapshots more than 5 days old (or whatever you pick in the trigger). If that is too difficult then just alert if there are any snapshots will work. So far I have the basic command:
You could select the creationtime, but could you input that in to zabbix in a date it would understand and be able to tell you if it was older than a specific age? If not simply inputting a 1 that a snapshot exists would be great.Code:PS C:\Windows\system32> get-vmsnapshot zabbix VMName Name SnapshotType CreationTime ParentSnapshotName ------ ---- ------------ ------------ ------------------ Zabbix Zabbix - (4/26/2013 - 4:02:08 PM) Standard 4/26/2013 4:03:16 PM
Comment
-
I have added snapshot detection to your original script by adding this in the $QueryName section:
Then I just created an item for that, and a trigger that fires if the string is longer than 0. I hope to improve this in the future to only alert if there is a snapshot older than X number of days, as we use snapshots quickly sometimes but don't want them hanging around forgotten about.Code:('Snapshots') {$Results = Get-VMSnapshot -VMName "$VMName" | select Name | Format-Table -HideTableHeaders -AutoSize}
Discovery item:
Discovery trigger:Code:hyperv.check[Snapshots,{#VMNAME}]
Code:{Template_Windows_HyperV_Guests:hyperv.check[Snapshots,{#VMNAME}].strlen(0)}>1Comment
-
I'm not quite there...
Nick,
I want to use your HyperV template. I imported it, graphs show "No Data".
On the agent side, I'm using: PerfCounter=perf_counter[\Hyper-V Hypervisor\Logical Processors],"\Hyper-V Hypervisor\Logical Processors",30
That's how I think it would work as I look through the xml of the template file. I'm new to Zabbix, so I'm not ruling out that I'm totally wrong, but any help would be gladly accepted. Thanks,
GregComment
-
Did you ever get this working? I have a large 3 node/30ish vm cluster i'm trying to monitorNick,
I want to use your HyperV template. I imported it, graphs show "No Data".
On the agent side, I'm using: PerfCounter=perf_counter[\Hyper-V Hypervisor\Logical Processors],"\Hyper-V Hypervisor\Logical Processors",30
That's how I think it would work as I look through the xml of the template file. I'm new to Zabbix, so I'm not ruling out that I'm totally wrong, but any help would be gladly accepted. Thanks,
GregComment
-
We are phasing out our HyperV cluster in favor of VMWare, but I did have decent enough monitoring. Here are the templates and the scripts, import the template and put the scripts the agent folder. I only applied the CSV template to one host in the cluster, otherwise they will all alert at the same time as they share the same CSV's.
Add this to your Zabbix agent config, change the path to the script if you install the agent somewhere else:
Let me know if it works out.Code:#HyperV discovery UserParameter=hyperv.discover,powershell.exe -file "C:\Zabbix\HyperV_Status.ps1" UserParameter=hyperv.check[*],powershell.exe -file "C:\Zabbix\HyperV_Status.ps1" $1 $2 UserParameter=windisk.discover,powershell.exe -NoProfile -ExecutionPolicy Bypass -file "C:\Zabbix\CSVDrives_Status.ps1" UserParameter=windisk.check[*],powershell.exe -NoProfile -ExecutionPolicy Bypass -file "C:\Zabbix\CSVDrives_Status.ps1" $1 "$2"
NickComment
-
Hi,
I have been trying to get your Hyper-V template working on a test Windows 2012/2016 server, however I may be missing something!
I have imported the template and attached to my test server.
I have added the additional lines to the zabbix_agent.conf file running on the server.
The 2 PS scripts work fine, but I am not seeing any data appearing or able to see any graphs.
Have I missed something to get this reporting?
The Zabbix queue is showing 38 Hyper-V item waiting to be updated.
Thanks in advance.
Mr JibblesComment
-
@ Mr Jibbles
have you ever solved the Problem with the refresh of the values?
i try the Hyper-V template but have the same problem like youComment
-
Multiple client creation after moving between nodes
Hello,
I'm using your Hyper-V template script and it works nice. Thanks for this.
On the other hand, I have a problem with hyper-v server with cluster structure.
When a virtual machine moved-migrated to another hyper-v node on it create an another Host on Hyperv VM hostgroup.
For example
This list of the host group on first HyperV Node;
VirtualMachineABC_Node1
The list of the host group when moved-migrated to another node;
VirtualMachineABC_Node1 (This one stays and values became passive )
VirtualMachineABC_Node2 (Creates another host for older VM)
I hope i could explain.
Thanks anywayComment
-
Import failed
I have an issue when trying to import https://share.zabbix.com/virtualizat...lication-state
It says - Invalid tag "/zabbix_export/templates/template(1)": unexpected tag "httptests". My zabbix version is 3.0.14 - how to solve it ?
Comment
Comment