Fix response when no log entries have been found.#21581
Merged
vkalintiris merged 1 commit intonetdata:masterfrom Jan 16, 2026
Merged
Fix response when no log entries have been found.#21581vkalintiris merged 1 commit intonetdata:masterfrom
vkalintiris merged 1 commit intonetdata:masterfrom
Conversation
stelfrag
approved these changes
Jan 16, 2026
vkalintiris
added a commit
to vkalintiris/netdata
that referenced
this pull request
Feb 10, 2026
)" This reverts commit d0c06b8.
vkalintiris
added a commit
to vkalintiris/netdata
that referenced
this pull request
Feb 10, 2026
)" This reverts commit d0c06b8.
vkalintiris
added a commit
that referenced
this pull request
Feb 11, 2026
* Revert "Refactor function progress: move timeout and progress authority to the plugin runtime and agent (#21723)" This reverts commit 09cbde1. * Revert "Improve log message when deferred response is too big. (#21720)" This reverts commit 453bc9d. * Revert "Use info-level log for undhandled modification events. (#21719)" This reverts commit 986a187. * Revert "Handle fields with high-cardinality and big payloads. (#21716)" This reverts commit 80a5a9f. * Revert "Set status flag of active journal file to archived on shutdown. (#21707)" This reverts commit c2cd26f. * Revert "Make new journal viewer plugin a mandatory dependency for native packages to ensure clean upgrades. (#21701)" This reverts commit 3ee561b. * Revert "Document logs functionality of otel plugin (#21705)" This reverts commit 83ac4e5. * Revert "Update README links to correct otel-plugin paths (#21699)" This reverts commit 088c20a. * Revert "Add object size and bounds validation when reading journal files. (#21697)" This reverts commit e482ca8. * Revert "Handle transient systemd state flag changes. (#21695)" This reverts commit 5638b80. * Revert "Keep window manager state consistent on `mmap` failures. (#21693)" This reverts commit c56d358. * Revert "Always capture backtrace on panic. (#21681)" This reverts commit 191de6f. * Revert "Use debug level for logging of requests. (#21625)" This reverts commit 2e0dd48. * Revert "Assortement of journal-viewer plugin fixes. (#21612)" This reverts commit 8f048c8. * Revert "Fix 32-bit builds of journal-viewer plugin. (#21580)" This reverts commit d98adc0. * Revert "Fix response when no log entries have been found. (#21581)" This reverts commit d0c06b8. * Revert "Proper decompression of data object payloads. (#21578)" This reverts commit 7f4ce41. * Revert "bring back systemd-journal.plugin setcap (from source install) (#21569)" This reverts commit ad6ee9c. * Revert "Use host-prefixed log directories under containers. (#21568)" This reverts commit 1fac565. * Revert "Allow systemd-journal plugin if journal-viewer does not exist. (#21561)" This reverts commit 2b180ba. * Revert "Add sentry error reporting (#21558)" This reverts commit ffcec41. * Revert "OTEL logs (#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>
Ancairon
pushed a commit
to Ancairon/netdata
that referenced
this pull request
Feb 12, 2026
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SSIA.
Summary by cubic
Return an empty schema object ({}) and an empty rows array ([]) when no log entries are found, fixing the response shape and preventing client errors.
Written for commit b3a62ff. Summary will update on new commits.