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)
| 27 | |
| 28 | |
| 29 | def 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 | |
| 42 | def main(logger=None): |