-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hwmon and so node_exporter very slow with a lot of DS18b20 sensors (taking ~22 seconds to complete) #2242
Labels
Comments
JsBergbau
changed the title
hwmon very slow with a lot of DS18b20 sensors
hwmon and so node_exporter very slow with a lot of DS18b20 sensors (taking ~22 seconds to complete)
Dec 8, 2021
Adding a flag to include/exclude sensors makes sense. Not sure if parallelizing this is worth it, but given we already do it for mount point it's probably fine. |
Ability to disable certain chips or sensors would be great as some sensors are inherently broken and report nonsensical values. |
Addressed by #2699. |
simonkrenger
added a commit
to simonkrenger/node_exporter
that referenced
this issue
Jul 10, 2024
Fixes prometheus#2242 This commit adds two new flags (`collector.hwmon.sensor-include` and `collector.hwmon.sensor-exclude`) to the `hwmon` collector to allow inclusion or exclusion of specific sensors. Some devices export nonsensical values for certain sensors. Here is an example: ``` node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp13"} 49.75 node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp15"} 3.892313987e+06 node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp16"} 3.892313987e+06 ``` As a user I would like to only exclude the values from these sensors, not necessarily of the complete device (as possible witht the `--collector.hwmon.chip-exclude` flag) as other sensor values might be sensical or desired. The new option filters based both on device name and sensor name, separated by an underscore. For example, to exclude the two sensors above, the following regex can be used: ~~~ --collector.hwmon.sensor-exclude="platform_nct6775_656_temp1[5,6]" ~~~ Signed-off-by: Simon Krenger <skrenger@redhat.com>
SuperQ
pushed a commit
that referenced
this issue
Jul 14, 2024
* Add include and exclude filter for sensors in hwmon collector Fixes #2242 This commit adds two new flags (`collector.hwmon.sensor-include` and `collector.hwmon.sensor-exclude`) to the `hwmon` collector to allow inclusion or exclusion of specific sensors. Some devices export nonsensical values for certain sensors. Here is an example: ``` node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp13"} 49.75 node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp15"} 3.892313987e+06 node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp16"} 3.892313987e+06 ``` As a user I would like to only exclude these sensors, not necessarily the complete device (as is currently possible with the `--collector.hwmon.chip-exclude` flag) as other sensor values might be sensical or desired. The new option filters based both on device name and sensor name, separated by a semicolon. For example, to exclude the two sensors above, the following regex can be used: ~~~ --collector.hwmon.sensor-exclude="platform_nct6775_656;temp1[5,6]" ~~~ --------- Signed-off-by: Simon Krenger <skrenger@redhat.com>
v-zhuravlev
pushed a commit
to grafana/node_exporter
that referenced
this issue
Nov 1, 2024
…heus#3072) * Add include and exclude filter for sensors in hwmon collector Fixes prometheus#2242 This commit adds two new flags (`collector.hwmon.sensor-include` and `collector.hwmon.sensor-exclude`) to the `hwmon` collector to allow inclusion or exclusion of specific sensors. Some devices export nonsensical values for certain sensors. Here is an example: ``` node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp13"} 49.75 node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp15"} 3.892313987e+06 node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp16"} 3.892313987e+06 ``` As a user I would like to only exclude these sensors, not necessarily the complete device (as is currently possible with the `--collector.hwmon.chip-exclude` flag) as other sensor values might be sensical or desired. The new option filters based both on device name and sensor name, separated by a semicolon. For example, to exclude the two sensors above, the following regex can be used: ~~~ --collector.hwmon.sensor-exclude="platform_nct6775_656;temp1[5,6]" ~~~ --------- Signed-off-by: Simon Krenger <skrenger@redhat.com> Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Host operating system: output of
uname -a
Linux hostname 5.10.17-v7+ #1414 SMP Fri Apr 30 13:18:35 BST 2021 armv7l GNU/Linux
node_exporter version: output of
node_exporter --version
node_exporter, version 1.3.1 (branch: HEAD, revision: a2321e7)
build user: root@2efabfa20624
build date: 20211205-11:09:40
go version: go1.17.3
platform: linux/arm
node_exporter command line flags
./node-exporter with no flags
Are you running node_exporter in Docker?
No
What did you do that produced an error?
attached 23 DS18b20 1-Wire sensors to RasbperryPI
What did you expect to see?
node-exporter reporting the metrics very fast
What did you see instead?
It takes about 22 seconds until request to http://:9100/metrics is completed.
When running node-exporter with
./node_exporter --no-collector.hwmon
then request is done in less than one second, as it should.You can query the DS180b20 sensors in parallel, so query time is about one second. I use this in a python script via asyncio and works very well.
Also I'd like the idea to disable querying the DS18b20 for hwmon collector, if that is somehow possible.
The text was updated successfully, but these errors were encountered: