<?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 How to make whole Statement as a field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356865#M105579</link>
    <description>&lt;P&gt;I have a search base like below and want to put the count as 1. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index1 test machine is not responding java.lang.NullPointerException as "test" | stats  count by test | dedup test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My count is 0&lt;/P&gt;</description>
    <pubDate>Mon, 01 May 2017 15:34:24 GMT</pubDate>
    <dc:creator>jw44250</dc:creator>
    <dc:date>2017-05-01T15:34:24Z</dc:date>
    <item>
      <title>How to make whole Statement as a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356865#M105579</link>
      <description>&lt;P&gt;I have a search base like below and want to put the count as 1. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index1 test machine is not responding java.lang.NullPointerException as "test" | stats  count by test | dedup test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My count is 0&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 15:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356865#M105579</guid>
      <dc:creator>jw44250</dc:creator>
      <dc:date>2017-05-01T15:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to make whole Statement as a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356866#M105580</link>
      <description>&lt;P&gt;The stats commands works upon the fields. Assuming whatever string you've on base search you want to show count of it, Try one of following methods.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index1 test machine is not responding java.lang.NullPointerException | stats count  | eval test="test machine is not responding java.lang.NullPointerException " | table test count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=index1 test machine is not responding java.lang.NullPointerException | rex "(?&amp;lt;test&amp;gt;test machine is not responding java.lang.NullPointerException)"  | stats count by test
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 May 2017 15:41:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356866#M105580</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-01T15:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to make whole Statement as a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356867#M105581</link>
      <description>&lt;P&gt;Thanks. let me try it.&lt;/P&gt;

&lt;P&gt;can i do soemthing like this, it works but not gettign any result&lt;BR /&gt;
index=index1 test machine is not responding java.lang.NullPointerException  as "testmachine" | stats count by testmachine&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 16:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356867#M105581</guid>
      <dc:creator>jw44250</dc:creator>
      <dc:date>2017-05-01T16:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to make whole Statement as a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356868#M105582</link>
      <description>&lt;P&gt;No you can't. YOu can't assign a field name to a string. You would need to have it extracted (like option 2) before you could use it.&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 16:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-whole-Statement-as-a-field/m-p/356868#M105582</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-05-01T16:30:34Z</dc:date>
    </item>
  </channel>
</rss>

