<?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 Creating alert for high traffic to a destination in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674906#M230993</link>
    <description>&lt;P&gt;Hi, I have a search that shows the output of traffic as sum(sentbyte)&lt;/P&gt;
&lt;P&gt;This is my search, names have been changed to protect the guilty:&lt;/P&gt;
&lt;P&gt;________________________________________________&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=netfw host="firewall"
srcname IN (host1,host2,host3...)
action=allowed dstip=8.8.8.8
| eval mytime=strftime(_time,"%Y/%m/%d %H %M")
| stats sum(sentbyte) by mytime&lt;/LI-CODE&gt;
&lt;P&gt;________________________________________________&lt;/P&gt;
&lt;P&gt;The results show the peak per minute, which I can graph with a line chart, and they range up to 10,000,000.&lt;/P&gt;
&lt;P&gt;I have tried to set up the alerting when the&amp;nbsp;sum(sentbyte) is over 5,000,000 but cannot get it to trigger.&lt;/P&gt;
&lt;P&gt;My alert is set to custom:&lt;/P&gt;
&lt;P&gt;| stats sum(sentbyte) by mytime &amp;gt; 5000000&lt;/P&gt;
&lt;P&gt;I me be on the wrong track for what I am trying to do but have spent many hours going in circles with this one. Any help is greatly appreciated&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jan 2024 09:10:14 GMT</pubDate>
    <dc:creator>Drewprice</dc:creator>
    <dc:date>2024-01-20T09:10:14Z</dc:date>
    <item>
      <title>Creating alert for high traffic to a destination</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674906#M230993</link>
      <description>&lt;P&gt;Hi, I have a search that shows the output of traffic as sum(sentbyte)&lt;/P&gt;
&lt;P&gt;This is my search, names have been changed to protect the guilty:&lt;/P&gt;
&lt;P&gt;________________________________________________&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=netfw host="firewall"
srcname IN (host1,host2,host3...)
action=allowed dstip=8.8.8.8
| eval mytime=strftime(_time,"%Y/%m/%d %H %M")
| stats sum(sentbyte) by mytime&lt;/LI-CODE&gt;
&lt;P&gt;________________________________________________&lt;/P&gt;
&lt;P&gt;The results show the peak per minute, which I can graph with a line chart, and they range up to 10,000,000.&lt;/P&gt;
&lt;P&gt;I have tried to set up the alerting when the&amp;nbsp;sum(sentbyte) is over 5,000,000 but cannot get it to trigger.&lt;/P&gt;
&lt;P&gt;My alert is set to custom:&lt;/P&gt;
&lt;P&gt;| stats sum(sentbyte) by mytime &amp;gt; 5000000&lt;/P&gt;
&lt;P&gt;I me be on the wrong track for what I am trying to do but have spent many hours going in circles with this one. Any help is greatly appreciated&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 09:10:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674906#M230993</guid>
      <dc:creator>Drewprice</dc:creator>
      <dc:date>2024-01-20T09:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for high traffic to a destination</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674907#M230994</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264189"&gt;@Drewprice&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;there's some conceptual and a logical errors in your search:&lt;/P&gt;&lt;P&gt;at first you have to define a time period for the check, e.g. every 10 minutes, otherwise there's no sense to use _time in your search.&lt;/P&gt;&lt;P&gt;the second error is that you don't need to transform the timestamp in human readable.&lt;/P&gt;&lt;P&gt;At least, but this is an interpretation of mine, why do you want to calculate the peek? usually it's calculated the amount of sent bytes in a period, and anyway you use the sum function so you don't calculate the peak (for the peak you should use max)&lt;/P&gt;&lt;P&gt;So you should try something like this:&lt;/P&gt;&lt;P&gt;if you want to trigger an alert if the amount of bytes in one minute is more than , you should run something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=netfw host="firewall" srcname IN (host1,host2,host3...) action=allowed dstip=8.8.8.8
| timechart sum(sentbyte) AS count span=1m
| where count&amp;gt;5000000&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=netfw host="firewall" srcname IN (host1,host2,host3...) action=allowed dstip=8.8.8.8
| bin span=1m _time
| stats sum(sentbyte) AS count BY _time
| where count&amp;gt;5000000&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 06:51:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674907#M230994</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-20T06:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for high traffic to a destination</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674913#M230995</link>
      <description>&lt;P&gt;As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; already pointed out, if working with _time it's usually (there are some use cases against it but they are rare) good do leave it as a unix timestamp throughout your whole search pipeline and only render it to human-readable text at the end for presentation. (you can also use fieldformat to keep the data in machine-convenient form but present the time to the user as a formatted string - that's my preferred approach).&lt;/P&gt;&lt;P&gt;The question is what kind of data you actually have and how your firewall reports traffic on an ongoing connection. Some firewalls (for example Juniper) give you an event on flow creation and on flow closing with just one value on session close giving you summarized traffic across the whole flow. Other firewalls can give you "keep-alive" events on already established sessions providing you with differential traffic updates (but some can also give you aggregated traffic over the whole session).&lt;/P&gt;&lt;P&gt;So it's not that obvious how to query for that data.&lt;/P&gt;&lt;P&gt;Also if you have your data normalized into CIM datamodel and your datamodel accelerated, you could use that datamodel to make your searches way way faster.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 09:06:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674913#M230995</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-01-20T09:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for high traffic to a destination</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674939#M230999</link>
      <description>&lt;P&gt;Thank you so much! I was going down that track but could not put it together.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 22:40:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674939#M230999</guid>
      <dc:creator>Drewprice</dc:creator>
      <dc:date>2024-01-20T22:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating alert for high traffic to a destination</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674948#M231002</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264189"&gt;@Drewprice&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 09:25:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-alert-for-high-traffic-to-a-destination/m-p/674948#M231002</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-01-21T09:25:02Z</dc:date>
    </item>
  </channel>
</rss>

