<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extracting fields from undelimited binary data? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69089#M4262</link>
    <description>&lt;P&gt;Couldn't you just do this with a rex extraction?&lt;/P&gt;

&lt;P&gt;Something like:&lt;/P&gt;

&lt;P&gt;rex field=_raw "(?&lt;INDEX&gt;.{2})(?&lt;DATA_TYPE&gt;.{2})(?&lt;SEQUENCE_NUMBER&gt;.{4})(?&lt;INTERVAL&gt;.{8})(?&lt;TIMESTAMP_SECONDS&gt;.{8})(?&lt;TIMESTAMP_NANOSECONDS&gt;.{8})(?&lt;COUNTER1&gt;.{8})(?&lt;COUNTER2&gt;.{8})... etc&lt;/COUNTER2&gt;&lt;/COUNTER1&gt;&lt;/TIMESTAMP_NANOSECONDS&gt;&lt;/TIMESTAMP_SECONDS&gt;&lt;/INTERVAL&gt;&lt;/SEQUENCE_NUMBER&gt;&lt;/DATA_TYPE&gt;&lt;/INDEX&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 14:08:01 GMT</pubDate>
    <dc:creator>cschmidt0121</dc:creator>
    <dc:date>2020-09-28T14:08:01Z</dc:date>
    <item>
      <title>Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69088#M4261</link>
      <description>&lt;P&gt;I've got data coming in that's a hex string (binary fields).  They're not delimited, but they do follow a fixed format.&lt;/P&gt;

&lt;P&gt;Offset 0 , 1 byte = Index&lt;/P&gt;

&lt;P&gt;Offset 1, 1 byte = Data Type&lt;/P&gt;

&lt;P&gt;Offset 2, 2 bytes = Sequence Number&lt;/P&gt;

&lt;P&gt;Offset 4, 4 bytes = Interval&lt;/P&gt;

&lt;P&gt;Offset 8, 4 bytes = Timestamp (seconds)&lt;/P&gt;

&lt;P&gt;Offset 12, 4 bytes = Timestamp2 (nanoseconds)&lt;/P&gt;

&lt;P&gt;Offset 16, 4 bytes = 32 bit counter #1&lt;/P&gt;

&lt;P&gt;Offset 20, 4 bytes = 32 bit counter #2&lt;/P&gt;

&lt;P&gt;...followed by 30 additional 4 byte counter fields.&lt;/P&gt;

&lt;P&gt;From what I understand, I need to use SEDCMD to insert delimiters and then use DELIM to allow the fields to be extracted?  Any help on the syntax would be greatly appreciated since my SED is about 20 years rusty.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 19:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69088#M4261</guid>
      <dc:creator>rapple1066</dc:creator>
      <dc:date>2013-06-19T19:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69089#M4262</link>
      <description>&lt;P&gt;Couldn't you just do this with a rex extraction?&lt;/P&gt;

&lt;P&gt;Something like:&lt;/P&gt;

&lt;P&gt;rex field=_raw "(?&lt;INDEX&gt;.{2})(?&lt;DATA_TYPE&gt;.{2})(?&lt;SEQUENCE_NUMBER&gt;.{4})(?&lt;INTERVAL&gt;.{8})(?&lt;TIMESTAMP_SECONDS&gt;.{8})(?&lt;TIMESTAMP_NANOSECONDS&gt;.{8})(?&lt;COUNTER1&gt;.{8})(?&lt;COUNTER2&gt;.{8})... etc&lt;/COUNTER2&gt;&lt;/COUNTER1&gt;&lt;/TIMESTAMP_NANOSECONDS&gt;&lt;/TIMESTAMP_SECONDS&gt;&lt;/INTERVAL&gt;&lt;/SEQUENCE_NUMBER&gt;&lt;/DATA_TYPE&gt;&lt;/INDEX&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:08:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69089#M4262</guid>
      <dc:creator>cschmidt0121</dc:creator>
      <dc:date>2020-09-28T14:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69090#M4263</link>
      <description>&lt;P&gt;I sure hope so... that looks vastly simpler than what I've been trying to do.  I'll give that a shot.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 21:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69090#M4263</guid>
      <dc:creator>rapple1066</dc:creator>
      <dc:date>2013-06-19T21:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69091#M4264</link>
      <description>&lt;P&gt;If it doesn't, post an example of one of the raw events and I can try to fix my regex.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2013 21:38:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69091#M4264</guid>
      <dc:creator>cschmidt0121</dc:creator>
      <dc:date>2013-06-19T21:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69092#M4265</link>
      <description>&lt;P&gt;This blog post might be of interest, even though it's dealing with raw binary data and not just a hex representation of it: &lt;A href="http://blogs.splunk.com/2011/07/19/the-naughty-bits-how-to-splunk-binary-logfiles/"&gt;http://blogs.splunk.com/2011/07/19/the-naughty-bits-how-to-splunk-binary-logfiles/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 10:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69092#M4265</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-06-20T10:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69093#M4266</link>
      <description>&lt;P&gt;Thanks all..&lt;/P&gt;

&lt;P&gt;Here's a sample record:&lt;/P&gt;

&lt;P&gt;00010cc503e851a8c733248e0b380274d41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&lt;/P&gt;

&lt;P&gt;This is how it shows up in Splunk:&lt;/P&gt;

&lt;P&gt;&amp;#2;&amp;#1;\xA4\xFC&amp;#3;\xE8Q\xC34&amp;#12;&amp;#6;&amp;#15;&amp;#20;,&lt;BR /&gt;
&amp;#2;&amp;#1;\xA4\xFD&amp;#3;\xE8Q\xC34,&lt;BR /&gt;
&amp;#2;&amp;#1;\xA4\xFE&amp;#3;\xE8Q\xC34&amp;#14;&amp;#6;&amp;#15;&amp;#20;,&lt;BR /&gt;
&amp;#2;&amp;#1;\xA4\xFF&amp;#3;\xE8Q\xC34&amp;#15;&amp;#6;&amp;#15;&amp;#20;,&lt;BR /&gt;
&amp;#2;&amp;#1;\xA5&lt;BR /&gt;
&amp;#2;&amp;#1;\xA5&amp;#1;&amp;#3;\xE8Q\xC34&amp;#17;&amp;#6;&amp;#15;&amp;#20;,&lt;BR /&gt;
&amp;#2;&amp;#1;\xA5&amp;#2;&amp;#3;\xE8Q\xC34&amp;#18;&amp;#6;&amp;#15;&amp;#20;,&lt;BR /&gt;
&amp;#2;&amp;#1;\xA5&amp;#3;&amp;#3;\xE8Q\xC34&amp;#19;&amp;#6;&amp;#15;&amp;#20;,&lt;BR /&gt;
&amp;#2;&amp;#1;\xA5&amp;#4;&amp;#3;\xE8Q\xC34&amp;#20;&amp;#6;&amp;#15;&amp;#20;,&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 20:58:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69093#M4266</guid>
      <dc:creator>rapple1066</dc:creator>
      <dc:date>2013-06-20T20:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69094#M4267</link>
      <description>&lt;P&gt;Is that how you want the data to look in splunk? If not I highly recommend setting up an input like the blog post Ayn suggested. Parse the data with a python script and output it as with human readable timestamps, fields, etc. To be honest, I have no clue how that Splunk excerpt could possibly represent the raw data.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 21:09:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69094#M4267</guid>
      <dc:creator>cschmidt0121</dc:creator>
      <dc:date>2013-06-20T21:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69095#M4268</link>
      <description>&lt;P&gt;Sorry.. that's how it shows up RAW in splunk when it comes in off the wire.  &lt;/P&gt;

&lt;P&gt;Maybe a better explanation of the data would help?&lt;/P&gt;

&lt;P&gt;The data represents performance data (packet counts) from a network appliance. Every millisecond, we send a UDP packet to splunk that has the number of bytes observed in that time period.  The beginning of the packet has some housekeeping info (Index, datatype, sequence #), 2 timestamps (seconds,and nanoseconds) and then the counter data from 32 "interfaces".   The goal is to be able to report against each of the counters over time.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 21:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69095#M4268</guid>
      <dc:creator>rapple1066</dc:creator>
      <dc:date>2013-06-20T21:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69096#M4269</link>
      <description>&lt;P&gt;Here's what I'm seeing:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://i236.photobucket.com/albums/ff31/spongerapple/splunk.jpg"&gt;http://i236.photobucket.com/albums/ff31/spongerapple/splunk.jpg&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 21:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69096#M4269</guid>
      <dc:creator>rapple1066</dc:creator>
      <dc:date>2013-06-20T21:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting fields from undelimited binary data?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69097#M4270</link>
      <description>&lt;P&gt;Yeah, I definitely think the least painful solution to this is to simplify your data before it makes its way into Splunk. It looks like Splunk is trying and failing to parse the data - for example, isn't there a huge chunk of data missing? I count 36 bytes (minus all of the /x's) in each event in your screenshot. There should be a LOT more, correct?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2013 21:42:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Extracting-fields-from-undelimited-binary-data/m-p/69097#M4270</guid>
      <dc:creator>cschmidt0121</dc:creator>
      <dc:date>2013-06-20T21:42:27Z</dc:date>
    </item>
  </channel>
</rss>

