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_systemd: remove unreferenced field from flb_systemd_config #9782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chitoku-k
Copy link
Contributor

@chitoku-k chitoku-k commented Dec 31, 2024

This PR removes a field that has no longer been referenced since #9773.


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
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

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

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

Documentation

  • [N/A] 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: Chitoku <odango@chitoku.jp>
@chitoku-k
Copy link
Contributor Author

Config

[SERVICE]
    Parsers_File    parsers.conf

[INPUT]
    Name            systemd
    Systemd_Filter  _SYSTEMD_UNIT=systemd-logind.service
    Read_From_Tail  On
    Lowercase       On

[OUTPUT]
    Name            stdout
    Match           *

[FILTER]
    Name            parser
    Match           *
    Key_Name        message
    Parser          json

Log

$ bin/fluent-bit -c config
Fluent Bit v3.2.4
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

______ _                  _    ______ _ _           _____  _____
|  ___| |                | |   | ___ (_) |         |____ |/ __  \
| |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   __   / /`' / /'
|  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / /   \ \  / /
| |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V /.___/ /./ /___
\_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/ \____(_)_____/


[2024/12/31 14:45:23] [ info] [fluent bit] version=3.2.4, commit=40e59d17df, pid=867569
[2024/12/31 14:45:23] [ info] [storage] ver=1.1.6, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2024/12/31 14:45:23] [ info] [simd    ] disabled
[2024/12/31 14:45:23] [ info] [cmetrics] version=0.9.9
[2024/12/31 14:45:23] [ info] [ctraces ] version=0.5.7
[2024/12/31 14:45:23] [ info] [input:systemd:systemd.0] initializing
[2024/12/31 14:45:23] [ info] [input:systemd:systemd.0] storage_strategy='memory' (memory only)
[2024/12/31 14:45:23] [ info] [sp] stream processor started
[2024/12/31 14:45:23] [ info] [output:stdout:stdout.0] worker #0 started
[0] systemd.0: [[1735623925.952662000, {}], {"priority"=>"6", "_transport"=>"journal", "_systemd_slice"=>"system.slice", "_boot_id"=>"13b17aa502d94c34a4e1865f76a65813", "_machine_id"=>"09cb1f91a4af4686bc1b57cad2710c32", "_hostname"=>"lychee", "_runtime_scope"=>"system", "_uid"=>"0", "_gid"=>"0", "syslog_facility"=>"4", "tid"=>"531", "code_file"=>"src/login/logind-session.c", "code_line"=>"854", "code_func"=>"session_start", "syslog_identifier"=>"systemd-logind", "message_id"=>"8d45620c1a4348dbb17410da57c60c66", "user_id"=>"chitoku", "_pid"=>"531", "_comm"=>"systemd-logind", "_exe"=>"/usr/lib/systemd/systemd-logind", "_cmdline"=>"/usr/lib/systemd/systemd-logind", "_cap_effective"=>"24420020f", "_systemd_cgroup"=>"/system.slice/systemd-logind.service", "_systemd_unit"=>"systemd-logind.service", "_systemd_invocation_id"=>"85d456458dd14c7789187fccf9e5f38b", "session_id"=>"19", "leader"=>"867592", "message"=>"New session 19 of user chitoku.", "_source_realtime_timestamp"=>"1735623925952519"}]
^C[2024/12/31 14:45:34] [engine] caught signal (SIGINT)
[2024/12/31 14:45:34] [ warn] [engine] service will shutdown in max 5 seconds
[2024/12/31 14:45:34] [ info] [input] pausing systemd.0
[2024/12/31 14:45:34] [ info] [engine] service has stopped (0 pending tasks)
[2024/12/31 14:45:34] [ info] [input] pausing systemd.0
[2024/12/31 14:45:34] [ info] [output:stdout:stdout.0] thread worker #0 stopping...
[2024/12/31 14:45:34] [ info] [output:stdout:stdout.0] thread worker #0 stopped

Valgrind output

$ valgrind --leak-check=full bin/fluent-bit -c config
==867889== Memcheck, a memory error detector
==867889== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==867889== Using Valgrind-3.24.0 and LibVEX; rerun with -h for copyright info
==867889== Command: bin/fluent-bit -c config
==867889==
Fluent Bit v3.2.4
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

______ _                  _    ______ _ _           _____  _____
|  ___| |                | |   | ___ (_) |         |____ |/ __  \
| |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   __   / /`' / /'
|  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / /   \ \  / /
| |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V /.___/ /./ /___
\_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/ \____(_)_____/


[2024/12/31 14:46:03] [ info] [fluent bit] version=3.2.4, commit=40e59d17df, pid=867889
[2024/12/31 14:46:03] [ info] [storage] ver=1.1.6, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2024/12/31 14:46:03] [ info] [simd    ] disabled
[2024/12/31 14:46:03] [ info] [cmetrics] version=0.9.9
[2024/12/31 14:46:03] [ info] [ctraces ] version=0.5.7
[2024/12/31 14:46:03] [ info] [input:systemd:systemd.0] initializing
[2024/12/31 14:46:06] [ info] [output:stdout:stdout.0] worker #0 started
[2024/12/31 14:46:03] [ info] [input:systemd:systemd.0] storage_strategy='memory' (memory only)
[2024/12/31 14:46:06] [ info] [sp] stream processor started
[0] systemd.0: [[1735623981.184742000, {}], {"priority"=>"6", "_transport"=>"journal", "_systemd_slice"=>"system.slice", "_boot_id"=>"13b17aa502d94c34a4e1865f76a65813", "_machine_id"=>"09cb1f91a4af4686bc1b57cad2710c32", "_hostname"=>"lychee", "_runtime_scope"=>"system", "_uid"=>"0", "_gid"=>"0", "syslog_facility"=>"4", "tid"=>"531", "code_file"=>"src/login/logind-session.c", "code_line"=>"854", "code_func"=>"session_start", "syslog_identifier"=>"systemd-logind", "message_id"=>"8d45620c1a4348dbb17410da57c60c66", "user_id"=>"chitoku", "_pid"=>"531", "_comm"=>"systemd-logind", "_exe"=>"/usr/lib/systemd/systemd-logind", "_cmdline"=>"/usr/lib/systemd/systemd-logind", "_cap_effective"=>"24420020f", "_systemd_cgroup"=>"/system.slice/systemd-logind.service", "_systemd_unit"=>"systemd-logind.service", "_systemd_invocation_id"=>"85d456458dd14c7789187fccf9e5f38b", "session_id"=>"20", "leader"=>"868066", "message"=>"New session 20 of user chitoku.", "_source_realtime_timestamp"=>"1735623981184674"}]
^C[2024/12/31 14:46:27] [engine] caught signal (SIGINT)
[2024/12/31 14:46:27] [ warn] [engine] service will shutdown in max 5 seconds
[2024/12/31 14:46:27] [ info] [input] pausing systemd.0
[2024/12/31 14:46:27] [ info] [engine] service has stopped (0 pending tasks)
[2024/12/31 14:46:27] [ info] [input] pausing systemd.0
[2024/12/31 14:46:27] [ info] [output:stdout:stdout.0] thread worker #0 stopping...
[2024/12/31 14:46:27] [ info] [output:stdout:stdout.0] thread worker #0 stopped
==867889==
==867889== HEAP SUMMARY:
==867889==     in use at exit: 0 bytes in 0 blocks
==867889==   total heap usage: 3,080 allocs, 3,080 frees, 1,859,754 bytes allocated
==867889==
==867889== All heap blocks were freed -- no leaks are possible
==867889==
==867889== For lists of detected and suppressed errors, rerun with: -s
==867889== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

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.

1 participant