Skip to content

Commit fa5570d

Browse files
vkalintirisclaudecubic-dev-ai[bot]FerroinCopilot
authored andcommitted
Reinstate systemd-journal plugin. (netdata#21729)
* Revert "Refactor function progress: move timeout and progress authority to the plugin runtime and agent (netdata#21723)" This reverts commit 09cbde1. * Revert "Improve log message when deferred response is too big. (netdata#21720)" This reverts commit 453bc9d. * Revert "Use info-level log for undhandled modification events. (netdata#21719)" This reverts commit 986a187. * Revert "Handle fields with high-cardinality and big payloads. (netdata#21716)" This reverts commit 80a5a9f. * Revert "Set status flag of active journal file to archived on shutdown. (netdata#21707)" This reverts commit c2cd26f. * Revert "Make new journal viewer plugin a mandatory dependency for native packages to ensure clean upgrades. (netdata#21701)" This reverts commit 3ee561b. * Revert "Document logs functionality of otel plugin (netdata#21705)" This reverts commit 83ac4e5. * Revert "Update README links to correct otel-plugin paths (netdata#21699)" This reverts commit 088c20a. * Revert "Add object size and bounds validation when reading journal files. (netdata#21697)" This reverts commit e482ca8. * Revert "Handle transient systemd state flag changes. (netdata#21695)" This reverts commit 5638b80. * Revert "Keep window manager state consistent on `mmap` failures. (netdata#21693)" This reverts commit c56d358. * Revert "Always capture backtrace on panic. (netdata#21681)" This reverts commit 191de6f. * Revert "Use debug level for logging of requests. (netdata#21625)" This reverts commit 2e0dd48. * Revert "Assortement of journal-viewer plugin fixes. (netdata#21612)" This reverts commit 8f048c8. * Revert "Fix 32-bit builds of journal-viewer plugin. (netdata#21580)" This reverts commit d98adc0. * Revert "Fix response when no log entries have been found. (netdata#21581)" This reverts commit d0c06b8. * Revert "Proper decompression of data object payloads. (netdata#21578)" This reverts commit 7f4ce41. * Revert "bring back systemd-journal.plugin setcap (from source install) (netdata#21569)" This reverts commit ad6ee9c. * Revert "Use host-prefixed log directories under containers. (netdata#21568)" This reverts commit 1fac565. * Revert "Allow systemd-journal plugin if journal-viewer does not exist. (netdata#21561)" This reverts commit 2b180ba. * Revert "Add sentry error reporting (netdata#21558)" This reverts commit ffcec41. * Revert "OTEL logs (netdata#21356)" This reverts commit d0905d9. * Add Rust cargo workspace for journal-viewer and otel plugins alongside systemd-journal.plugin Copy the Rust crates from origin/master into src/crates/ as an independent cargo workspace. This brings back the journal-viewer plugin, otel plugin, and their supporting crates (journal-core, journal-engine, journal-index, journal-registry, journal-log-writer, netdata-plugin, etc.) without modifying the existing systemd-journal.plugin or its Rust FFI backend under src/crates/jf/. The outer workspace's Cargo.toml excludes the jf/ directory so the two workspaces remain independent: - src/crates/jf/: used exclusively by the C-based systemd-journal.plugin - src/crates/: the new cargo workspace for journal-viewer and otel plugins * Switch otel-plugin to build from src/crates/ workspace instead of src/crates/jf/ Split the corrosion_import_crate call so that each Rust workspace is imported independently: - journal_reader_ffi from src/crates/jf/ (for systemd-journal.plugin) - otel-plugin from src/crates/ (the main cargo workspace) Also add the otel-plugin rustflags for tracing_unstable and static builds, and update config install paths and docs map to point to src/crates/netdata-otel/otel-plugin/. * Add full build and packaging support for journal-viewer-plugin Add ENABLE_PLUGIN_JOURNAL_VIEWER as a new CMake option, independent of the existing ENABLE_PLUGIN_SYSTEMD_JOURNAL. Both plugins coexist without conflicts or replacements. CMake (CMakeLists.txt): - New ENABLE_PLUGIN_JOURNAL_VIEWER option (default: ON) - Import journal-viewer-plugin from the main src/crates/ workspace via Corrosion, alongside otel-plugin - Rustflags: --cfg=tracing_unstable, io_uring_skip_arch_check on 32-bit, crt-static for static builds - Install target and config file processing for journal-viewer.yaml Packaging: - Debian: new netdata-plugin-journal-viewer package with postinst for cap_dac_read_search capability (Packaging.cmake, postinst) - RPM: new journal-viewer subpackage with caps and file entries (netdata.spec.in) Installer and build entry points: - netdata-installer.sh: --enable/--disable-plugin-journal-viewer CLI flags and setcap/permissions block for the plugin binary - packaging/installer/functions.sh: PLUGIN_JOURNAL_VIEWER CMake feature - packaging/docker/Dockerfile: --enable-plugin-journal-viewer in build - packaging/makeself/jobs/70-netdata-git.install.sh: enable for all architectures except armv6l The plugin defaults to disabled in the installer (like otel) and is explicitly enabled in Docker and static/makeself builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Rename journal-viewer-plugin to otel-signal-viewer-plugin The journal-viewer name was confusing alongside systemd-journal.plugin since both implied journal log viewing. Rename to otel-signal-viewer to reflect the plugin's actual purpose: viewing OTel signals (logs now, traces in the future). Renamed across all layers: - Rust crate: package name, binary name, directory, config file - CMake: ENABLE_PLUGIN_OTEL_SIGNAL_VIEWER option, Corrosion targets, rustflags, install targets, config processing - RPM: subpackage, file lists, exclusions - Debian: package definition, postinst directory - Installer: CLI flags (--enable/--disable-plugin-otel-signal-viewer), variable (ENABLE_OTEL_SIGNAL_VIEWER), permissions block - Docker: installer flag, chmod loop - Makeself: static build flags - Rust source: function name, chart contexts, plugin runtime name, config filename references - Documentation: map.yaml label, crate README * Fix installer flag * Update docs/.map/map.yaml Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Remove duplicate source entry * Guard Recommends tag against old RPM on Amazon Linux 2 * Disable otel-signal-viewer plugin on Windows. * Bring back function cancellation on timeout and useful diagnostic. * Reference correct plugin in README.md * Remove RUSTFLAGS from static builds. * Update function description. * Update otel-signal-viewer configuration file. * Replace runtime relative path resolution with CMake template substitution. Both the otel and otel-signal-viewer plugins used a resolve_relative_path() helper to turn relative config paths into absolute ones at runtime, using Netdata environment variables as the base directory. The otel-signal-viewer plugin already had a .yaml.in template with CMake variables for its paths, making its resolve_relative_path() call redundant (the paths were already absolute after CMake substitution). Unify both plugins on the CMake approach: - Convert otel.yaml to otel.yaml.in with @configdir_POST@ and @logdir_POST@ so paths are absolute at install time. - Add configure_file() in CMakeLists.txt for the otel plugin config (matching the existing pattern used by otel-signal-viewer). - Remove resolve_relative_path() from both plugins since all stock config paths are now absolute after CMake processing. User-edited configs must use absolute paths going forward, otherwise relative paths will be resolved relative to the plugin's runtime path. * Address packaging review comments. - Restore BUILD_ARCH ARG in Dockerfile for correct arch in cross-build CI. - Deduplicate NETDATA_CMAKE_OPTIONS in makeself static build script. - Add Obsoletes for journal-viewer in RPM otel-signal-viewer package. - Add Replaces/Conflicts for journal-viewer in DEB otel-signal-viewer package. * Finish restoring BUILD_ARCH for Docker images. * Fix up dependencies for native packages properly. In reality we actually need to use a transitional package to migrate users back to the journal viewer instead of obsoleting the old package. * Make the signal viewer plugin a mandatory dependency of the OTel plugin. * Address Cubic review comments. * Fix DEB package dependencies. * Update src/collectors/systemd-journal.plugin/passive_journal_centralization_guide_no_encryption.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Revert "Remove RUSTFLAGS from static builds." This reverts commit 3ff5ae3. The per-target corrosion_add_target_rustflags() for journal_reader_ffi does not work for static builds on Alpine/musl because Corrosion determines native-static-libs during CMake configure time, before target-specific rustflags are applied. Without crt-static during that extraction, Rust reports -lgcc_s as a required native library, but Alpine doesn't ship libgcc_s.a (only libgcc_s.so). The -static linker flag then fails to find it. The global RUSTFLAGS export in 70-netdata-git.install.sh is set before CMake runs, so Corrosion's configure-time execute_process inherits it from the environment and correctly reports -lgcc_eh (which exists as a static archive) instead of -lgcc_s. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix static build permissions for otel plugins. The static build post-installer was missing otel-plugin and otel-signal-viewer-plugin from the ownership/permissions setup, causing the netdata user to get "Permission denied" when trying to execute them. The DEB packages handled this correctly via their postinst scripts, but the static build equivalent in install-or-update.sh was never updated when these plugins were added. * Fix missing chmod 4750 fallback for otel-signal-viewer-plugin when setcap is unavailable. The else branch (no setcap) was missing the fallback chmod for otel-signal-viewer-plugin, so it would lack needed privileges on systems without setcap. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 952af71 commit fa5570d

File tree

111 files changed

+19204
-344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+19204
-344
lines changed

.github/labeler.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ collectors/systemd-journal:
195195
- any:
196196
- changed-files:
197197
- any-glob-to-any-file:
198-
- src/crates/netdata-log-viewer/**
199-
- docs/logs/**
198+
- src/collectors/systemd-journal.plugin/**
200199

201200
collectors/tc:
202201
- any:

CMakeLists.txt

Lines changed: 110 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ mark_as_advanced(ENABLE_DASHBOARD)
132132
# Data collection plugins
133133
option(ENABLE_PLUGIN_GO "Enable metric collectors written in Go" ${DEFAULT_FEATURE_STATE})
134134
option(ENABLE_PLUGIN_OTEL "Enable collection of OpenTelemetry metrics and logs" ${DEFAULT_FEATURE_STATE})
135-
option(ENABLE_NETDATA_JOURNAL_FILE_READER "Enable journal viewer plugin" ${DEFAULT_FEATURE_STATE})
135+
cmake_dependent_option(ENABLE_PLUGIN_OTEL_SIGNAL_VIEWER "Enable OTel signal viewer plugin" ${DEFAULT_FEATURE_STATE} "NOT OS_WINDOWS" False)
136136
option(ENABLE_PLUGIN_PYTHON "Enable metric collectors written in Python" ${DEFAULT_FEATURE_STATE})
137137

138138
cmake_dependent_option(ENABLE_PLUGIN_APPS "Enable per-process resource usage monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX OR OS_FREEBSD OR OS_MACOS OR OS_WINDOWS" False)
@@ -151,6 +151,7 @@ cmake_dependent_option(ENABLE_PLUGIN_NETWORK_VIEWER "Enable network viewer funct
151151
cmake_dependent_option(ENABLE_PLUGIN_NFACCT "Enable Linux NFACCT metric collection" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
152152
cmake_dependent_option(ENABLE_PLUGIN_PERF "Enable Linux performance counter monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
153153
cmake_dependent_option(ENABLE_PLUGIN_SLABINFO "Enable Linux kernel SLAB allocator monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
154+
cmake_dependent_option(ENABLE_PLUGIN_SYSTEMD_JOURNAL "Enable systemd journal log collection" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
154155
cmake_dependent_option(ENABLE_PLUGIN_SYSTEMD_UNITS "Enable systemd units information collection" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
155156
cmake_dependent_option(ENABLE_PLUGIN_XENSTAT "Enable Xen domain monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
156157

@@ -184,9 +185,10 @@ mark_as_advanced(ENABLE_LIBUNWIND)
184185
cmake_dependent_option(FORCE_LEGACY_LIBBPF "Force usage of libbpf 0.0.9 instead of the latest version." False "ENABLE_PLUGIN_EBPF" False)
185186
mark_as_advanced(FORCE_LEGACY_LIBBPF)
186187

188+
cmake_dependent_option(ENABLE_NETDATA_JOURNAL_FILE_READER "Enable netdata's journal file reader implementation" False "ENABLE_PLUGIN_SYSTEMD_JOURNAL" False)
187189

188190
# Setup Rust/Corrosion for plugins that need it
189-
if(ENABLE_NETDATA_JOURNAL_FILE_READER OR ENABLE_PLUGIN_OTEL)
191+
if(ENABLE_NETDATA_JOURNAL_FILE_READER OR ENABLE_PLUGIN_OTEL OR ENABLE_PLUGIN_OTEL_SIGNAL_VIEWER)
190192
include(FetchContent)
191193
FetchContent_Declare(
192194
Corrosion
@@ -195,41 +197,48 @@ if(ENABLE_NETDATA_JOURNAL_FILE_READER OR ENABLE_PLUGIN_OTEL)
195197
)
196198
FetchContent_MakeAvailable(Corrosion)
197199

198-
if(ENABLE_NETDATA_JOURNAL_FILE_READER AND ENABLE_PLUGIN_OTEL)
199-
corrosion_import_crate(MANIFEST_PATH src/crates/Cargo.toml
200-
CRATES journal-viewer-plugin otel-plugin)
201-
elseif(ENABLE_NETDATA_JOURNAL_FILE_READER)
202-
corrosion_import_crate(MANIFEST_PATH src/crates/Cargo.toml
203-
CRATES journal-viewer-plugin)
204-
elseif(ENABLE_PLUGIN_OTEL)
200+
if(ENABLE_NETDATA_JOURNAL_FILE_READER)
201+
corrosion_import_crate(MANIFEST_PATH src/crates/jf/Cargo.toml
202+
CRATES journal_reader_ffi)
203+
endif()
204+
205+
# Import crates from the main cargo workspace
206+
set(_WORKSPACE_CRATES "")
207+
if(ENABLE_PLUGIN_OTEL)
208+
list(APPEND _WORKSPACE_CRATES otel-plugin)
209+
endif()
210+
if(ENABLE_PLUGIN_OTEL_SIGNAL_VIEWER)
211+
list(APPEND _WORKSPACE_CRATES otel-signal-viewer-plugin)
212+
endif()
213+
if(_WORKSPACE_CRATES)
205214
corrosion_import_crate(MANIFEST_PATH src/crates/Cargo.toml
206-
CRATES otel-plugin)
215+
CRATES ${_WORKSPACE_CRATES})
207216
endif()
208217

209-
if(ENABLE_NETDATA_JOURNAL_FILE_READER)
210-
set(JOURNAL_VIEWER_RUSTFLAGS --cfg=tracing_unstable)
218+
if(ENABLE_PLUGIN_OTEL)
219+
if(STATIC_BUILD)
220+
corrosion_add_target_rustflags(otel-plugin --cfg=tracing_unstable "-C" "target-feature=+crt-static")
221+
else()
222+
corrosion_add_target_rustflags(otel-plugin --cfg=tracing_unstable)
223+
endif()
224+
endif()
225+
226+
if(ENABLE_PLUGIN_OTEL_SIGNAL_VIEWER)
227+
set(OTEL_SIGNAL_VIEWER_RUSTFLAGS --cfg=tracing_unstable)
211228

212229
# We depend (transitively) on the `io-uring` crate which doesn't provide
213230
# prebuilt bindings for 32-bit arches. Considering this is a compile-time
214231
# and not a runtime dependency (because we don't use foyer's io-uring
215232
# engine), we can simply skip the check.
216233
if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
217-
list(APPEND JOURNAL_VIEWER_RUSTFLAGS --cfg=io_uring_skip_arch_check)
234+
list(APPEND OTEL_SIGNAL_VIEWER_RUSTFLAGS --cfg=io_uring_skip_arch_check)
218235
endif()
219236

220237
if(STATIC_BUILD)
221-
list(APPEND JOURNAL_VIEWER_RUSTFLAGS "-C" "target-feature=+crt-static")
238+
list(APPEND OTEL_SIGNAL_VIEWER_RUSTFLAGS "-C" "target-feature=+crt-static")
222239
endif()
223240

224-
corrosion_add_target_rustflags(journal-viewer-plugin ${JOURNAL_VIEWER_RUSTFLAGS})
225-
endif()
226-
227-
if(ENABLE_PLUGIN_OTEL)
228-
if(STATIC_BUILD)
229-
corrosion_add_target_rustflags(otel-plugin --cfg=tracing_unstable "-C" "target-feature=+crt-static")
230-
else()
231-
corrosion_add_target_rustflags(otel-plugin --cfg=tracing_unstable)
232-
endif()
241+
corrosion_add_target_rustflags(otel-signal-viewer-plugin ${OTEL_SIGNAL_VIEWER_RUSTFLAGS})
233242
endif()
234243
endif()
235244

@@ -1708,6 +1717,22 @@ set(STATSD_PLUGIN_FILES
17081717
src/collectors/statsd.plugin/statsd.c
17091718
)
17101719

1720+
set(SYSTEMD_JOURNAL_PLUGIN_FILES
1721+
src/collectors/systemd-journal.plugin/systemd-journal-fstat.c
1722+
src/collectors/systemd-journal.plugin/systemd-internals.h
1723+
src/collectors/systemd-journal.plugin/systemd-main.c
1724+
src/collectors/systemd-journal.plugin/systemd-journal.c
1725+
src/collectors/systemd-journal.plugin/systemd-journal-annotations.c
1726+
src/collectors/systemd-journal.plugin/systemd-journal-files.c
1727+
src/collectors/systemd-journal.plugin/systemd-journal-watcher.c
1728+
src/collectors/systemd-journal.plugin/systemd-journal-dyncfg.c
1729+
src/collectors/systemd-journal.plugin/provider/netdata_provider.c
1730+
src/collectors/systemd-journal.plugin/provider/netdata_provider.h
1731+
src/collectors/systemd-journal.plugin/provider/rust_provider.h
1732+
src/libnetdata/os/system-maps/system-services.h
1733+
src/collectors/systemd-journal.plugin/systemd-journal-sampling.h
1734+
)
1735+
17111736
set(SYSTEMD_UNITS_PLUGIN_FILES
17121737
src/collectors/systemd-units.plugin/plugin_systemd_units.c
17131738
)
@@ -2758,6 +2783,36 @@ if(ENABLE_PLUGIN_CGROUP_NETWORK)
27582783
DESTINATION usr/libexec/netdata/plugins.d)
27592784
endif()
27602785

2786+
# Enable rust implementation if we don't have systemd and we want the journal plugin
2787+
if(ENABLE_PLUGIN_SYSTEMD_JOURNAL AND NOT SYSTEMD_FOUND)
2788+
if (NOT ENABLE_NETDATA_JOURNAL_FILE_READER)
2789+
message(WARNING "Systemd journal package not found, will try netdata's journal reader which requires cargo.")
2790+
set(ENABLE_NETDATA_JOURNAL_FILE_READER True)
2791+
endif()
2792+
endif()
2793+
2794+
if(ENABLE_PLUGIN_SYSTEMD_JOURNAL)
2795+
add_executable(systemd-journal.plugin ${SYSTEMD_JOURNAL_PLUGIN_FILES})
2796+
2797+
if(ENABLE_NETDATA_JOURNAL_FILE_READER)
2798+
target_compile_definitions(systemd-journal.plugin PRIVATE HAVE_RUST_PROVIDER)
2799+
target_link_libraries(systemd-journal.plugin journal_reader_ffi)
2800+
endif()
2801+
2802+
target_link_libraries(systemd-journal.plugin libnetdata)
2803+
2804+
install(TARGETS systemd-journal.plugin
2805+
COMPONENT plugin-systemd-journal
2806+
DESTINATION usr/libexec/netdata/plugins.d)
2807+
2808+
if(BUILD_FOR_PACKAGING)
2809+
install(FILES
2810+
${PKG_FILES_PATH}/copyright
2811+
COMPONENT plugin-systemd-journal
2812+
DESTINATION usr/share/doc/netdata-plugin-systemd-journal)
2813+
endif()
2814+
endif()
2815+
27612816
if(ENABLE_PLUGIN_SYSTEMD_UNITS)
27622817
if(NOT SYSTEMD_FOUND)
27632818
message(FATAL_ERROR "Systemd units plugin requires systemd, but systemd was not found.")
@@ -3225,10 +3280,6 @@ if(ENABLE_PLUGIN_OTEL)
32253280
RUNTIME DESTINATION usr/libexec/netdata/plugins.d
32263281
COMPONENT plugin-otel)
32273282

3228-
install(FILES src/crates/netdata-otel/otel-plugin/configs/otel.yaml
3229-
COMPONENT plugin-otel
3230-
DESTINATION usr/lib/netdata/conf.d)
3231-
32323283
install(FILES src/crates/netdata-otel/otel-plugin/configs/otel.d/v1/metrics/hostmetrics-receiver.yaml
32333284
COMPONENT plugin-otel
32343285
DESTINATION usr/lib/netdata/conf.d/otel.d/v1/metrics)
@@ -3237,14 +3288,14 @@ if(ENABLE_PLUGIN_OTEL)
32373288
endif()
32383289

32393290
#
3240-
# journal-viewer-plugin
3291+
# otel-signal-viewer
32413292
#
3242-
# Handle journal-viewer plugin
3243-
if(ENABLE_NETDATA_JOURNAL_FILE_READER)
3244-
corrosion_install(TARGETS journal-viewer-plugin
3293+
# Handle OTel signal viewer plugin
3294+
if(ENABLE_PLUGIN_OTEL_SIGNAL_VIEWER)
3295+
corrosion_install(TARGETS otel-signal-viewer-plugin
32453296
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
32463297
RUNTIME DESTINATION usr/libexec/netdata/plugins.d
3247-
COMPONENT plugin-journal-viewer)
3298+
COMPONENT plugin-otel-signal-viewer)
32483299
endif()
32493300

32503301
#
@@ -3321,16 +3372,6 @@ set(logdir_POST "${LOG_DIR}")
33213372
set(netdata_user_POST "${NETDATA_USER}")
33223373
set(netdata_group_POST "${NETDATA_USER}")
33233374

3324-
if(ENABLE_NETDATA_JOURNAL_FILE_READER)
3325-
configure_file(src/crates/netdata-log-viewer/journal-viewer-plugin/configs/journal-viewer.yaml.in
3326-
src/crates/netdata-log-viewer/journal-viewer-plugin/configs/journal-viewer.yaml
3327-
@ONLY)
3328-
3329-
install(FILES ${CMAKE_BINARY_DIR}/src/crates/netdata-log-viewer/journal-viewer-plugin/configs/journal-viewer.yaml
3330-
COMPONENT plugin-journal-viewer
3331-
DESTINATION usr/lib/netdata/conf.d)
3332-
endif()
3333-
33343375
if(NOT OS_WINDOWS)
33353376
configure_file(src/claim/netdata-claim.sh.in src/claim/netdata-claim.sh @ONLY)
33363377
install(PROGRAMS
@@ -3362,6 +3403,32 @@ install(PROGRAMS
33623403
COMPONENT netdata
33633404
DESTINATION usr/libexec/netdata/plugins.d)
33643405

3406+
#
3407+
# otel config
3408+
#
3409+
if(ENABLE_PLUGIN_OTEL)
3410+
configure_file(src/crates/netdata-otel/otel-plugin/configs/otel.yaml.in
3411+
src/crates/netdata-otel/otel-plugin/configs/otel.yaml
3412+
@ONLY)
3413+
3414+
install(FILES ${CMAKE_BINARY_DIR}/src/crates/netdata-otel/otel-plugin/configs/otel.yaml
3415+
COMPONENT plugin-otel
3416+
DESTINATION usr/lib/netdata/conf.d)
3417+
endif()
3418+
3419+
#
3420+
# otel-signal-viewer config
3421+
#
3422+
if(ENABLE_PLUGIN_OTEL_SIGNAL_VIEWER)
3423+
configure_file(src/crates/netdata-log-viewer/otel-signal-viewer-plugin/configs/otel-signal-viewer.yaml.in
3424+
src/crates/netdata-log-viewer/otel-signal-viewer-plugin/configs/otel-signal-viewer.yaml
3425+
@ONLY)
3426+
3427+
install(FILES ${CMAKE_BINARY_DIR}/src/crates/netdata-log-viewer/otel-signal-viewer-plugin/configs/otel-signal-viewer.yaml
3428+
COMPONENT plugin-otel-signal-viewer
3429+
DESTINATION usr/lib/netdata/conf.d)
3430+
endif()
3431+
33653432
#
33663433
# statsd
33673434
#
@@ -3749,6 +3816,7 @@ endif()
37493816

37503817
# confs
37513818
install(FILES
3819+
src/collectors/systemd-journal.plugin/schema.d/systemd-journal%3Amonitored-directories.json
37523820
src/health/schema.d/health%3Aalert%3Aprototype.json
37533821
COMPONENT netdata
37543822
DESTINATION usr/lib/netdata/conf.d/schema.d)

docs/.map/map.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ https://github.com/netdata/netdata/edit/master/src/web/api/exporters/shell/READM
139139
,,,,,
140140
,,,,,
141141
logs_integrations,,,,,
142-
https://github.com/netdata/netdata/edit/master/docs/logs/README.md,Journal Viewer Plugin,Published,Logs/Systemd Journal Logs,,View and analyze logs available in systemd journal
143-
https://github.com/netdata/netdata/edit/master/docs/logs/forward_secure_sealing.md,Forward Secure Sealing (FSS) in Systemd-Journal,Published,Logs/Systemd Journal Logs,,
142+
https://github.com/netdata/netdata/edit/master/src/collectors/systemd-journal.plugin/README.md,Systemd Journal Plugin Reference,Published,Logs/Systemd Journal Logs,,View and analyze logs available in systemd journal
143+
https://github.com/netdata/netdata/edit/master/src/collectors/systemd-journal.plugin/forward_secure_sealing.md,Forward Secure Sealing (FSS) in Systemd-Journal,Published,Logs/Systemd Journal Logs,,
144144
https://github.com/netdata/netdata/edit/master/src/collectors/windows-events.plugin/README.md,Windows Events Plugin Reference,Published,Logs/Windows Event Logs,,
145145
https://github.com/netdata/netdata/edit/master/src/collectors/log2journal/README.md,log2journal,Published,Logs/log2journal,,
146146
https://github.com/netdata/netdata/edit/master/src/libnetdata/log/systemd-cat-native.md,systemd-cat-native,Published,Logs/systemd-cat-native,,
147147
https://github.com/netdata/netdata/edit/master/docs/observability-centralization-points/logs-centralization-points-with-systemd-journald/README.md,Logs Centralization Points with systemd-journald,Published,Logs/Logs Centralization Points with systemd-journald,,
148148
https://github.com/netdata/netdata/edit/master/docs/observability-centralization-points/logs-centralization-points-with-systemd-journald/passive-journal-centralization-with-encryption-using-self-signed-certificates.md,Passive journal centralization with encryption using self-signed certificates,Published,Logs/Logs Centralization Points with systemd-journald,,
149149
https://github.com/netdata/netdata/edit/master/docs/observability-centralization-points/logs-centralization-points-with-systemd-journald/passive-journal-centralization-without-encryption.md,Passive journal centralization without encryption,Published,Logs/Logs Centralization Points with systemd-journald,,
150-
https://github.com/netdata/netdata/edit/master/docs/logs/active_journal_centralization_guide_no_encryption.md,Active journal source without encryption,Published,Logs/Logs Centralization Points with systemd-journald,,
150+
https://github.com/netdata/netdata/edit/master/src/collectors/systemd-journal.plugin/active_journal_centralization_guide_no_encryption.md,Active journal source without encryption,Published,Logs/Logs Centralization Points with systemd-journald,,
151151
,,,,,
152152
,,,,,
153153
https://github.com/netdata/netdata/edit/master/docs/top-monitoring-netdata-functions.md,Top Consumers,Published,Top Consumers,,Present the Netdata Functions what these are and why they should be used.

docs/category-overview-pages/working-with-logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This section talks about the ways Netdata collects and visualizes logs.
44

5-
The [journal viewer plugin](/docs/logs/README.md) is the core Netdata component for reading systemd journal logs.
5+
The [systemd journal plugin](/src/collectors/systemd-journal.plugin) is the core Netdata component for reading systemd journal logs.
66

77
For structured logs, Netdata provides tools like [log2journal](/src/collectors/log2journal/README.md) and [systemd-cat-native](/src/libnetdata/log/systemd-cat-native.md) to convert them into compatible systemd journal entries.
88

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Logs tab
22

3-
The Logs tab is using the [`journal-viewer` plugin](/docs/logs/README.md), to present a structured view into your infrastructure's `systemd` logs.
3+
The Logs tab is using the [`systemd` journal plugin](/src/collectors/systemd-journal.plugin/README.md), to present a structured view into your infrastructure's `systemd` logs.
44

55
We have a thorough section explaining how you can [work with logs](https://learn.netdata.cloud/docs/logs), detailing how the plugin works, and what other utilities are used under the hood to provide you with the visualizations and the log entries.
66

7-
The [`journal-viewer` plugin](/docs/logs/README.md) documentation has information about:
7+
The [`systemd` journal plugin](/src/collectors/systemd-journal.plugin/README.md) documentation has information about:
88

9-
- [Key features the plugin provides](/docs/logs/README.md#key-features)
10-
- [Journal sources](/docs/logs/README.md#journal-sources)
11-
- [Journal fields](/docs/logs/README.md#journal-fields)
12-
- [Full-text search](/docs/logs/README.md#full-text-search)
13-
- [Query performance](/docs/logs/README.md#query-performance)
14-
- [Performance at scale](/docs/logs/README.md#performance-at-scale)
9+
- [Key features the plugin provides](/src/collectors/systemd-journal.plugin/README.md#key-features)
10+
- [Journal sources](/src/collectors/systemd-journal.plugin/README.md#journal-sources)
11+
- [Journal fields](/src/collectors/systemd-journal.plugin/README.md#journal-fields)
12+
- [Full-text search](/src/collectors/systemd-journal.plugin/README.md#full-text-search)
13+
- [Query performance](/src/collectors/systemd-journal.plugin/README.md#query-performance)
14+
- [Performance at scale](/src/collectors/systemd-journal.plugin/README.md#performance-at-scale)
1515

1616
We recommend you to read through that document, to better understand how the plugin and the visualizations work.

docs/developer-and-contributor-corner/dyncfg.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ The health module manages alert definitions through DynCfg:
150150
</details>
151151

152152
<details>
153-
<summary><strong>journal-viewer-plugin (External Plugin, Rust)</strong></summary><br/>
153+
<summary><strong>systemd-journal.plugin (External Plugin, C)</strong></summary><br/>
154154

155-
External Rust plugin that provides systemd journal log viewing and analysis:
155+
External C plugin that manages journal directory configurations:
156156

157-
- **Location**: `src/crates/netdata-log-viewer/journal-viewer-plugin/`
158-
- **Use Case**: Viewing and analyzing systemd journal logs
157+
- **File**: `src/collectors/systemd-journal.plugin/systemd-journal-dyncfg.c`
158+
- **Pattern**: SINGLE configuration type
159+
- **Use Case**: Managing journal directory paths
159160

160161
<br/>
161162
</details>

docs/observability-centralization-points/logs-centralization-points-with-systemd-journald/passive-journal-centralization-with-encryption-using-self-signed-certificates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This means that if both certificates are issued by the same certificate authorit
2020

2121
## Self-signed certificates
2222

23-
To simplify the process of creating and managing self-signed certificates, we have created [this bash script](https://github.com/netdata/netdata/blob/master/docs/logs/systemd-journal-self-signed-certs.sh).
23+
To simplify the process of creating and managing self-signed certificates, we have created [this bash script](https://github.com/netdata/netdata/blob/master/src/collectors/systemd-journal.plugin/systemd-journal-self-signed-certs.sh).
2424

2525
This helps to also automate the distribution of the certificates to your servers (it generates a new bash script for each of your servers, which includes everything required, including the certificates).
2626

@@ -34,7 +34,7 @@ On the server that will issue the certificates (usually the centralization serve
3434
sudo apt-get install systemd-journal-remote openssl
3535

3636
# download the script and make it executable
37-
curl >systemd-journal-self-signed-certs.sh "https://raw.githubusercontent.com/netdata/netdata/master/docs/logs/systemd-journal-self-signed-certs.sh"
37+
curl >systemd-journal-self-signed-certs.sh "https://raw.githubusercontent.com/netdata/netdata/master/src/collectors/systemd-journal.plugin/systemd-journal-self-signed-certs.sh"
3838
chmod 750 systemd-journal-self-signed-certs.sh
3939
```
4040

0 commit comments

Comments
 (0)