Prometheus Adapter for HWiNFO (+ Grafana Dashboard)

I can check back bit later, when I can properly look them up, but quickly responding - they are not mandatory for basic usage. They are needed if you have a need to aggregate/filter data, in which case (when properly set), you can focus on certain entity or category.

Of course if the regexp is "too wide", it might interfere with more categorized ones, but if you add it as last, it shouldn't mess around too much.

Did you get the readings to work in your graphs as expected, are the values available properly?
 
Did you get the readings to work in your graphs as expected, are the values available properly?

Ok I get it for the moment I'm focussing on getting the right conters to show up.
Using a prefix on the items i want and having a simple - '(?<MetricName>Fan.*)' filter at the end of the file does the job.

Values looks good yes!
 
Ok cool. I have some "design-todo" on recognizing the different sensor types additionally - this is exactly the case about "Fan" types. The name based recognition is not enough in these cases, but I need to think about it properly - how best solve it.
 
You can get around it with the "unit" witch is "RPM", and completly different from others. no?
 
Yeah for RPM that works, so there is no issue in your case now :). But for relative percentage 0-100% it sometimes becomes ambiguous between different same-named sensors. The sensors are strongly typed, so in HWiNFO there is no confusion, but for now the PromDapter doesn't take the sensor type in account, which causes the issue.
 
Good afternoon. Could you please advise how I can perform the reflection of CPU Temperature in output JSON?
The question above refers to all indicators: by cores and general.
The same question is for output of the motherboard's temperature.
These items are missing in paragraphs "metrics/help".
 
Good afternoon. Could you please advise how I can perform the reflection of CPU Temperature in output JSON?
The question above refers to all indicators: by cores and general.
The same question is for output of the motherboard's temperature.
These items are missing in paragraphs "metrics/help".

Sure; can you list the exact names of those sensors? You can get the exact names In HWiNFO sensor screen if you hit F2 (or right mouse-click and Rename) when a sensor-row is selected and copy-paste it from there.

The generic idea is to edit the "C:\ProgramData\PromDapter\Prometheusmapping.yaml" accordingly to match to those names and parse their entity/categorization from that name. I can help with the proper editing if you can supply the exact sensor names.
 
Sure; can you list the exact names of those sensors? You can get the exact names In HWiNFO sensor screen if you hit F2 (or right mouse-click and Rename) when a sensor-row is selected and copy-paste it from there.

The generic idea is to edit the "C:\ProgramData\PromDapter\Prometheusmapping.yaml" accordingly to match to those names and parse their entity/categorization from that name. I can help with the proper editing if you can supply the exact sensor names.
I would really appreciate if you could help me to solve this issue!
The indicators have static names (core0, core1...), but different PC (desktops) have different components. I will indicate only names of indicators if it is possible to perform this way.
Or I need to indicate the exact processor or motherboard for each PC or rename them using F2 to equal names for every PC?
Temperature indicators by cores:

CPU: DTS
- Core 0
- Core 1
- Core 2
- Core 3


Indicators of medium values
CPU: Enchanced:
- CPU Package
- CPU IA Cores
- CPU GT Cores (Graphics)

Indicators motherboard:
- SYSTIN
- System
- Auxtin 1
- Auxtin 2
- Auxtin 3
- CPU (PECI)
- +3.3V
- +5v
- +12v
 
This is good list, I'll compare to mine and see how to generalize the yaml regex-definitions.

Or I need to indicate the exact processor or motherboard for each PC or rename them using F2 to equal names for every PC?

No need to do that (well right now it would be one option); but for better flexibility I had planned to provide name-mapping in the PromDapter to solve exactly this.

Regular expressions in yaml can bend a bit around different naming, but some are easier to kind of "rename-map" to more easily guarantee identical naming in the Prometheus database then.

I'll go through your list and get back to you.
 
This is good list, I'll compare to mine and see how to generalize the yaml regex-definitions.



No need to do that (well right now it would be one option); but for better flexibility I had planned to provide name-mapping in the PromDapter to solve exactly this.

Regular expressions in yaml can bend a bit around different naming, but some are easier to kind of "rename-map" to more easily guarantee identical naming in the Prometheus database then.

I'll go through your list and get back to you.
Good. I will wait :)
 
Ok to be safe make a copy of your current C:\ProgramData\PromDapter\Prometheusmapping.yaml

Try adding following lines as last in the "IndividualValues" section BEFORE/ABOVE the -name: AggregateValues

They can be above and not last of that section, but they will be wider scope regexps, so be careful for them catching stuff before more specific ones unnecessarily.

- '(?<Entity>Core) (?<CoreNo>\d+)'
- '(?<Entity>CPU) (?<MetricName>Package|IA Cores|GT Cores \(Graphics\))'
- '(?<Entity_MB>)(?<MetricName>(SYSTIN|System|Auxtin \d|CPU \(PECI\)|\+3\.3V|\+5V|\+12V))'


That should catch your list. You can test the regexp for these (and in the future) with tool such as http://regexstorm.net/tester

The pattern is the thing between the outermost ' ' marks; for example first would be: (?<Entity>Core) (?<CoreNo>\d+)

After the edits (if it doesn't auto-read the config) you can reset the cache of the service with following:
Please let me know how it goes.
 
Ok to be safe make a copy of your current C:\ProgramData\PromDapter\Prometheusmapping.yaml

Try adding following lines as last in the "IndividualValues" section BEFORE/ABOVE the -name: AggregateValues

They can be above and not last of that section, but they will be wider scope regexps, so be careful for them catching stuff before more specific ones unnecessarily.

- '(?<Entity>Core) (?<CoreNo>\d+)'
- '(?<Entity>CPU) (?<MetricName>Package|IA Cores|GT Cores \(Graphics\))'
- '(?<Entity_MB>)(?<MetricName>(SYSTIN|System|Auxtin \d|CPU \(PECI\)|\+3\.3V|\+5V|\+12V))'


That should catch your list. You can test the regexp for these (and in the future) with tool such as http://regexstorm.net/tester

The pattern is the thing between the outermost ' ' marks; for example first would be: (?<Entity>Core) (?<CoreNo>\d+)

After the edits (if it doesn't auto-read the config) you can reset the cache of the service with following:
Please let me know how it goes.
I added rows, as you mentioned, at the end of "IndividualValues" before "AggregateValues". Values were not added to http://192.168.15.105:10445/metrics/help. I made reset with http://localhost:10445/metrics/reset,but the same.
Restart of service didn't help as well. I decided to delete rows out of "Prometheusmapping.yaml" on a selective basis, and to repeat the actions above. Rows in metrics/help are not disappearing , even if to delete "Prometheusmapping.yaml" completely.
I assume that it needs to be solved first.
Please see the summary of my actions below:
1) the service and HWifno were already run
2) I edited Prometheusmapping.yaml file and then saved
3) Checked metrics/help, nothing is added
4) I did /reset, no changes
5) Restart Promdaptersvc, again no changes
6) I decided to delete rows out of Prometheusmapping.yaml , (and the whole file later) and to repeat actions starting from point 2. No changes again.
 
Can you list full path of Prometheusmapping.yaml? As its in two places where one is "for reference" and one is the real use.

The real one to edit is "C:\ProgramData\..." - NOT "C:\Program Files\...".
 
I know its unnecessary confusing (sorry for that), I will rename the reference one to different on next publish to reduce the confusion.
 
Can you list full path of Prometheusmapping.yaml? As its in two places where one is "for reference" and one is the real use.

The real one to edit is "C:\ProgramData\..." - NOT "C:\Program Files\...".
Yes, you are right, the path was wrong.I am currently editing the necessary file (in ProgramData). After the insert of 3 rows you have sent me, the /metrics stops opening and the error 500 pops-up.

- '(? <Entity> Core) (? <CoreNo> \ d +)'
- '(? <Entity> CPU) (? <MetricName> Package | IA Cores | GT Cores \
(Graphics \))'
- '(? <Entity_MB>) (? <MetricName> (SYSTIN | System | Auxtin \ d | CPU \
(PECI \) | \ +3 \ .3V | \ + 5V | \ + 12V))'

Also I tried /reset and restart the service. Until I remove all rows, the error 500 remains. Also I tried to remove rows one by one. As a result if any 1 row exists, /metrics doesn't work
 
The file is very sensitive about the indenting depth and it might be (based on what I see above), there might be spaces getting added by the forum as well.

I added those to the default file and attached here, if you can try this one it should work better.
 

Attachments

  • Prometheusmapping.zip
    1.2 KB · Views: 21
The file is very sensitive about the indenting depth and it might be (based on what I see above), there might be spaces getting added by the forum as well.

I added those to the default file and attached here, if you can try this one it should work better.

The replacement of file worked and new metrics have been added. Preliminarily all is working fine, I will give my feedback later when I will have finished the testing.

Thank you so much for your quick support ! :)
 
You can use that as an example, it isn't totally fragile, but if you can spot the minor differences in your edits vs these. Of course might be that the editor you're using is causing the problem, standard Notepad should work.

But let me know if you need more assistance, I'm happy to hear it worked now as I wishfully expected :).
 
Hello,

There are 2 sets of sensors that show in HWiNFO that I can't get on your adapter no matter what rule I set on set on Prometheusmapping.yaml.
I am indeed using the last version you posted a few days ago :)

Those metrics comes from the MotherBoard (all are temperature sensors):
  • ASUS PRIME Z370-A (Nuvoton NCT6793D)
    • Motherboard
    • CPU
    • Temp1
    • Temp2
    • CPU (PECI)
  • ASUS EC
    • PCH
    • T_Sensor1

For the fans I managed to get around it ba renaming the metrics and addint htis rule at the end of the file
- '(?<MetricName>Fan.*)'

Tell me if I can help you more :)
 
I was going to modify the last additions, but got curious because that CPU (PECI) should have worked.

We could try first with the following simplified (and also, double check you copied to "C:\ProgramData" - and not on "C:\Program Files"), but at least some of these should become visible:

- '(?<Entity_MB>)(?<MetricName>(Motherboard|CPU|Temp\d|CPU \(PECI\)|PCH|T_Sensor\d))'

The sensors should be named in http://localhost:10445/metrics like: hwi_mb_motherboard_c and hwi_mb_cpu_c etc... with prefix hwi_mb.

Try to check if *any* of the above sensors start to appear. Also remember to add this among the last lines before AggregateValues, as its very wide Regexp, if might mess up your other sensors matching the same name(s).
 
Back
Top