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
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...