Splunk Dev

Splitting up multiple events on the same submission from python

maguec
New Member

I'm trying to have Splunk submit two separate events in one run .

 

def run():
logging.info("Running Test....")

now = time.time()
output = f"""
<stream>
<event>
<time>{now}</time>
<data>event_status="(0)Item0."</data>
</event>
<event>
<time>{now}</time>
<data>event_status="(1)Item1."</data>
</event>
</stream>
"""
print(output)

sys.stdout.flush()

 

 

This runs and the XML is submitted but it only shows as a single event

 

 

1/12/22
9:47:54.000 PM	
<stream>
  <event>
    <time>1642024074.8583786</time>
    <data>event_status="(0)Item0."</data>
  </event>
  <event>
    <time>1642024074.8583786</time>
    <data>event_status="(1)Item1."</data>
  </event>
</stream>

 

 

Is there any way to submit these two events so they show up as separate events?  I'm looking at polling multiple statistics for a multitenant application and would like to display each tenant separately.

Labels (2)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...