To determine user activity in dbconnect using a Splunk query in Python, you can use the following search command:
main.py308 chars9 lines
This query searches for all data inputs in Splunk and retrieves their titles and recent metadata. The eval
command is then used to create an activity
field, which uses a case
statement to determine if the input has had recent activity, is currently active within the past day, or is inactive. Finally, the table
command is used to display the results in a table with the input title and its activity status.
gistlibby LogSnag