This tutorial was based on Myopsblog that is a translate of original post on Habr.
This tutorial won't help you installing and configuring Zabbix Agent on Windows, this needs to be done in advance.
First you need to create the temperature item in Zabbix, it can be an item directly on host or on template.
Download the OpenHardwareMonitor folder and place on C:
Add the last line of zabbix_agentd.conf to your zabbix agent config file:
UserParameter=Temperature.CPU, type C:\OpenHardwareMonitor\temperature.txt
The best option is to run this script as Startup program. You can start manually for testing.
After you run the TempMonitoring.bat script, just wait some minutes and then your item in Zabbix will gather data:
TempMonitoring.bat will call OpenHardwareMonitorReport.exe, apply some filters, gets the average CPU temperature and save to temperature.txt file, sleeps one minute and then repeat infinitely. Zabbix Agent will request Temperature.CPU item, which will simple read the file and return to Zabbix Server.
You can change the sleep time in seconds of TempMonitoring.bat for your need, just change 60 to your desired value.
You can modify the path as well, just change all six occurrences of path at TempMonitoring.bat and the path of UserParameter at your zabbix agent config file.