<?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: Query Question in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514399#M34355</link>
    <description>&lt;P&gt;Hic&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225075"&gt;@colraj&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to extract the fields you need (action and httpRequest_clientIp) and use the stats count command, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="2020-08-17 10:22:56 BLOCK 555662058394-app/ALB-EXT-ORIGO-API-CERT/611b0867bb7ac42c	arn:aws:wafv2:us-east-1:555662058394:regional/webacl/WEBACL-ALB-EXT-ORIGO-API-CERT/b83fd96e-c7ae-4c20-93cb-4a2b1404e57e / 185.185.41.193 REGULAR Default_Action"
| rex "\d+-\d+-\d+\s+\d+:\d+:\d+\s(?&amp;lt;action&amp;gt;\w+).*\s+(?&amp;lt;httpRequest_clientIp&amp;gt;\d+\.\d+\.\d+\.\d+)\s"
| search action="BLOCK"
| stats count BY httpRequest_clientIp
| where count &amp;gt; 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your real situation, you have to modify the regex because I don't know if the time stamp at the beginning of the event really has&amp;nbsp; this format in your events (it wasn't in the example and I supposed "2020-08-17 10:22:56".&lt;/P&gt;&lt;P&gt;Anyway, the approach is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;run your main search,&lt;/LI&gt;&lt;LI&gt;extract the fields "action" and "httpRequest_clientIp" using regexes,&lt;/LI&gt;&lt;LI&gt;filter for&amp;nbsp;action="BLOCK",&lt;/LI&gt;&lt;LI&gt;count the occurrencies for each httpRequest_clientIp,&lt;/LI&gt;&lt;LI&gt;put a threeshold (0 in this example) to take only counts greater than the threeshold.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if you share an example of your logs I could be more precise in the regex.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2020 07:44:06 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-08-17T07:44:06Z</dc:date>
    <item>
      <title>Query Question</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514374#M34351</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;Can someone help me with creating a query to report if there are multiple blocked requests from a single IP? Please find the sample alert below.&lt;/P&gt;&lt;P&gt;Please email me&amp;nbsp;@colwinrebeiro.rajendran@hidglobal.com.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;action&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;httpSourceId&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;webaclId&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;httpRequest.uri&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;httpRequest.clientIp&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;ruleGroupList{}.terminatingRule.ruleId&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;terminatingRuleType&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;terminatingRuleId&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BLOCK&lt;/TD&gt;&lt;TD&gt;555662058394-app/ALB-EXT-ORIGO-API-CERT/611b0867bb7ac42c&lt;/TD&gt;&lt;TD&gt;arn:aws:wafv2:us-east-1:555662058394:regional/webacl/WEBACL-ALB-EXT-ORIGO-API-CERT/b83fd96e-c7ae-4c20-93cb-4a2b1404e57e&lt;/TD&gt;&lt;TD&gt;/&lt;/TD&gt;&lt;TD&gt;185.185.41.193&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;REGULAR&lt;/TD&gt;&lt;TD&gt;Default_Action&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Colwin&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 05:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514374#M34351</guid>
      <dc:creator>colraj</dc:creator>
      <dc:date>2020-08-17T05:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Query Question</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514399#M34355</link>
      <description>&lt;P&gt;Hic&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225075"&gt;@colraj&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to extract the fields you need (action and httpRequest_clientIp) and use the stats count command, something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="2020-08-17 10:22:56 BLOCK 555662058394-app/ALB-EXT-ORIGO-API-CERT/611b0867bb7ac42c	arn:aws:wafv2:us-east-1:555662058394:regional/webacl/WEBACL-ALB-EXT-ORIGO-API-CERT/b83fd96e-c7ae-4c20-93cb-4a2b1404e57e / 185.185.41.193 REGULAR Default_Action"
| rex "\d+-\d+-\d+\s+\d+:\d+:\d+\s(?&amp;lt;action&amp;gt;\w+).*\s+(?&amp;lt;httpRequest_clientIp&amp;gt;\d+\.\d+\.\d+\.\d+)\s"
| search action="BLOCK"
| stats count BY httpRequest_clientIp
| where count &amp;gt; 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your real situation, you have to modify the regex because I don't know if the time stamp at the beginning of the event really has&amp;nbsp; this format in your events (it wasn't in the example and I supposed "2020-08-17 10:22:56".&lt;/P&gt;&lt;P&gt;Anyway, the approach is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;run your main search,&lt;/LI&gt;&lt;LI&gt;extract the fields "action" and "httpRequest_clientIp" using regexes,&lt;/LI&gt;&lt;LI&gt;filter for&amp;nbsp;action="BLOCK",&lt;/LI&gt;&lt;LI&gt;count the occurrencies for each httpRequest_clientIp,&lt;/LI&gt;&lt;LI&gt;put a threeshold (0 in this example) to take only counts greater than the threeshold.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if you share an example of your logs I could be more precise in the regex.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 07:44:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514399#M34355</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-17T07:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Query Question</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514411#M34357</link>
      <description>&lt;P&gt;Hello Sir,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response. But since I am new to to splunk. I am not sure what information(logs) do you actually need. If you are fine, we can do a screen sharing session so that you can understand or please let me know where i can find this log information for this particular task.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 08:45:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514411#M34357</guid>
      <dc:creator>colraj</dc:creator>
      <dc:date>2020-08-17T08:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Query Question</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514629#M34382</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225075"&gt;@colraj&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;remember that in a Splunk job 70% is the knowledge of the technology you're working, 30% is how to use this knowledge in Splunk.&lt;/P&gt;&lt;P&gt;This means that the problem isn't in your Splunk knowledge: you have to know very well the logs you're analyzing: knowing the fields, the error messages, etc...&lt;/P&gt;&lt;P&gt;When you have a clear idea of what there's in your logs and what you need to extract and find, then you can approach Splunk to build and run the search.&lt;/P&gt;&lt;P&gt;So, start from the logs you have, then analyze them finding the useful informations, then identify what are the conditions to find.&lt;/P&gt;&lt;P&gt;Without these informations it isn't possible to create and run a Splunk search.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 07:49:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Query-Question/m-p/514629#M34382</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-08-18T07:49:18Z</dc:date>
    </item>
  </channel>
</rss>

