Skip to content

feat(audit-logs): updates opensearchexporter to use a logs_index_on_error flag for backup error records - #1982

Open
olandr wants to merge 2 commits into
mainfrom
feat/custom-osexporter-audit
Open

feat(audit-logs): updates opensearchexporter to use a logs_index_on_error flag for backup error records#1982
olandr wants to merge 2 commits into
mainfrom
feat/custom-osexporter-audit

Conversation

@olandr

@olandr olandr commented Sep 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@olandr
olandr requested a review from a team as a code owner September 8, 2026 09:27
Copilot AI lite review requested due to automatic review settings September 10, 2026 15:25
@olandr
olandr force-pushed the feat/custom-osexporter-audit branch from 3576cc2 to 4ff6927 Compare September 10, 2026 15:25
@olandr
olandr force-pushed the feat/custom-osexporter-audit branch from 4ff6927 to 55b8487 Compare September 10, 2026 15:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The logs_index_on_error templating is incorrect in logs/charts/templates/ingester-collector.yaml (likely invalid YAML output) and ${index} is used inconsistently in logs/charts/templates/_external-audit-exporter.tpl, likely producing an unresolved error index name.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the OpenSearch exporter configuration across the logs and audit-logs Helm charts to support routing failed export attempts into a dedicated “error/deadletter” index via a new logs_index_on_error setting, and bumps the audit-logs chart/plugin versions accordingly.

Changes:

  • Add logs_index_on_error to multiple OpenSearch exporter stanzas (failover, external, syslog, ingester, and collector templates).
  • Switch the OTEL collector build to a forked opensearchexporter module/version that presumably supports logs_index_on_error.
  • Bump audit-logs chart and plugin definition versions from 0.2.180.2.19.
File summaries
File Description
logs/charts/templates/logs-collector.yaml Adds logs_index_on_error for OpenSearch exporters (standard + cronus failover pairs).
logs/charts/templates/ingester-collector.yaml Adds logs_index_on_error for ingester OpenSearch exporters (needs template fix).
logs/charts/templates/_syslog-audit-filter-config.tpl Adds logs_index_on_error for syslog non-audit OpenSearch exporters.
logs/charts/templates/_external-config.tpl Adds logs_index_on_error for external OpenSearch exporters.
logs/charts/templates/_external-audit-exporter.tpl Adds logs_index_on_error for external syslog audit OpenSearch exporters (needs index placeholder fix).
logs/build/otel-collector-builder-config.yaml Updates OpenSearch exporter module to github.com/cloudoperators/.../opensearchexporter v0.152.6.
audit-logs/plugindefinition.yaml Bumps plugin definition version and referenced chart version to 0.2.19.
audit-logs/charts/templates/ingester-collector.yaml Adds logs_index_on_error pointing to a *-deadletter index for ingesters.
audit-logs/charts/templates/audit-logs-collector.yaml Adds logs_index_on_error for the audit logs collector OpenSearch exporter.
audit-logs/charts/templates/_failover-config.tpl Adds logs_index_on_error for the audit logs failover OpenSearch exporter config.
audit-logs/charts/Chart.yaml Bumps chart version to 0.2.19.
Review details

Suppressed comments (2)

logs/charts/templates/ingester-collector.yaml:168

  • Same issue as above: {{ $name | quote }}-error will render invalid YAML. Use printf to append the suffix before quoting.
        logs_index: {{ $name | quote }}
        logs_index_on_error: {{ $name | quote }}-error

logs/charts/templates/_external-audit-exporter.tpl:85

  • Same mismatch for failover B: logs_index is audit-datastream but logs_index_on_error uses ${index}-..., which is likely unresolved here. Use audit-datastream-error instead.
    endpoint: {{ required "openTelemetry.externalCollector.syslogConfig.openSearchLogs.auditEndpoint is required when audit kafka is disabled" .Values.openTelemetry.externalCollector.syslogConfig.openSearchLogs.auditEndpoint }}
  logs_index: audit-datastream
  logs_index_on_error: ${index}-datastream-error
  • Files reviewed: 12/12 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread logs/charts/templates/ingester-collector.yaml Outdated
Comment thread logs/charts/templates/_external-audit-exporter.tpl Outdated
@olandr
olandr force-pushed the feat/custom-osexporter-audit branch from 55b8487 to bae5eb9 Compare September 10, 2026 15:29
@olandr
olandr force-pushed the feat/custom-osexporter-audit branch from bae5eb9 to aeacb6f Compare September 10, 2026 15:32
@olandr
olandr requested a lite review from Copilot September 10, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Logs chart default image tag was updated but the Logs README still documents the old default tag, which is user-facing drift that should be corrected before merge.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 17/17 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread logs/charts/values.yaml
Comment on lines 50 to +54
collectorImage:
# -- Image repository for OpenTelemetry Collector
repository: ghcr.io/cloudoperators/opentelemetry-collector-contrib
# -- Image tag for OpenTelemetry Collector
tag: "a62a383"
tag: "c97076f"
Base automatically changed from feat/custom-osexporter to main September 10, 2026 16:40
…rror flag for backup error records

---------

Signed-off-by: Simon Olander <simon.olander@sap.com>
…rror for backup error records

---------

Signed-off-by: Simon Olander <simon.olander@sap.com>
@olandr
olandr force-pushed the feat/custom-osexporter-audit branch from aeacb6f to 7caacc9 Compare September 10, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants