Zabbix Agent Templates for Hyper-V monitoring
Description:
Hyper-V 来宾和主机模版
- Template Windows Hyper-V Guest
Discovers VM guest performance counters and creates Zabbix items for each of them. The following parameters are discovered and monitored:- Hyper-V Virtual Storage Device (ops/s and Bytes/s)
- Hyper-V Virtual Network Adapter (Bytes/s)
- Hyper-V Hypervisor Virtual Processor(Total Run Time, %)
- Template Windows HyperV Host
The following host parameters are monitored:- Hyper-V Hypervisor Logical Processor(_Total)\% Guest Run Time
- Hyper-V Hypervisor Logical Processor(_Total)\% Hypervisor Run Time
- Hyper-V Hypervisor Logical Processor(_Total)\% Idle Time
- Hyper-V Hypervisor Root Virtual Processor(_Total)\% Guest Run Time
- Hyper-V Hypervisor Root Virtual Processor(_Total)\% Hypervisor Run Time
- Hyper-V Hypervisor Root Virtual Processor(_Total)\% Remote Run Time
- Hyper-V Hypervisor Root Virtual Processor(_Total)\% Total Run Time
- Hyper-V Hypervisor Virtual Processor(_Total)\% Guest Run Time
- Hyper-V Hypervisor Virtual Processor(_Total)\% Hypervisor Run Time
- Hyper-V Hypervisor Virtual Processor(_Total)\% Remote Run Time
- Hyper-V Hypervisor Virtual Processor(_Total)\% Total Run Time
- Hyper-V Virtual Switch(*)\Bytes
- Hyper-V Virtual Machine Health Summary\Health Critical
模版来自:https://github.com/ameiji/Zabbix-HyperV-Templates
这个zabbix模版已经好久没有更新了,我将这版拿来直接用,发现在ZABBIX客户端会有类似以下报错
9408:20170110:113415.612 active check "perf_counter[\Hyper-V Hypervisor Root Virtual Processor(_Total)\% Remote Run Time]" is not supported: Invalid performance counter format. 9408:20170110:113416.627 active check "perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Guest Run Time]" is not supported: Invalid performance counter format. 9408:20170110:113416.627 active check "perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Hypervisor Run Time]" is not supported: Invalid performance counter format. 9408:20170110:113416.627 active check "perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Remote Run Time]" is not supported: Invalid performance counter format. 9408:20170110:113416.627 active check "perf_counter[\Hyper-V Hypervisor Virtual Processor(_Total)\% Total Run Time]" is not supported: Invalid performance counter format.
于是将该模版的Powershell进行了一些修改,其实这版模版没有问题,只是我的操作系统是中文的,如果你的操作系统是英文,估计可以直接拿 来用:例如
(Get-Counter -Counter '\Hyper-V Hypervisor Virtual Processor(*)\总运行时间百分比')
原版中默认是英文:
(Get-Counter -Counter '\Hyper-V Hypervisor Virtual Processor(*)\% Total Run Time')
再来看看操作系统中的计数:
看到这里,难怪会报错,如果你的服务器操作系统是Windows Server 2012 r2 可以下载附件直接使用
附件:Zabbix-HyperV-Templates-master
使用方法:
下载解压后,上传模版文件Template_Windows_HyperV_VM_Guest.xml再上传Template_Windows_HyperV_Host.xml
将zabbix-vm-perf.ps1放到你的zabbix代理的目录,并在zabbix_agentd.win.conf中添加如下代码:
UserParameter=hyperv.discovery,powershell.exe -file "C:\zabbix\ps\zabbix-vm-perf.ps1" UserParameter=hyperv.discoveryitem[*],powershell.exe -file "C:\zabbix\ps\zabbix-vm-perf.ps1" "$1" "$2" UserParameter=hyperv.check[*],powershell.exe -file "C:\zabbix\ps\zabbix-vm-perf.ps1" "$1" "$2" "$3"
buy tadalafil 40mg generic – cialis pills sildenafil canada
synthroid without prescription – aristocort 10mg pill order hydroxychloroquine 400mg sale
buy albuterol online cheap – online casino games dapoxetine 30mg cheap
vardenafil generic – order levitra without prescription clomiphene 100mg uk
buy lisinopril 5mg generic – lopressor 50mg over the counter atenolol 50mg sale
glucophage 1000mg ca – buy amlodipine 5mg pill buy generic norvasc 5mg
plaquenil without prescription – order chloroquine without prescription order baricitinib generic
lasix order online – order furosemide ivermectin purchase
buy prednisolone 20mg without prescription – brand neurontin 800mg buy viagra sale
amoxil us – purchase azithromycin for sale buy sildenafil 150mg generic
deltasone 40mg cheap – order prednisone 40mg pills isotretinoin 20mg us
tadalafil 20mg for sale – order provigil 100mg online cheap oral modafinil 100mg
order doxycycline 200mg generic – buy cialis 5mg sale cost tadalafil 10mg
price of ivermectin liquid – buy ivermectin for humans order levitra 20mg pills
cheap amoxicillin 500mg – zithromax medication order vardenafil 20mg generic
ampicillin order – order cipro 500mg without prescription order tadalafil 10mg online
cefuroxime oral – robaxin 500mg sale otc cialis
buy generic budesonide – order tadalafil generic antabuse 250mg sale
buy sildenafil 100mg sale – ivermectin nz ivermectin cost
buy cephalexin 500mg generic – buy erythromycin 250mg generic buy erythromycin pill
buy trimethoprim online cheap – order sildenafil 150mg sildenafil 50mg brand
cheap augmentin 1000mg – brand augmentin cialis 20mg drug
prednisolone 40mg pill – order prednisolone 10mg for sale cialis 20mg price
order generic viagra – order sildenafil 50mg without prescription order viagra sale
VM中文乱码怎么解决 大神
这个模版的powershell脚本可能对中文支持不好,的确有虚拟机中文乱码的问题,具体解决方法还没有,但问题应该是与编码有关,powershell默认不是utf8,zabbix服务器数据库是utf8,我想可能是造成乱码的原因