From d67b01b29fabaab3cfc69c5b10b8019efd488009 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Jul 2026 07:57:39 +0000 Subject: [PATCH 1/3] docs: document JSON log format toggle Add a setup-robusta page describing global.enableJsonLogsFormat, which switches robusta-runner (and KRR scan jobs, and HolmesGPT when deployed via the chart) to structured JSON logs. Also documents the krr-enforcer chart's own enableJsonLogsFormat value. Part of ROB-459 / ROB-694. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01AozEpN8uwPRQuF8FPRX4Jy Signed-off-by: Claude --- docs/setup-robusta/index.rst | 1 + docs/setup-robusta/json-logging.rst | 52 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 docs/setup-robusta/json-logging.rst diff --git a/docs/setup-robusta/index.rst b/docs/setup-robusta/index.rst index 7a5208ede..6c84d2080 100644 --- a/docs/setup-robusta/index.rst +++ b/docs/setup-robusta/index.rst @@ -16,6 +16,7 @@ multi-cluster upgrade tuning-performance + json-logging configuration-secrets openshift read-only-service-account diff --git a/docs/setup-robusta/json-logging.rst b/docs/setup-robusta/json-logging.rst new file mode 100644 index 000000000..a8cf583d1 --- /dev/null +++ b/docs/setup-robusta/json-logging.rst @@ -0,0 +1,52 @@ +JSON Log Format +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +By default, Robusta components emit human-readable, colored text logs. You can +switch them to **structured JSON logs** (one JSON object per line), which are +easier to index, search, and filter with log collectors such as Filebeat, +Fluent Bit, or Loki. + +Enabling JSON Logs +------------------------------------- + +Set the ``global.enableJsonLogsFormat`` value in your Helm values: + +.. code-block:: yaml + + global: + enableJsonLogsFormat: true + +This single switch is shared across the Robusta components: + +* **robusta-runner** emits JSON logs. +* **KRR** scan jobs inherit the setting from the runner (when scan results are + pushed back over the API, which is the default). +* **HolmesGPT** (when deployed via the chart) emits JSON logs as well — the + ``global`` value is passed through to the Holmes sub-chart. + +The default is ``false``, which preserves the existing colored text output. No +change is needed unless you want JSON logs. + +Log Format +------------------------------------- + +When enabled, each log line is a JSON object. The ``level`` field is emitted as +``severity`` (matching the Google Cloud Logging convention used across Robusta +services): + +.. code-block:: json + + {"asctime": "2026-07-14T11:54:51", "severity": "INFO", "name": "robusta", "message": "..."} + +KRR Enforcer +------------------------------------- + +The KRR Enforcer is installed from its own chart (``krr-enforcer``) rather than +as part of the Robusta chart, so it exposes its own value: + +.. code-block:: yaml + + enableJsonLogsFormat: true + +If it is deployed under an umbrella chart that sets ``global.enableJsonLogsFormat``, +that value is honored as a fallback. From 9b849adedb108309dc0e64f337974f04dbb854db Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Jul 2026 08:25:11 +0000 Subject: [PATCH 2/3] docs: drop KRR Enforcer section from JSON logging page Remove the krr-enforcer references; the page now covers only the Robusta chart components (runner, KRR scan jobs, HolmesGPT). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01AozEpN8uwPRQuF8FPRX4Jy Signed-off-by: Claude --- docs/setup-robusta/json-logging.rst | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/docs/setup-robusta/json-logging.rst b/docs/setup-robusta/json-logging.rst index a8cf583d1..79adaa5c8 100644 --- a/docs/setup-robusta/json-logging.rst +++ b/docs/setup-robusta/json-logging.rst @@ -37,16 +37,3 @@ services): .. code-block:: json {"asctime": "2026-07-14T11:54:51", "severity": "INFO", "name": "robusta", "message": "..."} - -KRR Enforcer -------------------------------------- - -The KRR Enforcer is installed from its own chart (``krr-enforcer``) rather than -as part of the Robusta chart, so it exposes its own value: - -.. code-block:: yaml - - enableJsonLogsFormat: true - -If it is deployed under an umbrella chart that sets ``global.enableJsonLogsFormat``, -that value is honored as a fallback. From bcbe4907d30e696a4cb214ec82122c3103416750 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Jul 2026 08:29:59 +0000 Subject: [PATCH 3/3] docs: drop Log Format section from JSON logging page Remove the JSON log-line format example; the page now just covers how to enable JSON logs and which components it affects. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01AozEpN8uwPRQuF8FPRX4Jy Signed-off-by: Claude --- docs/setup-robusta/json-logging.rst | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/setup-robusta/json-logging.rst b/docs/setup-robusta/json-logging.rst index 79adaa5c8..5c7c5ce12 100644 --- a/docs/setup-robusta/json-logging.rst +++ b/docs/setup-robusta/json-logging.rst @@ -26,14 +26,3 @@ This single switch is shared across the Robusta components: The default is ``false``, which preserves the existing colored text output. No change is needed unless you want JSON logs. - -Log Format -------------------------------------- - -When enabled, each log line is a JSON object. The ``level`` field is emitted as -``severity`` (matching the Google Cloud Logging convention used across Robusta -services): - -.. code-block:: json - - {"asctime": "2026-07-14T11:54:51", "severity": "INFO", "name": "robusta", "message": "..."}