Skip to main content
Splunk Lantern

Bank accounts with large balances

The table below explains in detail the steps of a Splunk Enterprise or Splunk Cloud Platform search to help you run a regular report that shows which accounts have a large balance. For more information, review the use case monitoring consumer bank accounts for potential fraud.

Some commands, parameters, and field names in the searches below may need to be adjusted to match your environment.  In addition, to optimize the searches shown below, you should specify an index and a time range when appropriate.

Splunk recommends that customers look into using data models, report acceleration, or summary indexing when searching across hundreds of GBs of events in a single search. The searches provided here are a good starting point, but depending on your data, search time range, and other factors, more can be done to ensure that they scale appropriately.  

Splunk Search Explanation
|sourcetype=<transaction data source> Search only your business service data for bank transactions.
|eval _time=strptime(_time, "%Y/%m/%d %H:%M:%S") Parse the transaction time stamp into a UNIX time value.
|sort - _time Sort the results from oldest to newest.
|lookup <customer account info file> customer Search the customer field of a lookup file of customer accounts that you have previously uploaded into your Splunk deployment.
|stats  values(_time) AS _time list(balance) as current_account_balance list(account_type) AS current_account_type list(other_account_type) AS other_account_type list(other_accountID) AS other_accountID list(other_balance) AS other_balance sum(other_balance) AS Total_Balance BY customer Correlate the customer information with the lookup file data that shows the other accounts for the customer, renaming the fields as shown. Group the details by customer.
|eval Total_Balance=Total_Balance+current_account_balance Sum up the account balance for all accounts.
|search other_account_type="*" AND Total_Balance>250000 Search for results that show any value in the other_account_type field and have a Total Balance greater than 250,000.
|eval Total_Balance=tostring(round(Total_Balance, 2),"commas"), current_account_balance=tostring(round(current_account_balance, 2),"commas") Convert the balances to strings rounded to two values, using a comma when needed.