Temperature per core
Hi, first of all - great project, thanks for that
I'm trying to add temperature values per core (see screenshot below) but I can't get it to work. All other temperature sensors are working via - '(?<Entity_Temperature>)(?<MetricName>Motherboard|CPU \(PECI\)|CPU|Auxiliary|SYSTIN1|SYSTIN2|SYSTIN3|EDRAM|PCH Temperature)' but if I try to add cores it captures all of the rest core sensors, not just temperature

That's a unfortunate feature/limitation right now. Happens with FAN speeds as well, when the sensor/unit separates the sensors in the end (as its added to the end), but the metric name matches exactly.
So you will end up right now with bunch of "I didn't want these metrics", along with the temperature ones..?
Do the temperature ones still distinguish from the rest of the pack with the ending "_c" as the unit?
There are some ways to limit the pollution perhaps with Regexp syntax in a way, that it doesn't accept "Core \d+" to match "Core 0 what-ever-text", but that doesn't dodge the exactly same parts.
Do you think adding an option for filtering with unit/sensor type would help you here?
So, I was able to work around it by - '(?<Entity_Temperature>)(?<MetricName>Core \d+$)' to avoid pollution as you suggested. Another option that I considered is to change the sensor label in HWinfo - hacky, but should also work.
And I do think that ability to filter by unit is the proper way to handle this. Still, there are some use-cases where even unit filtering won't work:
-
HELP hwi_temperature_cpu_c Temperature CPU °C - CPU [#0]: Intel Core i7-6770HQ: DTS -
hwi_temperature_cpu_c{unit="°C",sensor_type="SENSOR_TYPE_TEMP",sensor="CPU Package",source="CPU [#0]: Intel Core i7-6770HQ: DTS"} 85 -
HELP hwi_temperature_cpu_c Temperature CPU °C - CPU [#0]: Intel Core i7-6770HQ: Enhanced -
hwi_temperature_cpu_c{unit="°C",sensor_type="SENSOR_TYPE_TEMP",sensor="CPU Package",source="CPU [#0]: Intel Core i7-6770HQ: Enhanced"} 84
Note that the only difference is the sensor group, but those are different sensors and they provide different readings
Thanks for the good example for the requirement to filter or recognize all the available attributes. In such a case, one might want to gather both the sources but with different names etc.
So in addition to being able to filter with units and sources, I think I need to expand the regex syntax to be able to refine/parse the properties from those values as well.
I will leave this open until the feasible solution to initial and more detailed issues are solved.