Prometheus Adapter for HWiNFO (+ Grafana Dashboard)

Sorry my bad "CPU (PECI)" was indeed there!! "CPU (Weight)" was the one missing...
I tryed your line and it worked, i can see all the values except "CPU (Weight)".

I added the line:
- '(?<Entity_MB>)(?<MetricName>(CPU \(Weight\)))'

But it doesn't work, damn I suck at regex... lol
 
Regex is awful technology, but its unfortunately one of the best ones to use in this case :-( - don't blame yourself for difficulties of getting regexps right!

Test your regexp with exact sensor name:

Paste the regex between '' as-is there and then copy-paste the exact sensor name... it should indicate whether it can be found.

Are all the other sensors now visible except for that CPU (Weight)?
 
I do use online regex debuger.. but then you figure out there is multiple variation of regex depending on language.... and.. well. As you say awfull, but usefull

From the orriginal request yes i can see anverything except "CPU (Weight)"
The only i see missing now are on the CPU Sections "CPU [#0]: Intel Core i7-8700K: Enhanced"
Power sensors :
"IA Cores Power", "GT Cores Power" and "Total DRAM Power"
Temperature sensors :
"CPU IA Cores", "CPU GT Cores (Graphics)" and "VR VCC Temperature (SVID)"

Thank you so much for your work!
 
Okies I have a hypothesis about "CPU (Weight)" - issue that we can lay on order of regexp (and thus blame the regex ;-) ).

If there is regexp separately with just plain "CPU" in it and the CPU Weight is after that, it gets caught by alone "CPU" before.

So in your custom lines, try rather adding CPU (Weight) on the same line with CPU (PECI) with alike syntax. Just separated with | separator like there rest. See if it improves the situation?

... or another approach is to move the "CPU (Weight)" line alone as it is, to be the first of your custom lines (that is in the bottom, but before any of the just "CPU"-matching lines.
 
The only i see missing now are on the CPU Sections "CPU [#0]: Intel Core i7-8700K: Enhanced"
Power sensors :
"IA Cores Power", "GT Cores Power" and "Total DRAM Power"
Temperature sensors :
"CPU IA Cores", "CPU GT Cores (Graphics)" and "VR VCC Temperature (SVID)"

Of those, I think the order might be relevant too, as the "CPU IA Cores" and "CPU GT Cores (Graphics)" should be already catched by this:

- '(?<Entity>CPU) (?<MetricName>Package|IA Cores|GT Cores \(Graphics\))'

They're just prefixed as hwi_cpu (the entity part in that groups them within cpu entity). So double check if they're already there, otherwise we have some other issue-huntin todo.

There are two ways of defining entity name in regex;
1. ..."<Entity>CPU"... where the CPU is required part of the sensorname
2. ..."<Entity_CPU>"... where the rest of the pattern must match, and its just tagged as CPU before of the underscore constant notation
 
I thought about the order also, but i am using your file with your order, the only line I have added is at the end.

I tryed moving the line at the very begining, still not see the 6 missing values.
- '(?<Entity>CPU) (?<MetricName>Package|IA Cores|GT Cores \(Graphics\))'

The only line i get with the default rule is:
# HELP hwi_cpu_package_w CPU Package W - CPU [#0]: Intel Core i7-8700K: Enhanced


If I put
- '(?<MetricName>.*)' #DEBUG
At the very begining i see them:
# HELP hwi_gt_cores_power_w GT Cores Power W - CPU [#0]: Intel Core i7-8700K: Enhanced
hwi_gt_cores_power_w{unit="W",sensor_type="SENSOR_TYPE_POWER",sensor="GT Cores Power",source="CPU [#0]: Intel Core i7-8700K: Enhanced"} 0
# HELP hwi_ia_cores_power_w IA Cores Power W - CPU [#0]: Intel Core i7-8700K: Enhanced
hwi_ia_cores_power_w{unit="W",sensor_type="SENSOR_TYPE_POWER",sensor="IA Cores Power",source="CPU [#0]: Intel Core i7-8700K: Enhanced"} 22.849895019911255
# HELP hwi_total_dram_power_w Total DRAM Power W - CPU [#0]: Intel Core i7-8700K: Enhanced
hwi_total_dram_power_w{unit="W",sensor_type="SENSOR_TYPE_POWER",sensor="Total DRAM Power",source="CPU [#0]: Intel Core i7-8700K: Enhanced"} 2.6769653538622777
# HELP hwi_cpu_ia_cores_c CPU IA Cores °C - CPU [#0]: Intel Core i7-8700K: Enhanced
hwi_cpu_ia_cores_c{unit="°C",sensor_type="SENSOR_TYPE_TEMP",sensor="CPU IA Cores",source="CPU [#0]: Intel Core i7-8700K: Enhanced"} 49
# HELP hwi_cpu_gt_cores_graphics_c CPU GT Cores (Graphics) °C - CPU [#0]: Intel Core i7-8700K: Enhanced
hwi_cpu_gt_cores_graphics_c{unit="°C",sensor_type="SENSOR_TYPE_TEMP",sensor="CPU GT Cores (Graphics)",source="CPU [#0]: Intel Core i7-8700K: Enhanced"} 46
# HELP hwi_vr_vcc_temperature_svid_c VR VCC Temperature (SVID) °C - CPU [#0]: Intel Core i7-8700K: Enhanced

hwi_vr_vcc_temperature_svid_c{unit="°C",sensor_type="SENSOR_TYPE_TEMP",sensor="VR VCC Temperature (SVID)",source="CPU [#0]: Intel Core i7-8700K: Enhanced"} 46



For "CPU (Weight)" > This line did the trick. I'm pretty sure i have tested this before, but watever lol
- '(?<Entity_MB>)(?<MetricName>(SYSTIN|System|Auxtin \d|CPU \(PECI\)|CPU \(Weight\)|\+3\.3V|\+5V|\+12V))'
 
Ok got it extracted, thanks. I'll go through it, but busy elsewhere today, but I try to get back to you by tomorrow.
 
Ok, let me get on with some control questions, if I understood this right.

So we're looking for these missing 6 values:
Power sensors :
"IA Cores Power", "GT Cores Power" and "Total DRAM Power"
Temperature sensors :
"CPU IA Cores", "CPU GT Cores (Graphics)" and "VR VCC Temperature (SVID)"

Now from your Current/metricshelp.txt I spot few:

# HELP hwi_cpu_gt_cores_graphics_c CPU GT Cores (Graphics) °C - CPU [#0]: Intel Core i7-8700K: Enhanced
# HELP hwi_cpu_ia_cores_c CPU IA Cores °C - CPU [#0]: Intel Core i7-8700K: Enhanced

If we can agree those, then we just need to add the missing ones; "IA Cores Power", "GT Cores Power", "Total DRAM Power" and "VR VCC Temperature (SVID)".

Let's try with something like these:
- '(?<Entity_CPU>)(?<MetricName>IA Cores Power|GT Cores Power)'
- '(?<Entity_MB>)(?<MetricName>Total DRAM Power|VR VCC Temperature \(SVID\))'

Note, they should be appearing with following syntax as sensor:
hwi_cpu_<metricname>_<unit>
hwi_mb_<metricname>_<unit>

Can you test them out and verify that the two I spotted were actually the ones you were looking?
 
With those additions (adn my mistakes on the two that where indeed there) i can now see everything! :)

I can't thank you enough, now i can continue to work on the dashboard ^^
 
Good day ! As promised I am back to you with the results: During two weeks all has been working stable, all metrics are displayed except temperature CPU by cores. ( I was satisfied with average value, but I think it would be helpful to get temperature by cores as well).The remaining works as I supposed.Thanks a lot for help again.
Kind regards, Roman.
 
I was satisfied with average value, but I think it would be helpful to get temperature by cores as well).The remaining works as I supposed.

Hi, so we got all the others to work except for the temperatures by cores? Can you again share the exact sensor names, lets see if we can solve it out.
 
hello all, im VERY new to all of this but i am persistent and want this to work. Right now i use a couple of custom rain meter skins i made to monitor a few computers on my network (plex server, remote gaming PC, router, ect, ect) and i would absolutely love to make this work instead. Trouble its im hitting a wall RIGHT away. im missing some absurdly rudimentary step here. after i install the package i confirmed the service is running but http://localhost:10445/metrics yeilds this:
This page isn’t working
localhost is currently unable to handle this request.

HTTP ERROR 500

and the rest of the links do nothing as well. Grafana kicks back HTTP Error Bad Gateway when i try to load that. Im lost here. sorry for the newbness..

This seems absolutely awesome thanks for making it.
 
i literally dont know what i did but you fixed it lol......i typed in the debugger in error 500 went away and then i typed in the metrics page and it worked. awesome lol
 
It's most likely the HWiNFO Sensors window; it needs to be opened - either manually clicking it or at startup, even as minimized, but still opened :).
 
Hi, so we got all the others to work except for the temperatures by cores? Can you again share the exact sensor names, lets see if we can solve it out.
Yes, that is absolutely correct
The remaining items work normally except 1 position ((temperature CPU by cores)
The following doesn't display:
Branch CPU [#0]: … : DTS
Core 0, Core 1, Core 2, Core 3 - in case 4 coresСнимок.JPG
 
That's odd... this line should catch them:
- '(?<Entity>Core) (?<CoreNo>\d+)'

They should be visible in http://localhost:10445/metrics view something as following (the ... means there is other stuff, but coreno and unit should be like that among other things):

hwi_core_c{coreno="0",unit="°C",...} 98
hwi_core_c{coreno="1",unit="°C",...} 99
hwi_core_c{coreno="2",unit="°C",...} 99
hwi_core_c{coreno="3",unit="°C",...} 99

Can you doublecheck they're not there?
 
Man Kallex, your timing is great. I just started tinkering on a project where I needed to get data out of HWiNFO and into an endpoint where I could consume it. Just when I think I'll need to request the SDK and write my own way to do it, here you are! I'm actually translating your PromDapter output into JSON for use with a custom React front end, but it's outrageously useful to have the HWiNFO export portion covered.

Thanks so much for taking the time to share your work with everyone.
 
Back
Top