<?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 Splunk Query related in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487374#M8080</link>
    <description>&lt;P&gt;I've written below query,&lt;/P&gt;

&lt;P&gt;index=* sourcetype=* EventCode=* |  rex field=_raw "((Process Command Line:\t)(?(.+)*))" |stats count by field.&lt;/P&gt;

&lt;P&gt;Tried extracting "Process Command line" field. After extracting i can see that though it doesn't contain any value(not even spaces), Splunk is not taking it as NULL.Instead it is taking as if field has some command line.&lt;/P&gt;

&lt;P&gt;Could you please help?&lt;/P&gt;</description>
    <pubDate>Wed, 20 Nov 2019 09:56:54 GMT</pubDate>
    <dc:creator>rupesh67nikam</dc:creator>
    <dc:date>2019-11-20T09:56:54Z</dc:date>
    <item>
      <title>Splunk Query related</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487374#M8080</link>
      <description>&lt;P&gt;I've written below query,&lt;/P&gt;

&lt;P&gt;index=* sourcetype=* EventCode=* |  rex field=_raw "((Process Command Line:\t)(?(.+)*))" |stats count by field.&lt;/P&gt;

&lt;P&gt;Tried extracting "Process Command line" field. After extracting i can see that though it doesn't contain any value(not even spaces), Splunk is not taking it as NULL.Instead it is taking as if field has some command line.&lt;/P&gt;

&lt;P&gt;Could you please help?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 09:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487374#M8080</guid>
      <dc:creator>rupesh67nikam</dc:creator>
      <dc:date>2019-11-20T09:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query related</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487375#M8081</link>
      <description>&lt;P&gt;could you please provide samples of your raw event and what you want to extract out of that?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 13:04:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487375#M8081</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-11-20T13:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query related</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487376#M8082</link>
      <description>&lt;P&gt;Hi @rupesh67nikam,&lt;BR /&gt;
I cannot read you search, you should insert it in Sample Code.&lt;/P&gt;

&lt;P&gt;Anyway, in your regex I see spaces in field name (but could be a visualization error) and it's better not use them.&lt;BR /&gt;
Then in stats count BY field command, you should use a field name (not field), e.g. something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count by Process_Command_Line
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count by "Process Command Line"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 13:30:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487376#M8082</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-11-20T13:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query related</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487377#M8083</link>
      <description>&lt;P&gt;Please Provide the Sample log, So that we can see if is there any issue with rex or something else.&lt;/P&gt;

&lt;P&gt;Normally rex syntax is like below.&lt;BR /&gt;
&lt;CODE&gt;(?&amp;lt;Field_Name&amp;gt;Regular_Expression)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 12:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-Query-related/m-p/487377#M8083</guid>
      <dc:creator>vikcee</dc:creator>
      <dc:date>2019-11-21T12:05:34Z</dc:date>
    </item>
  </channel>
</rss>

