<?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 I edit my real-time search to add a value to events that are missing a certain field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-real-time-search-to-add-a-value-to-events-that/m-p/224430#M66111</link>
    <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;We have the search below which gives us the count of all our URLs in events in real-time, but we have a few events where URL is missing.&lt;/P&gt;

&lt;P&gt;Now we need to assign a certain URL value to those events which do not have a URL, but subsearch is not working for this as it is a real-time search.&lt;/P&gt;

&lt;P&gt;For ex: We have events where URL is missing, but have the value "EXPRESS". We need to filter those events by this value and assign them a separate URL value called  "EXPRESS.com". Can someone please suggest how we can do this?&lt;/P&gt;

&lt;P&gt;Below is our search we used:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=datapower host="10.71.8.170"  NOT URL=https://raly.com tag=prod  
|eval URL=case(URL="https://gita.com","ATON",URL="https://services.com",
"SERVICES",URL="https://soap.com","RAN",URL="https://www.care.com",
"CARE",URL="https://post.com","Post",
URL="http://get.com","GET",URL="https://master.com","Master",1=1,"Others")
|stats count(datapower_response_time) as count by URL|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the search above, we need to add events that contain "Express" to EXPRESS.COM (as we don't have URL for these events)&lt;/P&gt;

&lt;P&gt;Thanks..&lt;/P&gt;</description>
    <pubDate>Mon, 29 Feb 2016 15:26:12 GMT</pubDate>
    <dc:creator>splunker9999</dc:creator>
    <dc:date>2016-02-29T15:26:12Z</dc:date>
    <item>
      <title>How do I edit my real-time search to add a value to events that are missing a certain field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-real-time-search-to-add-a-value-to-events-that/m-p/224430#M66111</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;We have the search below which gives us the count of all our URLs in events in real-time, but we have a few events where URL is missing.&lt;/P&gt;

&lt;P&gt;Now we need to assign a certain URL value to those events which do not have a URL, but subsearch is not working for this as it is a real-time search.&lt;/P&gt;

&lt;P&gt;For ex: We have events where URL is missing, but have the value "EXPRESS". We need to filter those events by this value and assign them a separate URL value called  "EXPRESS.com". Can someone please suggest how we can do this?&lt;/P&gt;

&lt;P&gt;Below is our search we used:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=datapower host="10.71.8.170"  NOT URL=https://raly.com tag=prod  
|eval URL=case(URL="https://gita.com","ATON",URL="https://services.com",
"SERVICES",URL="https://soap.com","RAN",URL="https://www.care.com",
"CARE",URL="https://post.com","Post",
URL="http://get.com","GET",URL="https://master.com","Master",1=1,"Others")
|stats count(datapower_response_time) as count by URL|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For the search above, we need to add events that contain "Express" to EXPRESS.COM (as we don't have URL for these events)&lt;/P&gt;

&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Mon, 29 Feb 2016 15:26:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-real-time-search-to-add-a-value-to-events-that/m-p/224430#M66111</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-02-29T15:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my real-time search to add a value to events that are missing a certain field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-real-time-search-to-add-a-value-to-events-that/m-p/224431#M66112</link>
      <description>&lt;P&gt;If I am understanding you correctly (highly questionable), you can use this to add &lt;CODE&gt;.com&lt;/CODE&gt; if it does not already exist.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval URL=if((matc(URL, "\.com$")), URL, URL + ".com") ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Feb 2016 18:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-real-time-search-to-add-a-value-to-events-that/m-p/224431#M66112</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-02-29T18:00:18Z</dc:date>
    </item>
  </channel>
</rss>

