<?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: How to exclude field values from a column? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429007#M122702</link>
    <description>&lt;P&gt;Is this now solved, based on your other comment, or are you still running into some issue?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 09:41:52 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-06-05T09:41:52Z</dc:date>
    <item>
      <title>How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429000#M122695</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sourcetype="rocket:access" (host="rocket0.painpoint.com" OR host="rocket5.painpoint.com") date_wday!=saturday AND date_wday!=sunday
| eval headers=split(_raw,"|")
| eval request_id=mvindex(headers,2)
| eval rtim=mvindex(headers,11)
| table request_id,rtim

request_id contains fields such as,
o*1N0FIQQx292x15786665x0,
i*1N0FIQQx292x15786665x0
o*1N0FIQQx292x15786664x0
i*1N0FIQQx292x15786664x0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to exclude the field values that starts with &lt;STRONG&gt;i&lt;/STRONG&gt; and their corresponding &lt;STRONG&gt;rtim&lt;/STRONG&gt; value as well.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 08:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429000#M122695</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-05T08:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429001#M122696</link>
      <description>&lt;P&gt;Wouldn't a simple &lt;CODE&gt;| where request_id != "i*"&lt;/CODE&gt; suffice? Or if, the request_id values that you want to keep always start with &lt;CODE&gt;o*&lt;/CODE&gt;, make it a positive filter &lt;CODE&gt;| where request_id = "o*"&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Edit: as mentioned in comments below, where command does not support wildcards like that. Should use &lt;CODE&gt;| search request_id!="i*"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429001#M122696</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2020-09-29T19:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429002#M122697</link>
      <description>&lt;P&gt;I tried adding that | where condition at the end , But after adding the search won't give me any output.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:18:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429002#M122697</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-05T09:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429003#M122698</link>
      <description>&lt;P&gt;Can you then please share a screenshot of what the output looks like after running the search you mention in your question?&lt;/P&gt;

&lt;P&gt;Edit: Oh and I see I made a typo in my suggestion (fixed that now), misspelled the request_id field name. If you copy pasted that, maybe that was the simple reason you didn't get results.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:21:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429003#M122698</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-05T09:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429004#M122699</link>
      <description>&lt;P&gt;I just added | search request_id!="i*"&lt;BR /&gt;
It solved my problem.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:25:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429004#M122699</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2018-06-05T09:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429005#M122700</link>
      <description>&lt;P&gt;o*1N0FIQQx329x15798006x3    &lt;STRONG&gt;37&lt;/STRONG&gt;&lt;BR /&gt;
i*1N0FIQQx329x15798006x3        &lt;STRONG&gt;-&lt;/STRONG&gt;&lt;BR /&gt;
o*1N0FIQQx329x15798005x3            &lt;STRONG&gt;5&lt;/STRONG&gt;&lt;BR /&gt;
i*1N0FIQQx329x15798005x3            &lt;STRONG&gt;-&lt;/STRONG&gt;&lt;BR /&gt;
o*1N0FIQQx329x15798004x3        &lt;STRONG&gt;58&lt;/STRONG&gt;&lt;BR /&gt;
i*1N0FIQQx329x15798004x3            &lt;STRONG&gt;-&lt;/STRONG&gt;&lt;BR /&gt;
o*1N0FIQQx329x15798002x5    &lt;STRONG&gt;281&lt;/STRONG&gt;&lt;BR /&gt;
o*1N0FIQQx329x15798003x4              &lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Above is how the output looks like.&lt;BR /&gt;
the first column is 'request_id' and second one(mentioned in bold) is 'rtim'.&lt;BR /&gt;
I want to remove the request_id starting with i* , because the corresponding rtim value is ' -' if reqeust_id is i*&lt;BR /&gt;
After removing rtim with value '-' I want to be able to find the average of the column.&lt;BR /&gt;
something like this&lt;/P&gt;

&lt;P&gt;sourcetype="rocket:access" (host="rocket0.painpoint.com" OR host="rocket5.painpoint.com") date_wday!=saturday AND date_wday!=sunday&lt;BR /&gt;
| eval headers=split(_raw,"|")&lt;BR /&gt;
| eval request_id=mvindex(headers,2)&lt;BR /&gt;
| eval rtim=mvindex(headers,11)&lt;BR /&gt;
| eval req_time_seconds=rtim*0.001 &lt;BR /&gt;
| timechart span=1d eval(round(avg(req_time_seconds),2)) as Average_Response_Time&lt;/P&gt;

&lt;P&gt;Could you help here ?&lt;BR /&gt;
Because of the presence of '-' in the rtim , the timechart command won't give any result.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:50:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429005#M122700</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2020-09-29T19:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429006#M122701</link>
      <description>&lt;P&gt;My bad, where doesn't accept wildcard strings. The search command is indeed the way to go.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:40:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429006#M122701</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-05T09:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429007#M122702</link>
      <description>&lt;P&gt;Is this now solved, based on your other comment, or are you still running into some issue?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 09:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429007#M122702</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-05T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429008#M122703</link>
      <description>&lt;P&gt;Yes, I am. &lt;BR /&gt;
The 'rtim' field contains "-" if reqeust_id starts with i*&lt;BR /&gt;
I want to calculate average (i.e. | timechart span=1d eval(round(avg(rtim),2)) as Average_Response_Time) of rtim, But I am not able to do it as some of its values contain '-'.&lt;BR /&gt;
That's why it is imperative to remove the events with request_id value with i*.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:50:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429008#M122703</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2020-09-29T19:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429009#M122704</link>
      <description>&lt;P&gt;But you succeeded at filtering those out using &lt;CODE&gt;| search request_id!="i*"&lt;/CODE&gt; right?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 10:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429009#M122704</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-05T10:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429010#M122705</link>
      <description>&lt;P&gt;yes, |search request_id!="i*"  works when I present the output with a table command.&lt;BR /&gt;
But I intend to present the output in a timechart average format like below. And I am not sure where to apply the search fitering in that scenario&lt;/P&gt;

&lt;P&gt;host=A OR B or C&lt;BR /&gt;
| eval headers=split(_raw,"|")&lt;BR /&gt;
| eval request_id=mvindex(headers,2)&lt;BR /&gt;
| eval rtim=mvindex(headers,11)&lt;BR /&gt;
| eval req_time_seconds=rtim*0.001 &lt;BR /&gt;
| timechart span=1d eval(round(avg(req_time_seconds),2)) as Average_Response_Time&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:50:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429010#M122705</guid>
      <dc:creator>zacksoft</dc:creator>
      <dc:date>2020-09-29T19:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude field values from a column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429011#M122706</link>
      <description>&lt;P&gt;Before the timechart command. Basically you can insert that piece as soon as that request_id field is set, so, this should work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=A OR B or C
| eval headers=split(_raw,"|")
| eval request_id=mvindex(headers,2)
| search request_id!="i*"
| eval rtim=mvindex(headers,11)
| eval req_time_seconds=rtim*0.001 
| timechart span=1d eval(round(avg(req_time_seconds),2)) as Average_Response_Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jun 2018 10:37:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-field-values-from-a-column/m-p/429011#M122706</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-05T10:37:35Z</dc:date>
    </item>
  </channel>
</rss>

