Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions hack/logsamples/otlp_audit_ovn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"resourceLogs": [
{
"resource": {
"attributes": [
{
"key": "openshift.cluster.uid",
"value": {
"stringValue": "d24a392b-dd87-4eb8-a1a9-7384423567e3"
}
},
{
"key": "openshift.log.source",
"value": {
"stringValue": "ovn"
}
},
{
"key": "openshift.log.type",
"value": {
"stringValue": "audit"
}
},
{
"key": "k8s.node.name",
"value": {
"stringValue": "ip-10-0-36-191.ec2.internal"
}
},
{
"key": "openshift.label.foo",
"value": {
"stringValue": "bar"
}
},
{
"key": "log_type",
"value": {
"stringValue": "audit"
}
},
{
"key": "log_source",
"value": {
"stringValue": "ovn"
}
},
{
"key": "openshift.cluster_id",
"value": {
"stringValue": "d24a392b-dd87-4eb8-a1a9-7384423567e3"
}
},
{
"key": "kubernetes.host",
"value": {
"stringValue": "ip-10-0-36-191.ec2.internal"
}
}
]
},
"scopeLogs": [
{
"scope": {

},
"logRecords": [
{
"timeUnixNano": "1743529186060055281",
"observedTimeUnixNano": "1743529186061086933",
"severityText": "info",
"body": {
"stringValue": "2025-04-01T17:39:31.507054686Z|00004|acl_log(ovn_pinctrl0)|INFO|name=verify-audit-logging_deny-all, verdict=drop"
},
"attributes": [
{
"key": "k8s.ovn.sequence",
"value": {
"stringValue": "00004"
}
},
{
"key": "k8s.ovn.component",
"value": {
"stringValue": "acl_log(ovn_pinctrl0)"
}
}
],
"traceId": "",
"spanId": ""
}
]
}
]
}
]
}
13 changes: 13 additions & 0 deletions hack/logsamples/viaq_audit_ovn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"@timestamp": "2025-04-01T14:06:20.483403752Z",
"timestamp": "2025-04-01T14:06:20.483403752Z",
"hostname": "ip-10-0-67-214.ec2.internal",
"level": "info",
"log_source": "ovn",
"log_type": "audit",
"message": "2025-04-01T14:06:06.626226879Z|00004|acl_log(ovn_pinctrl0)|INFO|name=verify-audit-logging_deny-all, verdict=drop",
"openshift": {
"cluster_id": "d24a392b-dd87-4eb8-a1a9-7384423567e3",
"sequence": 1743516380484021390
}
}
1 change: 1 addition & 0 deletions internal/generator/vector/conf/complex.toml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ if .log_type == "audit" && .log_source == "openshiftAPI" {
}
if .log_type == "audit" && .log_source == "ovn" {
.openshift.cluster_id = "${OPENSHIFT_CLUSTER_ID:-}"
._internal.message = .message
del(.file)
del(.source_type)
if !exists(.level) {
Expand Down
1 change: 1 addition & 0 deletions internal/generator/vector/conf/complex_http_receiver.toml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ if .log_type == "audit" && .log_source == "openshiftAPI" {
}
if .log_type == "audit" && .log_source == "ovn" {
.openshift.cluster_id = "${OPENSHIFT_CLUSTER_ID:-}"
._internal.message = .message
del(.file)
del(.source_type)
if !exists(.level) {
Expand Down
1 change: 1 addition & 0 deletions internal/generator/vector/filter/openshift/viaq/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ if .log_type == "%s" && .log_source == "%s" {
`, string(obs.InputTypeAudit), obs.AuditSourceOVN,
strings.Join(helpers.TrimSpaces([]string{
ClusterID,
InternalContext,
RemoveFile,
RemoveSourceType,
FixLogLevel,
Expand Down
Loading