I am testing KNM, and i try to add some monitors like WMI on my servers.
One off my client ask me to survey temperature cpu, but I get that result in kelvin... not in °C. If someone have the solution...
Have you got some examples off programing WQL with WMI?
Thank for your help, and excuse me for my english.
Unfortunately, we currently don't have support for the temperature datatype for WMI but that will be fixed in a future release. There's a workaround though that works very well. The datatype you are receiving is in tenths of degrees Kelvin, meaning you have to devide the result by 10 and deduct 273.16 from that. Easy enough to do manually, but not in KNM at the moment.
I made a small Lua script that you can use for retrieving the result in Celsius instead. You can download the script from dl.dropbox.com/.../WMI_CurrentTemperature_ThermalZone.lua and refer to the help to run Lua scripts. The script will do the conversion for you and present the actual temperature in Celsius.
Basically you have to save the file in the script folder where KNM is installed. Then you create a new monitor (Script -> Lua script) and choose WMI_CurrentTemperature_ThermalZone.lua as the script. Name it "CPU Temperature" or something like that.
Quality Assurance Engineer
I was checking a bit further, since I got strange results back when testing in our lab with WMI and CPU temperature. It seems that many hardware vendors don't even have support for WMI for their CPU sensors so you may end up with faulty results. It's up to the vendors to use ACPI for WMI monitoring and it seems that many don't have support for that. What is the brand of the servers you are trying to read? I checked HP for example and the best way to read the CPU temperature is by SNMP. OID 188.8.131.52.184.108.40.206.220.127.116.11.4 for example reads CPU 1's temperature sensor. There are many sensors for HP, and there are as many for other vendors. HP also has SNMP OIDs for conditions, meaning HP has already put the counter in failed or warning mode so if you read that value, you know if there's a problem.
Let us know what hardware you are trying to monitor and we will help you setting up an SNMP monitor correctly.
Thank you very much for your help.
I test that monday.