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

node_exporter_metrics: Align the collecting metrics of unit statuses #9134

Merged

Conversation

cosmo0920
Copy link
Contributor

In the original node_exporter, it only uses 0 or 1 which means that this status is active or not.
To represent this specification on Fluent Bit, we need to fill as 0 at first. Then, we need filling with 1 for the active statuses.


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 -o stdout -v
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found
==3791369== 
==3791369== HEAP SUMMARY:
==3791369==     in use at exit: 0 bytes in 0 blocks
==3791369==   total heap usage: 228,729 allocs, 228,729 frees, 13,302,851,339 bytes allocated
==3791369== 
==3791369== All heap blocks were freed -- no leaks are possible
==3791369== 
==3791369== For lists of detected and suppressed errors, rerun with: -s
==3791369== 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.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@edsiper
Copy link
Member

edsiper commented Jul 29, 2024

adding @pwhelan for review

@edsiper
Copy link
Member

edsiper commented Aug 3, 2024

@cosmo0920 what's the main difference with the implementation proposed on #9136 ?

@cosmo0920
Copy link
Contributor Author

cosmo0920 commented Aug 3, 2024

@cosmo0920 what's the main difference with the implementation proposed on #9136 ?

The main difference is: This PR will set all of 0 value at first. And set 1 only for an active state.
The #9136 will set 1 for an active state and other state will be set as 0.

@pwhelan
Copy link
Contributor

pwhelan commented Aug 3, 2024

I had not seen originally that this one set the states, since it does just merge this one.

I had my PR from before just had not pushed it.

@edsiper
Copy link
Member

edsiper commented Aug 3, 2024

thanks both

@edsiper
Copy link
Member

edsiper commented Aug 3, 2024

@cosmo0920 note: in_node_exporter_metrics: ...

@edsiper edsiper merged commit a6aac45 into master Aug 3, 2024
43 checks passed
@edsiper edsiper deleted the cosmo0920-align-specification-for-collecting-unit-status branch August 3, 2024 22:21
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.

3 participants