You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
566 B
24 lines
566 B
import sys,splunk.Intersplunk
|
|
import time
|
|
|
|
results = []
|
|
actual = set()
|
|
newresults = {}
|
|
|
|
|
|
try:
|
|
results,dummyresults,settings = splunk.Intersplunk.getOrganizedResults()
|
|
|
|
for result in results:
|
|
for key in result:
|
|
if (result[key]) :
|
|
actual.add(key)
|
|
|
|
except Exception as e:
|
|
newresults = splunk.Intersplunk.generateErrorResults("Error occurred while running custom command: '%s'" % str(e))
|
|
|
|
newresults['uniqueFieldList'] = list(actual)
|
|
newresults['_time'] = time.time()
|
|
|
|
splunk.Intersplunk.outputResults([ newresults ])
|