Feat/netobs 1220 double header processing - #1985
Conversation
…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>
9902640 to
a883f9d
Compare
Signed-off-by: Melvin Simmert <40160553+melvinsimmert@users.noreply.github.com>
There was a problem hiding this comment.
🟡 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+ HelmChart.yaml). - Add and wire in a new
transform/syslog_device_classificationprocessor 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.
…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>
62598de to
e88b879
Compare
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>
b35ec13 to
7d54077
Compare
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
3f29b0a to
92fe675
Compare
3504202 to
27923be
Compare
There was a problem hiding this comment.
🟡 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
There was a problem hiding this comment.
🔵 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
7f8d405 to
9d1d9f2
Compare
There was a problem hiding this comment.
🔵 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
left a comment
There was a problem hiding this comment.
chart version needs a bump, otherwise LGTM 👍
Signed-off-by: Melvin Simmert <melvinsimmert@gmail.com>
7196b7e to
1c80e32
Compare
Submit a pull request
Thank you for submitting a pull request!
To speed up the review process, please ensure that everything below
is true:
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.
❓