basically, we are just creating a json payload and parsing it in the simple script below, the other info comes in fine, but the extradetails where I am testing this, always comes back empty
def post_event(payload):
settings = payload.get('configuration')
api_endpoint = settings.get('api_endpoint').rstrip('/')
auth_token = settings.get('auth_token_override')
if not auth_token:
auth_token = settings.get('auth_token')
#FIXME: ideally, this should not be the splunk_server that triggers the alert,
# but the host where the data are generated from.
host = payload.get('server_host')
severity = settings.get('severity')
search_name = payload.get('search_name')
result_link = payload.get('results_link')
result_file = payload.get('results_file'),
results_Percent = payload.get('results_Percent')
data = {
'source': 'Splunk',
'host': host,
'eventtype': search_name,
'severity': severity,
'summary': search_name,
'extradetails': results_Percent,
'searchpath': result_file
}
... View more