Follow these steps to search for the total number of database connections over the past 30 days:
- Log in to your Splunk server.
- Select the Search & Reporting application.
- Ensure that the time range picker is set to Last 7 days and type the following search into the Splunk search bar. Then, click on Search or hit Enter:
index=main sourcetype=log4j perfType="DB" | eval threshold=con_total/100*70 | where con_used>=threshold | timechart span=4h count(con_used) AS CountOverThreshold
- Splunk will return a tabulated list, detailing all the events that meet our search criteria, as shown in the following screenshot:
- This is great, ...