MCPcopy Create free account
hub / github.com/adobe/Marinus / parse_splunk_results

Function parse_splunk_results

python3_cron_scripts/get_splunk_data.py:29–39  ·  view source on GitHub ↗

Put your logic for parsing splunk results here... Depending on the data, you might store it in the master DNS table using the dns_manager. Alternatively, you might store it in its Splunk collection. Using the splunk_collection is not required.

(logger, results, dns_manager, splunk_collection)

Source from the content-addressed store, hash-verified

27
28
29def parse_splunk_results(logger, results, dns_manager, splunk_collection):
30 """
31 Put your logic for parsing splunk results here...
32 Depending on the data, you might store it in the master DNS table using the dns_manager.
33 Alternatively, you might store it in its Splunk collection. Using the splunk_collection is not required.
34 """
35 for result in results:
36 if isinstance(result, dict):
37 my_data = result["my_field"]
38 logger.debug(str(my_data))
39 # Do what is appropriate for your data here.
40
41
42def main(logger=None):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected