Dashboards & Visualizations

modular input xml streaming doesn't accept time element

kundeng
Path Finder

splunk modular input xml streaming mode allows specifying timestamp explicitly for each event. But it is not working for me.
Instead, splunk tries to find the event in the raw data and use index time if it is unavailable.

For example, my XML looks like this, and it would take 20150324111100 as the timestamp instead of 1540488716

I have also configured props.conf according to a hint in the documentation and it doesn't work either.
http://docs.splunk.com/Documentation/Splunk/7.2.0/AdvancedDev/ModInputsStream#Streaming_example_.28X...

Modify $SPLUNK_HOME/etc/apps/myapp/default/props.conf

[my_config]
SHOULD_LINEMERGE = false

2018-10-25 13:31:56,858 INFO the xml file looks like

<stream><event stanza="hl7_modular_input://test"><index>main</index><time>1540488716</time><sourcetype>hl7</sourcetype><data>MSH|^~\&amp;|EPIC|GMC||GMC|20150324111100|RECRN|ADT^A10|725308|T|2.3||||||||| 
EVN|A10|20150324111100||ADT_EVENT|Model User^RECOVERY^NURSE^^^^^^OHSA^^^^^GMC1|20150320125007| 
PID|1||3100068670^^^EPI^MR||OPTIME^TESTAVS||19950320|M|||^^^^^US^P|||||||6100212816|636-99-9512|||||||||||N|| 
PD1|||GRANT MEDICAL CENTER^^1013100||||||||||||||| 
PV1|1|O|GSAG^OR ^OR^GMC1^^^^^^^DEPID|EL|||13020^LOMBARDI^ADOLPH^V^^^^^STARPROV^^^^STARPROV|||Surgery|PACG^^^GMC1^^^^^^^DEPID|||Phys/Clinic|||13020^LOMBARDI^ADOLPH^V^^^^^STARPROV^^^^STARPROV|OP SURGERY|6100212816|SELF||||||||||||||||||||||^^^GMC1^^^^^^^|^^^^^^^^^^|20150320125007||||||22150790003 
PV2||GENERAL||||||20150320130000|||||||||||||n|N||||||||||||||||||||||||||| 
ZPV||||||||||||20150320125007||||||||| 
AL1|1|Drug Class|45202^NO KNOWN ALLERGIES^|||||| 
GT1|1|100046657|OPTIME^TESTAVS^^||^^^^^US|||19950320|M|P/F|SLF|636-99-9512||||||||||||||||||||||||||||||||||||| 
</data></event></stream>
0 Karma
1 Solution

kundeng
Path Finder

I think I figured it out.
The splunk documentation is wrong.

http://docs.splunk.com/Documentation/Splunk/7.2.0/AdvancedDev/ModInputsStream#Streaming_example_.28X...

The setting to force using input-layer timestamp should be
DATETIME_CONFIG = NONE (or CURRENT)

View solution in original post

0 Karma

kundeng
Path Finder

I think I figured it out.
The splunk documentation is wrong.

http://docs.splunk.com/Documentation/Splunk/7.2.0/AdvancedDev/ModInputsStream#Streaming_example_.28X...

The setting to force using input-layer timestamp should be
DATETIME_CONFIG = NONE (or CURRENT)

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...