<?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 do you run Splunk query for Field with brackets? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390251#M113665</link>
    <description>&lt;P&gt;It might be a very simple answer, however I am not able to find it so far . &lt;/P&gt;

&lt;P&gt;My splunk query has a field name "Size(MB)" . I can not get around with escape character, eval or Rex to run the query with this type of field . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dbx ServerName="bestserver" sourcetype=stats | timechart span =1d **avg(Size(MB))** by DBname
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 23 Sep 2018 01:13:44 GMT</pubDate>
    <dc:creator>ratan2257</dc:creator>
    <dc:date>2018-09-23T01:13:44Z</dc:date>
    <item>
      <title>How do you run Splunk query for Field with brackets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390251#M113665</link>
      <description>&lt;P&gt;It might be a very simple answer, however I am not able to find it so far . &lt;/P&gt;

&lt;P&gt;My splunk query has a field name "Size(MB)" . I can not get around with escape character, eval or Rex to run the query with this type of field . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dbx ServerName="bestserver" sourcetype=stats | timechart span =1d **avg(Size(MB))** by DBname
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Sep 2018 01:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390251#M113665</guid>
      <dc:creator>ratan2257</dc:creator>
      <dc:date>2018-09-23T01:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do you run Splunk query for Field with brackets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390252#M113666</link>
      <description>&lt;P&gt;@ratan2257&lt;/P&gt;

&lt;P&gt;You just need double quotes around the name.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dbx ServerName="bestserver" sourcetype=stats | timechart span =1d avg("Size(MB)") by DBname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 16:44:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390252#M113666</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-09-23T16:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you run Splunk query for Field with brackets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390253#M113667</link>
      <description>&lt;P&gt;Unfortunately that didn't worked. &lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 18:06:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390253#M113667</guid>
      <dc:creator>ratan2257</dc:creator>
      <dc:date>2018-09-23T18:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do you run Splunk query for Field with brackets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390254#M113668</link>
      <description>&lt;P&gt;If your data is in for of like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;bla bla Size(128)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you can extract it using regex like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dbx ServerName="bestserver" sourcetype=stats | rex "Size\((?&amp;lt;Size&amp;gt;[^\)]+)" | timechart span=1d avg(Size) by DBname
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Sep 2018 18:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390254#M113668</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2018-09-23T18:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do you run Splunk query for Field with brackets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390255#M113669</link>
      <description>&lt;P&gt;It is not about the data , its Field name it self with brackets () .  &lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 18:39:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390255#M113669</guid>
      <dc:creator>ratan2257</dc:creator>
      <dc:date>2018-09-23T18:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you run Splunk query for Field with brackets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390256#M113670</link>
      <description>&lt;P&gt;For me this works:  &lt;CODE&gt;avg("Size(MB)")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You can try to rename the field like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | rename "Size(MB)" AS Size | timechart span=1d avg(Size) by DBname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS You do have a space after span in you example.  This does not work.  Correct is &lt;CODE&gt;span=1d&lt;/CODE&gt;  not &lt;CODE&gt;span =1d&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 16:11:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390256#M113670</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2018-09-24T16:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do you run Splunk query for Field with brackets?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390257#M113671</link>
      <description>&lt;P&gt;@ratan2257&lt;BR /&gt;
Is it possible to share the sample event or screenshot of this field and value?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 12:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-run-Splunk-query-for-Field-with-brackets/m-p/390257#M113671</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-09-25T12:13:00Z</dc:date>
    </item>
  </channel>
</rss>

