Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCI split data in different tables #11499

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,19 @@
# event_type = event.get("type", "default")
if event["type"] == "com.oraclecloud.loadbalancer.access" or event["type"] == "com.oraclecloud.loadbalancer.error" or event["type"]=="com.oraclecloud.OraLB-API.ListLoadBalancers":
return "OCI_LoadBalancerLogs"
# elif event_type == "com.oraclecloud.loadbalancer.error":
# return "OCI_LoadBalancerLogs"
if event["type"] == "com.oraclecloud.Audit.ListEvents":
return "OCI_AuditLogs"
if event["type"] == "com.oraclecloud.vcn.flowlogs.DataEvent" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.NoData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcn" or event["type"] == "com.oraclecloud.virtualNetwork.ListVcns" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.SkipData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcnDnsResolverAssociation":
if event["type"] == "com.oraclecloud.computeApi.ListVolumeAttachments" or event["type"] == "com.oraclecloud.computeApi.ListVnicAttachments" or event["type"] == "com.oraclecloud.computeApi.ListBootVolumeAttachments" or event["type"] == "com.oraclecloud.computeApi.GetInstance":
Copy link
Contributor

Choose a reason for hiding this comment

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

As i said before we should do a contains in order to classifiy each log type instead of parssing each type,

reason:
in the future there is an option that it may be a new event data type for example :
com.oraclecloud.vcn.newqtype

because we are using == instead of in this log will be sent to the defualt talbe and not to the relevant one

return "OCI_ComputeApiLogs"
if event["type"] == "com.oraclecloud.sch.serviceconnector.runlog":
return "OCI_ServiceConnector_Logs"
if "com.oraclecloud.DatabaseService" in event["type"]:
return "OCI_DatabaseService_Logs"
if "com.oraclecloud.KeyManagementService" in event["type"]:
return "OCI_KeyManagementService_Logs"
if event["type"] == "com.oraclecloud.vcn.flowlogs.DataEvent" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.NoData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcn" or event["type"] == "com.oraclecloud.virtualNetwork.ListVcns" or event["type"] == "com.oraclecloud.virtualNetwork.GetVnic" or event ["type"] == "com.oraclecloud.virtualNetwork.GetSubnet" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.SkipData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcnDnsResolverAssociation":
return "OCI_VirtualNetworkLogs"
else:
return "OCI_LogsV2" # Default log type
Expand Down
Binary file not shown.
Loading