Skip to content
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

in_node_exporter_metrics: handle not as error when missing cpu_throttle_metrics #7602

Merged

Conversation

cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Jun 23, 2023

node_cpu_core_throttles_total and node_cpu_package_throttles_total metrics are not existing in the Virtual Machine (VM) environment,
In VM environment, they are just missing.
So, when they are absent, we should handle to output this issue with debug messages and not to handle as error.
The official node_exporter uses the same approach:
https://github.com/prometheus/node_exporter/blob/master/collector/cpu_linux.go#L267-L287

Fixes #7589.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
$ bin/fluent-bit -i node_exporter_metrics -pmetrics=cpu -o stdout
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found
==564825== 
==564825== HEAP SUMMARY:
==564825==     in use at exit: 95,170 bytes in 702 blocks
==564825==   total heap usage: 6,896 allocs, 6,194 frees, 11,082,193 bytes allocated
==564825== 
==564825== LEAK SUMMARY:
==564825==    definitely lost: 0 bytes in 0 blocks
==564825==    indirectly lost: 0 bytes in 0 blocks
==564825==      possibly lost: 0 bytes in 0 blocks
==564825==    still reachable: 95,170 bytes in 702 blocks
==564825==         suppressed: 0 bytes in 0 blocks
==564825== Reachable blocks (those to which a pointer was found) are not shown.
==564825== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==564825== 
==564825== For lists of detected and suppressed errors, rerun with: -s
==564825== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

…s VM

Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
@cosmo0920 cosmo0920 temporarily deployed to pr June 23, 2023 09:47 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr June 23, 2023 09:47 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr June 23, 2023 09:48 — with GitHub Actions Inactive
@cosmo0920 cosmo0920 temporarily deployed to pr June 23, 2023 10:14 — with GitHub Actions Inactive
@edsiper edsiper merged commit 69634a4 into fluent:master Jul 3, 2023
43 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hability to disable node exporter core_throttle_count metric in VM's
2 participants