<?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: add time constraint for web site avilability check condition in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/add-time-constraint-for-web-site-avilability-check-condition/m-p/498710#M194919</link>
    <description>&lt;P&gt;Further to above I update the query as below:&lt;BR /&gt;
    index=f5&lt;BR /&gt;
    | rex field=headers "Host: (?&lt;HOST_URL&gt;[a-zA-Z0-9-.]+.[a-zA-Z]{2,3})" &lt;BR /&gt;
    | eval portal=if(cidrmatch("10.x0x.0.0/16",dest) OR cidrmatch("10.a0a.0.0/16",dest) ,"External_Portal","Internal_Portal") | search host_url="&lt;A href="http://www.*.xx.xx" target="_blank"&gt;www.*.xx.xx&lt;/A&gt;" portal="External_Portal" &lt;BR /&gt;
        [ search index=f5 earliest=-5m latest=now &lt;BR /&gt;
        | rex field=headers "Host: (?&lt;HOST_URL&gt;[a-zA-Z0-9-.]+.[a-zA-Z]{2,3})" &lt;BR /&gt;
        | stats count(eval(status="200")) AS "ok_status", count(eval(status="404" OR status="50*")) as "not_ok_status" by dest,host_url&lt;BR /&gt;
        | eval site_status = if("ok_status" &amp;lt; "not_ok_status" , "site_unavailable" , "site_available") &lt;BR /&gt;
        | return  site_status] &lt;BR /&gt;
    | fields site_status,dest,host_url&lt;/HOST_URL&gt;&lt;/HOST_URL&gt;&lt;/P&gt;

&lt;P&gt;but no results...?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:12:47 GMT</pubDate>
    <dc:creator>riqbal47010</dc:creator>
    <dc:date>2020-09-30T03:12:47Z</dc:date>
    <item>
      <title>add time constraint for web site avilability check condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-time-constraint-for-web-site-avilability-check-condition/m-p/498709#M194918</link>
      <description>&lt;P&gt;Referring below query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=f5
| rex field=headers "Host: (?&amp;lt;host_url&amp;gt;[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3})" 
| eval portal=if(cidrmatch("10.x0x.0.0/16",dest) OR cidrmatch("10.A0A.0.0/16",dest) ,"External_Portal","Internal_Portal") 
| stats count(eval(status="200")) AS "ok_status", count(eval(status="404" OR status="50*")) as "not_ok_status" by dest,host_url 
**| eval site_status = if("ok_status" &amp;lt; "not_ok_status" , "site_unavailable" , "site_available")** 
| search host_url="www.*.xxx.xx" | fields + dest host_url site_status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;================================================&lt;BR /&gt;
&lt;STRONG&gt;| eval site_status = if("ok_status" &amp;lt; "not_ok_status" , "site_unavailable" , "site_available")&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;At this stage I want to put the time constraint that if within 5 minutes, if("ok_status" &amp;lt; "not_ok_status") then the site is unavailable.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:12:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-time-constraint-for-web-site-avilability-check-condition/m-p/498709#M194918</guid>
      <dc:creator>riqbal47010</dc:creator>
      <dc:date>2020-09-30T03:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: add time constraint for web site avilability check condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-time-constraint-for-web-site-avilability-check-condition/m-p/498710#M194919</link>
      <description>&lt;P&gt;Further to above I update the query as below:&lt;BR /&gt;
    index=f5&lt;BR /&gt;
    | rex field=headers "Host: (?&lt;HOST_URL&gt;[a-zA-Z0-9-.]+.[a-zA-Z]{2,3})" &lt;BR /&gt;
    | eval portal=if(cidrmatch("10.x0x.0.0/16",dest) OR cidrmatch("10.a0a.0.0/16",dest) ,"External_Portal","Internal_Portal") | search host_url="&lt;A href="http://www.*.xx.xx" target="_blank"&gt;www.*.xx.xx&lt;/A&gt;" portal="External_Portal" &lt;BR /&gt;
        [ search index=f5 earliest=-5m latest=now &lt;BR /&gt;
        | rex field=headers "Host: (?&lt;HOST_URL&gt;[a-zA-Z0-9-.]+.[a-zA-Z]{2,3})" &lt;BR /&gt;
        | stats count(eval(status="200")) AS "ok_status", count(eval(status="404" OR status="50*")) as "not_ok_status" by dest,host_url&lt;BR /&gt;
        | eval site_status = if("ok_status" &amp;lt; "not_ok_status" , "site_unavailable" , "site_available") &lt;BR /&gt;
        | return  site_status] &lt;BR /&gt;
    | fields site_status,dest,host_url&lt;/HOST_URL&gt;&lt;/HOST_URL&gt;&lt;/P&gt;

&lt;P&gt;but no results...?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:12:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-time-constraint-for-web-site-avilability-check-condition/m-p/498710#M194919</guid>
      <dc:creator>riqbal47010</dc:creator>
      <dc:date>2020-09-30T03:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: add time constraint for web site avilability check condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/add-time-constraint-for-web-site-avilability-check-condition/m-p/498711#M194920</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=f5 sourcetype=your_sourcetype "www.*" dest="10.x0x.*"
| rex field=headers "Host: (?&amp;lt;host_url&amp;gt;[^:]+?)" 
| stats count(eval(status="200")) AS ok_status, count(eval(status="404" OR status="50*")) as not_ok_status by dest,host_url 
| fields dest host_url ok_status not_ok_status
| eval site_status = if(ok_status &amp;lt; not_ok_status , "site_unavailable" , "site_available")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I modified it in various ways.how about this?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 15:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/add-time-constraint-for-web-site-avilability-check-condition/m-p/498711#M194920</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-11-29T15:11:03Z</dc:date>
    </item>
  </channel>
</rss>

