<?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 case statement in URL search is not working in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/case-statement-in-URL-search-is-not-working/m-p/514086#M3017</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am facing some difficulty in achieving below. Can anyone help.&lt;BR /&gt;I am getting 0 in the columns only and no other data&lt;/P&gt;&lt;P&gt;index=dev_env sourcetype="urldata" URL ="*" LoadTime="*"&lt;BR /&gt;| eval url_name= case(URL like "&lt;A href="https://www.pingtest.com/server/server.aspx%" target="_blank" rel="noopener"&gt;https://www.pingtest.com/server/server.aspx%&lt;/A&gt;" , "ServerLogin",&lt;BR /&gt;URL like "&lt;A href="https://www.servermonitor/clients/hostname/server.aspx?filetype_id=474&amp;amp;mode=new%&amp;quot;,&amp;quot;Servers" target="_blank" rel="noopener"&gt;https://www.servermonitor/clients/hostname/server.aspx?filetype_id=474&amp;amp;mode=new%","Servers&lt;/A&gt;",&lt;BR /&gt;URL like "&lt;A href="https://www.pingtest.com/clients/User/Testdata.aspx%" target="_blank" rel="noopener"&gt;https://www.pingtest.com/clients/User/Testdata.aspx%&lt;/A&gt;" ,"ServersPing"&lt;BR /&gt;URLlike "&lt;A href="https://www.pingtest.com/mobileusers/Logins/Login.aspx?testid=1578&amp;amp;actid=21047%&amp;quot;,&amp;quot;MobilePing&amp;quot;,URL" target="_blank" rel="noopener"&gt;https://www.pingtest.com/mobileusers/Logins/Login.aspx?testid=1578&amp;amp;actid=21047%","MobilePing",URL&lt;/A&gt; like "&lt;A href="https://www.pingtest.com/User/newuser.aspx?%&amp;quot;,&amp;quot;NewUserPing&amp;quot;,1==1,0" target="_blank" rel="noopener"&gt;https://www.pingtest.com/User/newuser.aspx?%","NewUserPing",1==1,0&lt;/A&gt;)&lt;BR /&gt;| timechart span=1m&amp;nbsp; eval(round(avg(LoadTime),0)) as TimeUsedtoload by url_name&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Aug 2020 12:34:43 GMT</pubDate>
    <dc:creator>sahil237888</dc:creator>
    <dc:date>2020-08-14T12:34:43Z</dc:date>
    <item>
      <title>case statement in URL search is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/case-statement-in-URL-search-is-not-working/m-p/514086#M3017</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am facing some difficulty in achieving below. Can anyone help.&lt;BR /&gt;I am getting 0 in the columns only and no other data&lt;/P&gt;&lt;P&gt;index=dev_env sourcetype="urldata" URL ="*" LoadTime="*"&lt;BR /&gt;| eval url_name= case(URL like "&lt;A href="https://www.pingtest.com/server/server.aspx%" target="_blank" rel="noopener"&gt;https://www.pingtest.com/server/server.aspx%&lt;/A&gt;" , "ServerLogin",&lt;BR /&gt;URL like "&lt;A href="https://www.servermonitor/clients/hostname/server.aspx?filetype_id=474&amp;amp;mode=new%&amp;quot;,&amp;quot;Servers" target="_blank" rel="noopener"&gt;https://www.servermonitor/clients/hostname/server.aspx?filetype_id=474&amp;amp;mode=new%","Servers&lt;/A&gt;",&lt;BR /&gt;URL like "&lt;A href="https://www.pingtest.com/clients/User/Testdata.aspx%" target="_blank" rel="noopener"&gt;https://www.pingtest.com/clients/User/Testdata.aspx%&lt;/A&gt;" ,"ServersPing"&lt;BR /&gt;URLlike "&lt;A href="https://www.pingtest.com/mobileusers/Logins/Login.aspx?testid=1578&amp;amp;actid=21047%&amp;quot;,&amp;quot;MobilePing&amp;quot;,URL" target="_blank" rel="noopener"&gt;https://www.pingtest.com/mobileusers/Logins/Login.aspx?testid=1578&amp;amp;actid=21047%","MobilePing",URL&lt;/A&gt; like "&lt;A href="https://www.pingtest.com/User/newuser.aspx?%&amp;quot;,&amp;quot;NewUserPing&amp;quot;,1==1,0" target="_blank" rel="noopener"&gt;https://www.pingtest.com/User/newuser.aspx?%","NewUserPing",1==1,0&lt;/A&gt;)&lt;BR /&gt;| timechart span=1m&amp;nbsp; eval(round(avg(LoadTime),0)) as TimeUsedtoload by url_name&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 12:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/case-statement-in-URL-search-is-not-working/m-p/514086#M3017</guid>
      <dc:creator>sahil237888</dc:creator>
      <dc:date>2020-08-14T12:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: case statement in URL search is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/case-statement-in-URL-search-is-not-working/m-p/514091#M3018</link>
      <description>&lt;P&gt;As per your eval there is a syntax error. However, if the URL field matches the eval condition, then you should see output. Following is a run anywhere example based on your data which is giving output for me&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval URL="https://www.pingtest.com/server/server.aspx,https://www.servermonitor/clients/hostname/server.aspx?filetype_id=474&amp;amp;mode=new,https://www.pingtest.com/clients/User/Testdata.aspx,https://www.pingtest.com/mobileusers/Logins/Login.aspx?testid=1578&amp;amp;actid=21047,https://www.pingtest.com/User/newuser.aspx" 
| makemv URL delim="," 
| mvexpand URL 
| eval LoadTime=random()
| eval url_name= case(URL like "https://www.pingtest.com/server/server.aspx%" , "ServerLogin",
    URL like "https://www.servermonitor/clients/hostname/server.aspx?filetype_id=474&amp;amp;mode=new%","Servers",
    URL like "https://www.pingtest.com/clients/User/Testdata.aspx%" ,"ServersPing",
    URL like "https://www.pingtest.com/mobileusers/Logins/Login.aspx?testid=1578&amp;amp;actid=21047%","MobilePing",
    URL like "https://www.pingtest.com/User/newuser.aspx?%","NewUserPing",1==1,0) 
| timechart span=1m eval(round(avg(LoadTime),0)) as TimeUsedtoload by url_name cont=f&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 14 Aug 2020 13:04:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/case-statement-in-URL-search-is-not-working/m-p/514091#M3018</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-08-14T13:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: case statement in URL search is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/case-statement-in-URL-search-is-not-working/m-p/514092#M3019</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;on manual it's said that you should use like as like(text, pattern). So could you change your query to:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;index=dev_env sourcetype="urldata" URL ="*" LoadTime="*"
| eval url_name= case(like(URL, "https://www.pingtest.com/server/server.aspx%" ), "ServerLogin",
like(URL, "https://www.servermonitor/clients/hostname/server.aspx?filetype_id=474&amp;amp;mode=new%"),"Servers",
like(URL,"https://www.pingtest.com/clients/User/Testdata.aspx%") ,"ServersPing"
like(URL, "https://www.pingtest.com/mobileusers/Logins/Login.aspx?testid=1578&amp;amp;actid=21047%"),"MobilePing",
like(URL, "https://www.pingtest.com/User/newuser.aspx?%"),"NewUserPing",true(),0)
| timechart span=1m  eval(round(avg(LoadTime),0)) as TimeUsedtoload by url_name &lt;/LI-CODE&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 13:05:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/case-statement-in-URL-search-is-not-working/m-p/514092#M3019</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-08-14T13:05:38Z</dc:date>
    </item>
  </channel>
</rss>

