KQL - join condition issue

Georgi Palazov 286 Reputation points
2022-11-06T16:48:59.51+00:00

Hello,

I'm trying to enrich the logs coming from Oracle in Sentinel for a customer. It seems that the only unique field from the OracleDatabaseAuditEvent table is DbId and this is what I'll use.
The way to enrich the events from the Oracle feed is to match the DbId column(which seems to be unique for Oracle) of the OracleDatabaseAuditEvent table in Sentinel with a watchlist containing more information for each database. Where there are matches between thewatchlist and the table in Sentinel these events are enriched, if there's no match Sentinel returns just the record of OracleDatabaseAuditEvent table.
Unfortunately that is not the case, because the watchlist(list sent from the Oracle team) contains names of databases with duplicate DbId in some rows.

Oracle events for the last hour:
257580-image.png

I use leftouter to keep the results of the OracleDatabaseAuditEvent even if the join condition doesn't find any matching record from the watchlist:
257652-image.png

My questions are:

  1. Why do I get more logs count after joining the tables? If i'm doing everything the right way it seems I should be getting the same exact count of events(or close). I assume Sentinel produces more records, because of the duplication in the DbId column from the watchlist?
  2. I came upon this - https://dba.stackexchange.com/questions/178129/oracle-dbid-what-is-logic-to-create-oracle-dbid - Does this mean that the Oracle team have copies of their DBs and this is why there are duplicate DbId s?
  3. How do I enrich the events then if that's not the case?
Microsoft Security | Microsoft Sentinel
{count} votes

1 answer

Sort by: Most helpful
  1. David Broggy 6,371 Reputation points MVP Volunteer Moderator
    2022-11-08T19:41:53.23+00:00

    Hi ppal,
    It's likely left joins don't work the way you expect.
    As you can see in this example, null matches may be getting returned.
    Try your query w/o the summarization to see.
    joinoperator

    258442-image.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.