def _send_splunk(event, index_override=None, sourcetype_override=None):
    #Get Splunk Options
    opts = _get_options()
    logging.info('Options: {0}'.format(json.dumps(opts)))
    http_event_collector_key = opts['token']
    http_event_collector_host = opts['indexer']
    #Set up the collector
    splunk_event = http_event_collector(http_event_collector_key, http_event_collector_host)
    #init the payload
    payload = {}

    #Set up the event metadata
    if index_override is None:
        payload.update({"index": opts['index']})
    else:
        payload.update({"index": index_override})
    if sourcetype_override is None:
        payload.update({"sourcetype": opts['sourcetype']})
    else:
        payload.update({"index": sourcetype_override})

    #Add the event
    payload.update({"event": event})
    logging.info('Payload: {0}'.format(json.dumps(payload)))
         #fire it off
    splunk_event.sendEvent(payload)
    return True


# Thanks to George Starcher for the http_event_collector class (https://github.com/georgestarcher/)
Select documents if element in array field matches all conditions.
dataset/ETHPy150Open saltstack/salt/salt/returners/splunk.py/_send_splunk--crossover with--dataset/ETHPy150Open adewes/blitzdb/blitzdb/backends/file/queries.py/elemMatch_query