Skip to content

Feat/netobs 1220 double header processing - #1985

Merged
timojohlo merged 30 commits into
cloudoperators:mainfrom
melvinsimmert:feat/NETOBS-1220-double-header-processing
Sep 11, 2026
Merged

Feat/netobs 1220 double header processing#1985
timojohlo merged 30 commits into
cloudoperators:mainfrom
melvinsimmert:feat/NETOBS-1220-double-header-processing

Conversation

@melvinsimmert

Copy link
Copy Markdown
Contributor

Submit a pull request

Thank you for submitting a pull request!
To speed up the review process, please ensure that everything below
is true:

  1. This is not a duplicate of an existing Plugin.
  2. No existing features have been broken without good reason.
  3. The Documentation has been updated to reflect your changes.
  4. Tests have been added or updated to reflect your changes.
  5. All tests pass.

Replace any ":question:" below with information about your pull request.

Pull Request Details

Provide details about your pull request and what it adds, fixes, or changes.

Breaking Changes

Describe what features are broken by this pull request and why, if any.

Issues Fixed

Enter the issue numbers resolved by this pull request below, if any.

Other Relevant Information

Provide any other important details below.

@melvinsimmert
melvinsimmert marked this pull request as ready for review September 8, 2026 15:35
@melvinsimmert
melvinsimmert requested a review from a team as a code owner September 8, 2026 15:35
Copilot AI lite review requested due to automatic review settings September 8, 2026 15:35
melvinsimmert and others added 8 commits September 8, 2026 17:35
…egex

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
…doperators#1974)

* add transform/syslog_network_parsing based on logstash filters

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* add fields for hw.type=network and hw.vendor

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* add conditional check for sap.cc.audit.source == nil in the beginning to improve performance

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* rename processor to "transform/syslog_hardware_classification" and change its behaviour to first identify and rextract the vendor and then identify the hw.type and the role

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* move hardware processors to dedicated file

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* move hardware processor comment

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* add transform/syslog_hardware_classification before audit-classification; edit audit-classification to check for certain vendors

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* fix frist batch

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* add more fixes

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* overwrite resource.host.name by inner hostname in case of two Headed Logs

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* add conditional check for syslog.format early on to identify cisco devices

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* bump chart version

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

* change audit forwarding rule to device.manufacturer

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

---------

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
…loudoperators#1984)

* fix(logs): fix parsing errors from cloudoperators#1974 for devices

* rm VMware from manufacturers

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
… Audit

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <40160553+melvinsimmert@users.noreply.github.com>

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 new/updated OTTL statements include confirmed syntax/regex issues that are likely to break collector config parsing or prevent intended audit classification behavior.

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

Pull request overview

This PR updates the logs extension Helm chart to improve syslog processing by tightening double-header relay hostname parsing and adding a new syslog device classification transform that enriches logs with NetBox-oriented manufacturer/platform/role attributes.

Changes:

  • Bump the logs plugin/chart versions (PluginDefinition + Helm Chart.yaml).
  • Add and wire in a new transform/syslog_device_classification processor for syslog pipelines (and include it in the external collector config).
  • Adjust syslog parsing/classification behavior, including double-header relay host regex and updated audit classification logic.
File summaries
File Description
logs/plugindefinition.yaml Bumps plugin version and referenced chart version.
logs/charts/Chart.yaml Bumps Helm chart version.
logs/charts/templates/external-collector.yaml Includes the new syslog device classification transform in the rendered collector config.
logs/charts/templates/_syslog-device-classification-config.tpl Adds a new OTTL transform to classify devices/vendors/platforms from syslog content.
logs/charts/templates/_syslog-config.tpl Wires transform/syslog_device_classification into syslog TCP/UDP/TLS pipelines and tightens double-header relay host capture regex.
logs/charts/templates/_syslog-audit-filter-config.tpl Updates host.name handling and audit classification rules (including NetBox metadata usage).
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • 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/_syslog-audit-filter-config.tpl Outdated
Comment thread logs/charts/templates/_syslog-audit-filter-config.tpl Outdated
Comment thread logs/charts/templates/_syslog-device-classification-config.tpl Outdated
melvinsimmert and others added 7 commits September 10, 2026 12:50
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
…s#1986)

* feat: add kgateway-crds and kgateway PluginDefinitions

Adds two PluginDefinitions for kgateway — a Kubernetes-native API
gateway built on Envoy and the Gateway API:

- **kgateway-crds** — installs the kgateway CRDs from
  oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds:v2.4.3
- **kgateway** — deploys the kgateway control plane from
  oci://cr.kgateway.dev/kgateway-dev/charts/kgateway:v2.4.3

Both follow the agentgateway pattern — direct upstream OCI reference,
no local chart. Install order: k8s-gateway-api → kgateway-crds → kgateway.

Signed-off-by: Vivek Thacker <v.thacker@sap.com>

* docs(kgateway): add README for kgateway and kgateway-crds

Signed-off-by: Vivek Thacker <v.thacker@sap.com>

* docs(kgateway): remove incorrect AI extensions bullet from README

Signed-off-by: Vivek Thacker <v.thacker@sap.com>

---------

Signed-off-by: Vivek Thacker <v.thacker@sap.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
…rators#1979)

* feat(audit-logs): enable tls verification for kafka brokers

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>

* enhance check for kafka ca_file mount

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>

* remove redundant ca_file

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>

* Apply batched suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ztomaszewska <zuzanna.tomaszewska@sap.com>

---------

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>
Signed-off-by: ztomaszewska <zuzanna.tomaszewska@sap.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
* feat(logs): enable mount of kafka CA cert

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>

* Apply batched suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ztomaszewska <zuzanna.tomaszewska@sap.com>

* fix render error

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>

* remove one more dig - access directly instead

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>

* fix typo

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>

---------

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>
Signed-off-by: ztomaszewska <zuzanna.tomaszewska@sap.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
…operators#1987)

Signed-off-by: Zuzanna Tomaszewska <zuzanna.tomaszewska@sap.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
@melvinsimmert
melvinsimmert force-pushed the feat/NETOBS-1220-double-header-processing branch from 62598de to e88b879 Compare September 10, 2026 10:50
@melvinsimmert
melvinsimmert requested a review from a team as a code owner September 10, 2026 10:50
melvinsimmert and others added 4 commits September 10, 2026 12:50
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
* ceph-bucket-job

Signed-off-by: trouaux <thomas.rouaux@sap.com>

* bump

Signed-off-by: trouaux <thomas.rouaux@sap.com>

* make readme

Signed-off-by: trouaux <thomas.rouaux@sap.com>

* copilot suggestions

Signed-off-by: trouaux <thomas.rouaux@sap.com>

* lint

Signed-off-by: trouaux <thomas.rouaux@sap.com>

* Update README.md

Signed-off-by: trouaux <thomas.rouaux@sap.com>

* minor

Signed-off-by: trouaux <thomas.rouaux@sap.com>

---------

Signed-off-by: trouaux <thomas.rouaux@sap.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
…rators#1988)

Signed-off-by: trouaux <thomas.rouaux@sap.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
@melvinsimmert
melvinsimmert force-pushed the feat/NETOBS-1220-double-header-processing branch from b35ec13 to 7d54077 Compare September 10, 2026 12:15
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
@melvinsimmert
melvinsimmert force-pushed the feat/NETOBS-1220-double-header-processing branch from 3f29b0a to 92fe675 Compare September 10, 2026 12:33
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

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

There are confirmed logic/regression risks in the new classification and parsing rules (platform overwrite, Cisco audit relevance omission, TLS-only host regex behavior) that should be corrected before approval.

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

Review details

Suppressed comments (1)

logs/charts/templates/_syslog-device-classification-config.tpl:95

  • Spelling/wording in comment: "Platfrom" is misspelled and the sentence is grammatically awkward.
    # Trend Micro is no official Manufacturer, Platfrom or anything similar in Netbox. We will still handle it as such for transformation purposes.
  • Files reviewed: 3/3 changed files
  • Comments generated: 4
  • Review effort level: Lite

Comment thread logs/charts/templates/_syslog-audit-filter-config.tpl
Comment thread logs/charts/templates/_syslog-config.tpl Outdated
Comment thread logs/charts/templates/_syslog-device-classification-config.tpl Outdated
Comment thread logs/charts/templates/_syslog-device-classification-config.tpl Outdated
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>

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.

🔵 Needs a closer look

The updated audit classification can leave Palo Alto logs non-audit despite setting sap.cc.audit.source, which can break audit routing.

Review details

Suppressed comments (4)

Previously missed (2) — in code that hasn't changed since the last review.

logs/charts/templates/_syslog-audit-filter-config.tpl:338

  • In transform/syslog_audit_classification, the Palo Alto Networks block sets sap.cc.audit.source after the earlier global rule that marks logs audit_relevant when sap.cc.audit.source != nil. As a result, logs that match the IPS patterns can end up with sap.cc.audit.source="ips-ids" but still have audit_relevant="false" (and won’t be routed as audit).
    logs/charts/templates/_syslog-device-classification-config.tpl:13
  • The introductory comment has a dangling comma in the example list and a grammatical error (“shared between from VMs”), which makes the documentation harder to read.

This issue also appears on line 95 of the same file.

logs/charts/templates/_syslog-device-classification-config.tpl:95

  • Typo in comment: “Platfrom” should be “Platform”.
    # Trend Micro is no official Manufacturer, Platfrom or anything similar in Netbox. We will still handle it as such for transformation purposes.

logs/charts/templates/_syslog-device-classification-config.tpl:77

  • This NX-OS platform assignment can overwrite an existing netbox.platform.slug (e.g., if set by upstream enrichment), which contradicts the comment that attributes are only set when nil.
        - 'set(log.attributes["netbox.platform.slug"], "cisco-nx-os") where log.attributes["netbox.platform.slug"] == nil and (log.attributes["syslog.format"] == "cisco_nxos_year" or log.attributes["syslog.format"] == "cisco_nxos_year_failed")'
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
@melvinsimmert
melvinsimmert force-pushed the feat/NETOBS-1220-double-header-processing branch from 7f8d405 to 9d1d9f2 Compare September 10, 2026 15:11

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.

🔵 Needs a closer look

There is a confirmed audit-routing logic bug for Palo Alto IPS/IDS events (audit source set without reliably marking the log as audit-relevant), and the updated relay-host regex is overly restrictive and can drop valid relay identifiers (e.g., IPv6).

Review details

Suppressed comments (6)

Previously missed (4) — in code that hasn't changed since the last review.

logs/charts/templates/_syslog-audit-filter-config.tpl:338

  • In the Palo Alto block, IPS/IDS events set sap.cc.audit.source to "ips-ids", but audit_relevant is only set for "THREAT" messages. Because the general "audit if sap.cc.audit.source != nil" rule runs earlier in the transform, IPS/IDS events without "THREAT" will remain non-audit and be routed incorrectly.
    logs/charts/templates/_syslog-config.tpl:58
  • The relay-host capture regex now only allows letters/digits/dot/underscore/hyphen, which can break double-header parsing for valid relay identifiers like IPv6 addresses (contain ':'). This would prevent syslog.host.name from being populated for those events.

This issue also appears on line 296 of the same file.
logs/charts/templates/_syslog-device-classification-config.tpl:13

  • The header comment describes stage 1 as "Platform extraction" and stage 2 as setting manufacturer/role, but the transform first extracts netbox.manufacturer.slug and then derives platform/role. This mismatch makes the rule ordering harder to understand and maintain.
    logs/charts/templates/_syslog-device-classification-config.tpl:95
  • Typo in comment: "Platfrom" should be "Platform".

logs/charts/templates/_syslog-config.tpl:300

  • Same relay-host capture regex restriction as the TCP pipeline: this pattern will not capture IPv6 relay addresses (':' characters) and may cause syslog.host.name to be missing for double-header UDP events.
  - type: regex_parser
    id: syslog_udp_double_header_capture_relay_host
    parse_from: attributes.relay_header
    regex: '(?P<syslog_host_name>[A-Za-z0-9][A-Za-z0-9._\-]*):?\s*$'
    on_error: send_quiet

logs/charts/templates/_syslog-config.tpl:533

  • Same relay-host capture regex restriction as the TCP pipeline: this pattern will not capture IPv6 relay addresses (':' characters) and may cause syslog.host.name to be missing for double-header TLS events.
  - type: regex_parser
    id: syslog_tls_double_header_capture_relay_host
    parse_from: attributes.relay_header
    regex: '(?P<syslog_host_name>[A-Za-z0-9][A-Za-z0-9._\-]*):?\s*$'
    on_error: send_quiet
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@timojohlo timojohlo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

chart version needs a bump, otherwise LGTM 👍

melvinsimmert and others added 2 commits September 11, 2026 10:24
@melvinsimmert
melvinsimmert force-pushed the feat/NETOBS-1220-double-header-processing branch from 7196b7e to 1c80e32 Compare September 11, 2026 08:26
@timojohlo
timojohlo merged commit 07efae9 into cloudoperators:main Sep 11, 2026
7 checks passed
@melvinsimmert
melvinsimmert deleted the feat/NETOBS-1220-double-header-processing branch September 11, 2026 11:28
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.

6 participants