
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Wed, 15 Apr 2026 21:17:09 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Introducing notifications for HTTP Traffic Anomalies]]></title>
            <link>https://blog.cloudflare.com/introducing-http-traffic-anomalies-notifications/</link>
            <pubDate>Tue, 31 Oct 2023 13:01:11 GMT</pubDate>
            <description><![CDATA[ Today we're excited to announce Traffic Anomalies notifications, which proactively alert you when your Internet property is seeing an unexpected change in traffic patterns ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5vLGpnj5frsUOqDOTSbbmY/d1b29458a05d13a8b1d1727d08a25592/Traffic-anomalies-1.png" />
            
            </figure><p>When it comes to managing Internet properties, the difference between a small technical hiccup and major incident is often a matter of speed. Proactive alerting plays a crucial role, which is why we were excited when we released <a href="/smarter-origin-service-level-monitoring/">HTTP Error Rate notifications</a> — giving administrators visibility into when end users are experiencing errors.</p><p>But what if there are issues that don't show up as errors, like a sudden drop in traffic, or a spike?</p><p>Today, we're excited to announce Traffic Anomalies notifications, available to enterprise customers. These notifications trigger when Cloudflare detects unexpected changes in traffic, giving another valuable perspective into the health of your systems.</p><p>Unexpected changes in traffic could be indicative of many things. If you run an ecommerce site and see a spike in traffic that could be great news — maybe customers are flocking to your sale, or you just had an ad run on a popular TV show. However, it could also mean that something is going wrong: maybe someone accidentally turned off a firewall rule, and now you’re seeing more malicious traffic. Either way, you might want to know that something has changed.</p><p>Similarly, a sudden drop in traffic could mean many things. Perhaps it’s Friday afternoon and all of your employees are signing off and no longer accessing your company website. Or maybe a link to your site is broken, and now potential customers aren’t able to access it. You could be losing potential revenue every minute that traffic is low, so you’d want to know as soon as possible to investigate.</p>
    <div>
      <h3>How can we tell when to alert?</h3>
      <a href="#how-can-we-tell-when-to-alert">
        
      </a>
    </div>
    <p>Calculating anomalies in time series datasets is difficult to do well. The simplest way to do it is to use basic thresholds. However, as we’ve <a href="/smarter-origin-service-level-monitoring/">previously blogged about</a>, simple thresholds aren’t very accurate when trying to determine when things are actually going wrong. There are too many edge cases for them to work effectively.</p><p>Calculating anomalies in HTTP errors is relatively easy. We know that in general there should be a very low number of errors, so any spike is bad and therefore alertable. That’s why we use <a href="https://sre.google/workbook/alerting-on-slos/">Service Level Objectives (SLOs)</a> to calculate anomalies for our <a href="https://developers.cloudflare.com/notifications/notification-available/#traffic-monitoring">HTTP Error Rate notifications</a>.</p><p>However, analyzing overall HTTP traffic behaves more similarly to <a href="/introducing-thresholds-in-security-event-alerting-a-z-score-love-story/">Cloudflare Security Events</a>: there’s some general baseline of events that is computed from historical trends. Any deviation from that baseline is alertable. Because of those similarities, we decided to use the same calculations for Traffic Anomalies notifications as we have previously used for Security Event notifications: <a href="/get-notified-when-your-site-is-under-attack/">z-scores</a>. This involves comparing the current value to the average over a period of time. However, many standard deviations away from the average the current value is, is the z-score.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4WyyibpRN80C7w0WSsG3OL/a7153af760800ba681676c21c3db9159/image4-6.png" />
            
            </figure><p><i>Plot of HTTP traffic against z-scores. The blue is the HTTP traffic, purple is the positive z-score bound of the traffic, and green is the negative z-score bound of the traffic</i></p><p>For Traffic Anomalies notifications, we’re comparing the traffic over the past 5 minutes (the short window) to the average of the traffic over the past 4 hours (the long window). Positive z-scores indicate a spike, and negative z-scores indicate a drop. If the current value is more than 3.5 standard deviations away from the average, we alert. We measure every 5 minutes, so we can alert on any traffic spike or drop in a timely fashion.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6A3BnkHW9bCc9JUuq2aOW7/40964ec23fd85153ae48dcdfa117f38a/image2-9.png" />
            
            </figure><p><i>Green bucket is the long window and the red bucket is the short window</i></p><p>While our Security Event notifications only trigger when there is a spike in security events (a drop is almost always a good thing), in the case of Traffic Anomalies we send notifications for both spikes <i>and</i> drops. This is because a drop of HTTP traffic is likely indicative of a problem, and a surge could be good or bad.</p><p>As with Security Events, Traffic Anomalies notifications support <a href="/introducing-thresholds-in-security-event-alerting-a-z-score-love-story/">minimum thresholds</a>. This means that, even if we determine that an event is outside 3.5 standard deviations, if the number of events is insignificant, we don’t alert. A spike must be at least 200 requests, and a drop must fall by at least 200 requests. This makes the notifications less noisy, since we aren’t alerting on small spikes and drops.</p>
    <div>
      <h3>Digging a little deeper</h3>
      <a href="#digging-a-little-deeper">
        
      </a>
    </div>
    <p>Cloudflare stores sampled statistics on requests that go through its network <a href="/http-analytics-for-6m-requests-per-second-using-clickhouse/">in Clickhouse</a>. Every minute, we take HTTP traffic from Clickhouse and store it in an instance of VictoriaMetrics, a time-series data storage solution. VictoriaMetrics gives us out-of-the-box algorithmic functions for free, and it has been a good fit for our use case. We chose VictoriaMetrics for a few reasons.</p><p>Firstly, it's easy to configure and operate. As a team, we want to optimize for low operational burden and VictoriaMetrics has been great thus far. Secondly, VictoriaMetrics has the ability to scale horizontally, meaning we can run it in a highly available mode. For a system such as this where we want something reliable to compute time sensitive information for our customers, the high availability requirement is essential. Finally, in our tests, we found that VictoriaMetrics used around ⅓ of the memory that Prometheus, a similar alternative product, did for the same use case.</p><p>Once we have data in VictoriaMetrics, we can run queries against it and determine whether we need to alert our customers or not, based on notification configurations they have created ahead of time. To do this we leverage our existing Alert Notification System, <a href="/new-tools-to-monitor-your-server-and-avoid-downtime/">which we blogged about initially in 2019</a>. We know we can count on our current notification system for the last mile to deliver these critical notifications to our customers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3Hu0yJDBmf67PqYc7JsAjw/3986029c7ad8e59f91f3f689a9c7a489/image1-9.png" />
            
            </figure><p><i>Data flow from HTTP request to notification</i></p><h6><i>Setting up the Notification</i></h6><p>To configure this notification, navigate to the “Notifications” tab of the dashboard. Select Traffic Anomalies as your notification type. As with all Cloudflare notifications, you’re able to name and describe your notification, and choose how you want to be notified.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ggeccGOgR8LCHrwXVIOxe/0bc0ec47154d63112398588b25040879/image5-3.png" />
            
            </figure><p><i>Traffic Anomalies notification in the Dashboard</i></p><p>You can choose which domains you want monitored for Traffic Anomalies, whether you want to include traffic that’s already been mitigated by Cloudflare DoS or WAF products, and whether there are specific status codes you want included or excluded. You can also choose whether you want to be alerted on traffic spikes, drops, or both.</p><p>We’re excited to use this system to help serve our Enterprise customers with invaluable notifications regarding the overall health of their systems. Head over to the Notifications tab in the dash to check this new notification out now!</p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Notifications]]></category>
            <category><![CDATA[Network Services]]></category>
            <guid isPermaLink="false">3Vmb6kMuhHfnJ1EQgzYsRt</guid>
            <dc:creator>Cathy Chi</dc:creator>
            <dc:creator>Natasha Wissmann</dc:creator>
        </item>
        <item>
            <title><![CDATA[Traffic anomalies and notifications with Cloudflare Radar]]></title>
            <link>https://blog.cloudflare.com/traffic-anomalies-notifications-radar/</link>
            <pubDate>Tue, 26 Sep 2023 13:00:37 GMT</pubDate>
            <description><![CDATA[ Cloudflare Radar now displays country and ASN traffic anomalies in the Outage Center as they are detected, as well as publishing anomaly information via API. We are also launching Radar notifications, enabling users to subscribe to notifications about traffic anomalies ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/64RU7fXZM4tF0ZKhlNAqcY/36a614227aeb00168ea9e08681f2638b/image13-3.png" />
            
            </figure><p>We launched the <a href="https://radar.cloudflare.com/outage-center">Cloudflare Radar Outage Center (CROC)</a> during Birthday Week 2022 as a way of keeping the community up to date on Internet disruptions, including outages and shutdowns, visible in Cloudflare’s traffic data. While some of the entries have their genesis in information from social media posts made by local telecommunications providers or civil society organizations, others are based on an internal traffic anomaly detection and alerting tool. Today, we’re adding this alerting feed to Cloudflare Radar, showing country and network-level traffic anomalies on the CROC as they are detected, as well as making the feed available via <a href="https://developers.cloudflare.com/api/operations/radar-get-traffic-anomalies">API</a>.</p><p>Building on this new functionality, as well as the <a href="/route-leak-detection-with-cloudflare-radar/">route leaks</a> and <a href="/bgp-hijack-detection/">route hijacks insights</a> that we recently launched <a href="https://radar.cloudflare.com/routing">on Cloudflare Radar</a>, we are also launching new Radar notification functionality, enabling you to subscribe to notifications about traffic anomalies, confirmed Internet outages, route leaks, or route hijacks. Using the <a href="https://dash.cloudflare.com/">Cloudflare dashboard’s</a> existing notification functionality, users can set up notifications for one or more countries or autonomous systems, and receive notifications when a relevant event occurs. Notifications may be sent via e-mail or webhooks — the available delivery methods <a href="https://developers.cloudflare.com/notifications/">vary according to plan level</a>.</p>
    <div>
      <h3>Traffic anomalies</h3>
      <a href="#traffic-anomalies">
        
      </a>
    </div>
    <p>Internet traffic generally follows a fairly regular pattern, with daily peaks and troughs at roughly the same volumes of traffic. However, while weekend traffic patterns may look similar to weekday ones, their traffic volumes are generally different. Similarly, holidays or national events can also cause traffic patterns and volumes to differ significantly from “normal”, as people shift their activities and spend more time offline, or as people turn to online sources for information about, or coverage of, the event. These traffic shifts can be newsworthy, and we have covered some of them in past Cloudflare blog posts (<a href="/how-the-coronation-of-king-charles-iii-affected-internet-traffic/">King Charles III coronation</a>, <a href="/easter-passover-ramadan-internet-trends-2023/">Easter/Passover/Ramadan</a>, <a href="/how-the-brazilian-presidential-elections-affected-internet-traffic/">Brazilian presidential elections</a>).</p><p>However, as you also know from reading our <a href="/tag/outage/">blog posts</a> and following <a href="https://twitter.com/CloudflareRadar">Cloudflare Radar</a> on social media, it is the more drastic drops in traffic that are a cause for concern. Some are the result of infrastructure damage from severe weather or a natural disaster like an earthquake and are effectively unavoidable, but getting timely insights into the impact of these events on Internet connectivity is valuable from a communications perspective. Other traffic drops have occurred when an authoritarian government orders mobile Internet connectivity to be shut down, or shuts down all Internet connectivity nationwide. Timely insights into these types of anomalous traffic drops are often critical from a human rights perspective, as Internet shutdowns are often used as a means of controlling communication with the outside world.</p><p>Over the last several months, the Cloudflare Radar team has been using an internal tool to identify traffic anomalies and post alerts for followup to a dedicated chat space. The companion blog post <a href="/detecting-internet-outages"><i>Gone Offline: Detecting Internet Outages</i></a> goes into deeper technical detail about our traffic analysis and anomaly detection methodologies that power this internal tool.</p><p>Many of these internal traffic anomaly alerts ultimately result in Outage Center entries and Cloudflare Radar social media posts. Today, we’re extending the <a href="https://radar.cloudflare.com/outage-center">Cloudflare Radar Outage Center</a> and publishing information about these anomalies as we identify them. As shown in the figure below, the new <b>Traffic anomalies</b> table includes the type of anomaly (location or ASN), the entity where the anomaly was detected (country/region name or autonomous system), the start time, duration, verification status, and an “Actions” link, where the user can view the anomaly on the relevant entity traffic page or subscribe to a notification. (If manual review of a detected anomaly finds that it is present in multiple Cloudflare traffic datasets and/or is visible in third-party datasets, such as Georgia Tech’s <a href="https://ioda.live/">IODA</a> platform, we will mark it as verified. Unverified anomalies may be false positives, or related to Netflows collection issues, though we endeavor to minimize both.)</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4avPigfW9GjhqKlH4U9XI2/35b3761b52b9046ed4fa03c6b68db4c1/pasted-image-0-6.png" />
            
            </figure><p>In addition to this new table, we have updated the <a href="https://radar.cloudflare.com/outage-center">Cloudflare Radar Outage Center</a> map to highlight where we have detected anomalies, as well as placing them into a broader temporal context in a new timeline immediately below the map. Anomalies are represented as orange circles on the map, and can be hidden with the toggle in the upper right corner. Double-bordered circles represent an aggregation across multiple countries, and zooming in to that area will ultimately show the number of anomalies associated with each country that was included in the aggregation. Hovering over a specific dot in the timeline displays information about the outage or anomaly with which it is associated.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3fqllfaS5B100bVx1f58w0/d1c4f33c47d8d9271f4c3cf77d0688a3/pasted-image-0--1--6.png" />
            
            </figure><p>Internet outage information has been available via the <a href="https://developers.cloudflare.com/api/operations/radar-get-annotations-outages">Radar API</a> since we launched the Outage Center and API in September 2022, and traffic anomalies are now available through a <a href="https://developers.cloudflare.com/api/operations/radar-get-traffic-anomalies">Radar API endpoint</a> as well. An example traffic anomaly API request and response are shown below.</p><p><b>Example request:</b></p>
            <pre><code>curl --request GET \ --url https://api.cloudflare.com/client/v4/radar/traffic_anomalies \ --header 'Content-Type: application/json' \ --header 'X-Auth-Email: '</code></pre>
            <p><b>Example response:</b></p>
            <pre><code>{
  "result": {
    "trafficAnomalies": [
      {
        "asnDetails": {
          "asn": "189",
          "locations": {
            "code": "US",
            "name": "United States"
          },
          "name": "LUMEN-LEGACY-L3-PARTITION"
        },
        "endDate": "2023-08-03T23:15:00Z",
        "locationDetails": {
          "code": "US",
          "name": "United States"
        },
        "startDate": "2023-08-02T23:15:00Z",
        "status": "UNVERIFIED",
        "type": "LOCATION",
        "uuid": "55a57f33-8bc0-4984-b4df-fdaff72df39d",
        "visibleInDataSources": [
          "string"
        ]
      }
    ]
  },
  "success": true
}</code></pre>
            
    <div>
      <h3>Notifications overview</h3>
      <a href="#notifications-overview">
        
      </a>
    </div>
    <p>Timely knowledge about Internet “events”, such as drops in traffic or routing issues, are potentially of interest to multiple audiences. Customer service or help desk agents can use the information to help diagnose customer/user complaints about application performance or availability. Similarly, network administrators can use the information to better understand the state of the Internet outside their network. And civil society organizations can use the information to inform action plans aimed at maintaining communications and protecting human rights in areas of conflict or instability. With the new notifications functionality also being launched today, you can subscribe to be notified about observed traffic anomalies, confirmed Internet outages, route leaks, or route hijacks, at a country or autonomous system level. In the following sections, we discuss how to subscribe to and configure notifications, as well as the information contained within the various types of notifications.</p>
    <div>
      <h4>Subscribing to notifications</h4>
      <a href="#subscribing-to-notifications">
        
      </a>
    </div>
    <p>Note that you need to log in to the <a href="https://dash.cloudflare.com/">Cloudflare dashboard</a> to subscribe to and configure notifications. No purchase of Cloudflare services is necessary — just a verified email address is required to set up an account. While we would have preferred to not require a login, it enables us to take advantage of Cloudflare’s existing notifications engine, allowing us to avoid having to dedicate time and resources to building a separate one just for Radar. If you don’t already have a Cloudflare account, visit <a href="https://dash.cloudflare.com/sign-up">https://dash.cloudflare.com/sign-up</a> to create one. Enter your username and a unique strong password, click “Sign Up”, and follow the instructions in the verification email to activate your account. (Once you’ve activated your account, we also suggest activating <a href="https://www.cloudflare.com/learning/access-management/what-is-two-factor-authentication/">two-factor authentication (2FA)</a> as an additional security measure.)</p><p>Once you have set up and activated your account, you are ready to start creating and configuring notifications. The first step is to look for the Notifications (bullhorn) icon – the presence of this icon means that notifications are available for that metric — in the Traffic, Routing, and Outage Center sections on Cloudflare Radar. If you are on a country or ASN-scoped traffic or routing page, the notification subscription will be scoped to that entity.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2pthIoKtBxP566BiMTmIo7/f59c76a18de0f8d3f4f3ce8f020edbfb/image3-23.png" />
            
            </figure><p><i>Look for this icon in the Traffic, Routing, and Outage Center sections of Cloudflare Radar to start setting up notifications.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7BzESdUYejnGYbyOELT3xb/2f71cc74d0f760efe24ead5ef5aef5d9/pasted-image-0--2--4.png" />
            
            </figure><p><i>In the Outage Center, click the icon in the “Actions” column of an Internet outages table entry to subscribe to notifications for the related location and/or ASN(s). Click the icon alongside the table description to subscribe to notifications for all confirmed Internet outages.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1JzDVk3W9GXmFs1EEMpI1y/64d825564b01ced81010d08c8f8b7e30/pasted-image-0--3--6.png" />
            
            </figure><p><i>In the Outage Center, click the icon in the “Actions” column of a Traffic anomalies table entry to subscribe to notifications for the related entity. Click the icon alongside the table description to subscribe to notifications for all traffic anomalies.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/USbTwPiy87LABK9yzvdAD/1bd91ad4a70fc53a1a2c7f51a400800d/pasted-image-0--4--2.png" />
            
            </figure><p><i>On country or ASN traffic pages, click the icon alongside the description of the traffic trends graph to subscribe to notifications for traffic anomalies or Internet outages impacting the selected country or ASN.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7uXs607M5vob0cRMFuyPrG/638d601eecfdc6b89b90770e9482584f/pasted-image-0--5--2.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/266gINGnVLwOGMcogtGoql/4ad8994d134b1a71365d07a50fb725d1/pasted-image-0--6--1.png" />
            
            </figure><p><i>On country or ASN routing pages, click the icon alongside the description to subscribe to notifications for route leaks or origin hijacks related to the selected country or ASN.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7LXt4HacyxqtpJbgj6sQ6T/b8ec62dbc5a9447ed37ace2844ceabed/pasted-image-0--7--1.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2SWPlKRV9xUQxyXsfqbDBj/b4f0253d65e3aec230b3f5ce7e126b1d/pasted-image-0--8--1.png" />
            
            </figure><p><i>Within the Route Leaks or Origin Hijacks tables on the routing pages, click the icon in a table entry to subscribe to notifications for route leaks or origin hijacks for referenced countries and/or ASNs.</i> </p><p>After clicking a notification icon, you’ll be taken to the Cloudflare login screen. Enter your username and password (and 2FA code if required), and once logged in, you’ll see the Add Notification page, pre-filled with the key information passed through from the referring page on Radar, including relevant locations and/or ASNs. (If you are already logged in to Cloudflare, then you’ll be taken directly to the Add Notification page after clicking a notification icon on Radar.) On this page, you can name the notification, add an optional description, and adjust the location and ASN filters as necessary. Enter an email address for notifications to be sent to, or select an established webhook destination (if you have webhooks enabled on your account).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3WoiB73UcjTrzvt3KMeOgm/2146fb68b612f8d82897e8dfd46f66c3/pasted-image-0--9--1.png" />
            
            </figure><p>Click “Save”, and the notification is added to the Notifications Overview page for the account.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2g3sIazFDddiBRi12oMzYr/00100d832d84fc0d54379341ee575692/pasted-image-0--10--1.png" />
            
            </figure><p>You can also create and configure notifications directly within Cloudflare, without starting from a link on a Radar page. To do so, log in to Cloudflare, and choose “Notifications” from the left side navigation bar. That will take you to the Notifications page shown below. Click the “Add” button to add a new notification.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5mw4IUl2YxYOXQdM3pfcrU/0d4979bf37b64a2ffe29ad1e084b3afc/pasted-image-0--11--1.png" />
            
            </figure><p>On the next page, search for and select “Radar” from the list of Cloudflare products for which notifications are available.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6dq1Kt2F5XIJlV3X1r6Jyw/beb22e11b950f73130eec41c8b612350/pasted-image-0--12--1.png" />
            
            </figure><p>On the subsequent “Add Notification” page, you can create and configure a notification from scratch. Event types can be selected in the “Notify me for:” field, and both locations and ASNs can be searched for and selected within the respective “Filtered by (optional)” fields. Note that if no filters are selected, then notifications will be sent for <b>all</b> events of the selected type(s). Add one or more emails to send notifications to, or select a webhook target if available, and click “Save” to add it to the list of notifications configured for your account.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/bbIKwireM6CKWHJS92IvU/2770fd9d6c355c3e9e1c7010528e8053/pasted-image-0--13-.png" />
            
            </figure><p>It is worth mentioning that advanced users can also create and configure notifications through the <a href="https://developers.cloudflare.com/api/operations/notification-policies-create-a-notification-policy">Cloudflare API Notification policies endpoint</a>, but we will not review that process within this blog post.</p>
    <div>
      <h4>Notification messages</h4>
      <a href="#notification-messages">
        
      </a>
    </div>
    <p>Example notification email messages are shown below for the various types of events. Each contains key information like the type of event, affected entities, and start time — additional relevant information is included depending on the event type. Each email includes both plaintext and HTML versions to accommodate multiple types of email clients. (Final production emails may vary slightly from those shown below.)</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4m9llI9iUghxk9WNmeXs5c/9c03b0fa19da713b02d05e3828d8e338/pasted-image-0--14-.png" />
            
            </figure><p><i>Internet outage notification emails include information about the affected entities, a description of the cause of the outage, start time, scope (if available), and the type of outage (Nationwide, Network, Regional, or Platform), as well as a link to view the outage in a Radar traffic graph.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6ojcoXp3rsEhPY5QvrzmLu/ae551c2efb6a8dc2424c8b5f6b8a1e13/pasted-image-0--15-.png" />
            
            </figure><p><i>Traffic anomaly notification emails simply include information about the affected entity and a start time, as well as a link to view the anomaly in a Radar traffic graph.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4odkGwBAyUklNM3EpEYjlD/a808cd14489ebba0eb9ca463bfce3e2c/pasted-image-0--16-.png" />
            
            </figure><p><i>BGP hijack notification emails include information about the hijacking and victim ASNs, affected IP address prefixes, the number of BGP messages (announcements) containing leaked routes, the number of peers announcing the hijack, detection timing, a confidence level on the event being a true hijack, and relevant tags, as well as a link to view details of the hijack event on Radar.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5xjHBbXtCiOKWEhgS4bfpU/b3ab59dc514a70dfdeaae820e10fbb44/pasted-image-0--17-.png" />
            
            </figure><p><i>BGP route leak notification emails include information about the AS that the leaked routes were learned from, the AS that leaked the routes, the AS that received and propagated the leaked routes, the number of affected prefixes, the number of affected origin ASes, the number of BGP route collector peers that saw the route leak, and detection timing, as well as a link to view details of the route leak event on Radar.</i></p><p>If you are sending notifications to webhooks, you can integrate those notifications into tools like Slack. For example, by following the directions in <a href="https://api.slack.com/messaging/webhooks">Slack’s API documentation</a>, creating a simple integration took just a few minutes and results in messages like the one shown below.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6uMXY1xUfZdoyX2u1J5xWO/87ccc9c307304e78a698c9dfb060cc2a/pasted-image-0--18-.png" />
            
            </figure>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>Cloudflare’s unique perspective on the Internet provides us with near-real-time insight into unexpected drops in traffic, as well as potentially problematic routing events. While we’ve been sharing these insights with you over the past year, you had to visit Cloudflare Radar to figure out if there were any new “events”. With the launch of notifications, we’ll now automatically send you information about the latest events that you are interested in.</p><p>We encourage you to visit Cloudflare Radar to familiarize yourself with the information we publish about <a href="https://radar.cloudflare.com/outage-center">traffic anomalies</a>, <a href="https://radar.cloudflare.com/outage-center">confirmed Internet outages</a>, <a href="https://radar.cloudflare.com/routing">BGP route leaks</a>, and <a href="https://radar.cloudflare.com/routing">BGP origin hijacks</a>. Look for the notification icon on the relevant graphs and tables on Radar, and go through the workflow to set up and subscribe to notifications. (And don’t forget to sign up for a <a href="https://dash.cloudflare.com/">Cloudflare</a> account if you don’t have one already.) Please <a href="#">send us feedback</a> about the notifications, as we are constantly working to improve them, and let us know how and where you’ve integrated Radar notifications into your own tools/workflows/organization.</p><p>Follow Cloudflare Radar on social media at <a href="https://twitter.com/CloudflareRadar">@CloudflareRadar</a> (Twitter), <a href="https://noc.social/@cloudflareradar">https://noc.social/@cloudflareradar</a> (Mastodon), and <a href="https://bsky.app/profile/radar.cloudflare.com">radar.cloudflare.com</a> (Bluesky).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3bnvOiFBE4NEjULFappDQN/9f9df4b7ee7c5f74ac242e00d77344cc/Announcement.png" />
            
            </figure><p></p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[Outage]]></category>
            <category><![CDATA[BGP]]></category>
            <category><![CDATA[Internet Traffic]]></category>
            <category><![CDATA[Notifications]]></category>
            <guid isPermaLink="false">4OjzZwFN2RgWm8cgWlrPty</guid>
            <dc:creator>David Belson</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing thresholds in Security Event Alerting: a z-score love story]]></title>
            <link>https://blog.cloudflare.com/introducing-thresholds-in-security-event-alerting-a-z-score-love-story/</link>
            <pubDate>Tue, 30 Aug 2022 14:00:00 GMT</pubDate>
            <description><![CDATA[ Today we are excited to announce thresholds for our Security Event Alerts: a new and improved way of detecting anomalous spikes of security events on your Internet properties. By introducing a threshold, we are able to make alerts more accurate and only notify you when it truly matters ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today we are excited to announce thresholds for our Security Event Alerts: a new and improved way of detecting anomalous spikes of security events on your Internet properties. Previously, our calculations were based on z-score methodology alone, which was able to determine most of the significant spikes. By introducing a threshold, we are able to make alerts more accurate and only notify you when it truly matters. One can think of it as a romance between the two strategies. This is the story of how they met.</p><p>Author’s note: as an intern at Cloudflare I got to work on this project from start to finish from investigation all the way to the final product.</p>
    <div>
      <h3>Once upon a time</h3>
      <a href="#once-upon-a-time">
        
      </a>
    </div>
    <p>In the beginning, there were Security Event Alerts. Security Event Alerts are notifications that are sent whenever we detect a threat to your Internet property. As the name suggests, they track the number of security events, which are requests to your application that match security rules. For example, you can configure a security rule that blocks access from certain countries. Every time a user from that country tries to access your Internet property, it will log as a security event. While a security event may be harmless and fired as a result of the natural flow of traffic, it is important to alert on instances when a rule is fired more times than usual. Anomalous spikes of too many security events in a short period of time can indicate an attack. To find these anomalies and distinguish between the natural number of security events and that which poses a threat, we need a good strategy.</p>
    <div>
      <h3>The lonely life of a z-score</h3>
      <a href="#the-lonely-life-of-a-z-score">
        
      </a>
    </div>
    <p>Before a threshold entered the picture, our strategy worked only on the basis of a <a href="https://en.wikipedia.org/wiki/Standard_score">z-score</a>. Z-score is a methodology that looks at the number of standard deviations a certain data point is from the mean. In our current configuration, if a spike crosses the z-score value of 3.5, we send you an alert. This value was decided on after careful analysis of our customers’ data, finding it the most effective in determining a legitimate alert. Any lower and notifications will get noisy for smaller spikes. Any higher and we may miss out on significant events. You can read more about our z-score methodology in this <a href="/get-notified-when-your-site-is-under-attack/">blog post</a>.</p><p>The following graphs are an example of how the z-score method works. The first graph shows the number of security events over time, with a recent spike.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7EnlNMeKzVeZ13Q0M2Mxcx/f9c919a5ad35d509e1728a77142247f5/image3-9.png" />
            
            </figure><p>To determine whether this spike is significant, we calculate the z-score and check if the value is above 3.5:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/40S18LfgnqtBqZRA3zMT3r/2508f9fc821a75ac3c0a16c4780aebba/image4-3.png" />
            
            </figure><p>As the graph shows, the deviation is above 3.5 and so an alert is triggered.</p><p>However, relying on z-score becomes tricky for domains that experience no security events for a long period of time. With many security events at zero, the mean and standard deviation depress to zero as well. When a non-zero value finally appears, it will always be infinite standard deviations away from the mean. As a result, it will always trigger an alert even on spikes that do not pose any threat to your domain, such as the below:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/iGehGRFNnvEfKjmkZEWNm/90a9793e0a828dd8d6cdbcc4010cb94a/image8.png" />
            
            </figure><p>With five security events, you are likely going to ignore this spike, as it is too low to indicate a meaningful threat. However, the z-score in this instance will be infinite:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3j3tRLJgHkuLdmFb9YWZOt/8be281744a599e191f4b228373b61570/image5-3.png" />
            
            </figure><p>Since a z-score of infinity is greater than 3.5, an alert will be triggered. This means that customers with few security events would often be overwhelmed by event alerts that are not worth worrying about.</p>
    <div>
      <h3>Letting go of zeros</h3>
      <a href="#letting-go-of-zeros">
        
      </a>
    </div>
    <p>To avoid the mean and standard deviation becoming zero and thus alerting on every non-zero spike, zero values can be ignored in the calculation. In other words, to calculate the mean and standard deviation, only data points that are higher than zero will be considered.</p><p>With those conditions, the same spike to five security events will now generate a different z-score:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/U9AkTbV420o1eOa4ooARM/2e1195b59c652cff9c3e77dfc0292c21/image7.png" />
            
            </figure><p>Great! With the z-score at zero, it will no longer trigger an alert on the harmless spike!</p><p>But what about spikes that could be harmful? When calculations ignore zeros, we need enough non-zero data points to accurately determine the mean and standard deviation. If only one non-zero value is present, that data point determines the mean and standard deviation. As such, the mean will always be equal to the spike, z-score will always be zero and an alert will never be triggered:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/wwHM9U3GcPF7M07EzZN35/7603546497ec2483fa954df74e3742aa/image6-1.png" />
            
            </figure><p>For a spike of 1000 events, we can tell that there is something wrong and we should trigger an alert. However, because there is only one non-zero data point, the z-score will remain zero:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ebNgZAbLIzsj1JahZs0Ua/f65a2c2875d4c471f238dc8ed4f37397/image7-1.png" />
            
            </figure><p>The z-score does not cross the value 3.5 and an alert will not be triggered.</p><p>So what’s better? Including zeros in our calculations can skew the results for domains with too many zero events and alert them every time a spike appears. Not including zeros is mathematically wrong and will never alert on these spikes.</p>
    <div>
      <h3>Threshold, the prince charming</h3>
      <a href="#threshold-the-prince-charming">
        
      </a>
    </div>
    <p>Clearly, a z-score is not enough on its own.</p><p>Instead, we paired up the z-score with a threshold. The threshold represents the raw number of security events an Internet property can have, below which an alert will not be sent. While z-score checks whether the spike is at least 3.5 standard deviations above the mean, the threshold makes sure it is above a certain static value. If both of these conditions are met, we will send you an alert:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3IOnJTCLN6LaQ3u8sCxFe/14fefb481faec6d77a6754f14d3e4bb5/image1-17.png" />
            
            </figure><p>The above spike crosses the threshold of 200 security events. We now have to check that the z-score is above 3.5:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7ih3ymbLWAs063WrBlL8AH/33cbf6ca5203e664638e8cd1592a178d/image9.png" />
            
            </figure><p>The z-score value crosses 3.5 and an alert will be sent.</p><p>A threshold for the number of security events comes as the perfect complement. By itself, the threshold cannot determine whether something is a spike, and would simply alert on any value crossing it. This <a href="/smarter-origin-service-level-monitoring/">blog post</a> describes in more detail why thresholds alone do not work. However, when paired with z-score, they are able to share their strengths and cover for each other's weaknesses. If the z-score falsely detects an insignificant spike, the threshold will stop the alert from triggering. Conversely, if a value does cross the security events threshold, the z-score ensures there is a reasonable variance from the data average before allowing an alert to be sent.</p>
    <div>
      <h3>The invaluable value</h3>
      <a href="#the-invaluable-value">
        
      </a>
    </div>
    <p>To foster a successful relationship between the z-score and security events threshold, we needed to determine the most effective threshold value. After careful analysis of our previous attacks on customers, we set the value to 200. This number is high enough to filter out the smaller, noisier spikes, but low enough to expose any threats.</p>
    <div>
      <h3>Am I invited to the wedding?</h3>
      <a href="#am-i-invited-to-the-wedding">
        
      </a>
    </div>
    <p>Yes, you are! The z-score and threshold relationship is already enabled for all WAF customers, so all you need to do is sit back and relax. For enterprise customers, the threshold will be applied to each type of alert enabled on your domain.</p>
    <div>
      <h3>Happily ever after</h3>
      <a href="#happily-ever-after">
        
      </a>
    </div>
    <p>The story certainly does not end here. We are constantly iterating on our alerts, so keep an eye out for future updates on the road to make our algorithms even more personalized for your Internet properties!</p> ]]></content:encoded>
            <category><![CDATA[Notifications]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Internship Experience]]></category>
            <guid isPermaLink="false">321dGbaOdbcrR4AnRCrLAH</guid>
            <dc:creator>Kristina Galicova</dc:creator>
        </item>
        <item>
            <title><![CDATA[Durable Objects Alarms — a wake-up call for your applications]]></title>
            <link>https://blog.cloudflare.com/durable-objects-alarms/</link>
            <pubDate>Wed, 11 May 2022 12:59:17 GMT</pubDate>
            <description><![CDATA[ Durable Object alarms let you call a function at a defined point in the future, unlocking deeper use-cases for Durable Objects like reliable queuing ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Since we launched Durable Objects, developers have leveraged them as a novel building block for distributed applications.</p><p>Durable Objects provide globally unique instances of a JavaScript class a developer writes, accessed via a unique ID. The Durable Object associated with each ID implements some fundamental component of an application — a banking application might have a Durable Object representing each bank account, for example. The bank account object would then expose methods for incrementing a balance, transferring money or any other actions that the application needs to do on the bank account.</p><p>Durable Objects work well as a stateful backend for applications — while Workers can instantiate a new instance of your code in any of Cloudflare’s data centers in response to a request, Durable Objects guarantee that all requests for a given Durable Object will reach the same instance on Cloudflare’s network.</p><p>Each Durable Object is single-threaded and has access to a stateful storage API, making it easy to build consistent and highly-available distributed applications on top of them.</p><p>This system makes distributed systems’ development easier — we’ve seen some impressive applications launched atop Durable Objects, from collaborative whiteboarding tools to conflict-free replicated data type (CRDT) systems for coordinating distributed state launch.</p><p>However, up until now, there’s been a piece missing — how do you invoke a Durable Object when a client Worker is not making requests to it?</p><p>As with any distributed system, Durable Objects can become unavailable and stop running. Perhaps the machine you were running on was unplugged, or the datacenter burned down and is never coming back, or an individual object exceeded its memory limit and was reset. Before today, a subsequent request would reinitialize the Durable Object on another machine, but there was no way to programmatically wake up an Object.</p><p>Durable Objects Alarms are here to change that, unlocking new use cases for Durable Objects like queues and deferred processing.</p>
    <div>
      <h3>What is a Durable Object Alarm?</h3>
      <a href="#what-is-a-durable-object-alarm">
        
      </a>
    </div>
    <p>Durable Object Alarms allow you, from within your Durable Object, to schedule the object to be woken up at a time in the future. When the alarm’s scheduled time comes, the Durable Object’s <code>alarm()</code> handler will be called. If this handler throws an exception, the alarm will be automatically retried using exponential backoff until it succeeds — alarms have guaranteed at-least-once execution.</p>
    <div>
      <h3>How are Alarms different from Workers Cron Triggers?</h3>
      <a href="#how-are-alarms-different-from-workers-cron-triggers">
        
      </a>
    </div>
    <p>Alarms are more fine-grained than Cron Triggers. While a Workers service can have up to three Cron Triggers configured at once, it can have an unlimited amount of Durable Objects, each of which can have a single alarm active at a time.</p><p>Alarms are directly scheduled from and invoke a function within your Durable Object. Cron Triggers, on the other hand, are not programmatic — they execute based on their schedules, which have to be configured via the Cloudflare Dashboard or centralized configuration APIs.</p>
    <div>
      <h3>How do I use Alarms?</h3>
      <a href="#how-do-i-use-alarms">
        
      </a>
    </div>
    <p>First, you’ll need to add the <code>durable_object_alarms</code> compatibility flag to your <code>wrangler.toml</code>.</p>
            <pre><code>compatibility_flags = ["durable_object_alarms"]</code></pre>
            <p>Next, implement an <code>alarm()</code> handler in your Durable Object that will be called when the alarm executes. From anywhere else in your Durable Object, call <code>state.storage.setAlarm()</code> and pass in a time for the alarm to run at. You can use <code>state.storage.getAlarm()</code> to retrieve the currently set alarm time.</p><p>In this example, we implemented an alarm handler that wakes the Durable Object up once every 10 seconds to batch requests to a single Durable Object, deferring processing until there is enough work in the queue for it to be worthwhile to process them.</p>
            <pre><code>export default {
  async fetch(request, env) {
    let id = env.BATCHER.idFromName("foo");
    return await env.BATCHER.get(id).fetch(request);
  },
};

const SECONDS = 1000;

export class Batcher {
  constructor(state, env) {
    this.state = state;
    this.storage = state.storage;
    this.state.blockConcurrencyWhile(async () =&gt; {
      let vals = await this.storage.list({ reverse: true, limit: 1 });
      this.count = vals.size == 0 ? 0 : parseInt(vals.keys().next().value);
    });
  }
  async fetch(request) {
    this.count++;

    // If there is no alarm currently set, set one for 10 seconds from now
    // Any further POSTs in the next 10 seconds will be part of this kh.
    let currentAlarm = await this.storage.getAlarm();
    if (currentAlarm == null) {
      this.storage.setAlarm(Date.now() + 10 * SECONDS);
    }

    // Add the request to the batch.
    await this.storage.put(this.count, await request.text());
    return new Response(JSON.stringify({ queued: this.count }), {
      headers: {
        "content-type": "application/json;charset=UTF-8",
      },
    });
  }
  async alarm() {
    let vals = await this.storage.list();
    await fetch("http://example.com/some-upstream-service", {
      method: "POST",
      body: Array.from(vals.values()),
    });
    await this.storage.deleteAll();
    this.count = 0;
  }
}</code></pre>
            <p>Once every 10 seconds, the <code>alarm()</code> handler will be called. In the event an unexpected error terminates the Durable Object, it will be re-instantiated on another machine, following a short delay, after which it can continue processing.</p><p>Under the hood, Alarms are implemented by making reads and writes to the storage layer. This means Alarm <code>get</code> and <code>set</code> operations follow the same rules as any other storage operation – writes are coalesced with other writes, and reads have a defined ordering. See <a href="/durable-objects-easy-fast-correct-choose-three/">our blog post</a> on the caching layer we implemented for Durable Objects for more information.</p>
    <div>
      <h3>Durable Objects Alarms guarantee fault-tolerance</h3>
      <a href="#durable-objects-alarms-guarantee-fault-tolerance">
        
      </a>
    </div>
    <p>Alarms are designed to have no single point of failure and to run entirely on our edge – every Cloudflare data center running Durable Objects is capable of running alarms, including migrating Durable Objects from unhealthy data centers to healthy ones as necessary to ensure that their Alarm executes. Single failures should resolve in under 30 seconds, while multiple failures may take slightly longer.</p><p>We achieve this by storing alarms in the same distributed datastore that backs the Durable Object storage API. This allows alarm reads and writes to behave identically to storage reads and writes and to be performed atomically with them, and ensures that alarms are replicated across multiple datacenters.</p><p>Within each data center capable of running Durable Objects, there are multiple processes responsible for tracking upcoming alarms and triggering them, providing fault tolerance and scalability within the data center. A single elected leader in each data center is responsible for detecting failure of other data centers and assigning responsibility of those alarms to healthy local processes in its own data center. In the event of leader failure, another leader will be elected and become responsible for executing Alarms in the data center. This allows us to guarantee at-least-once execution for all Alarms.</p>
    <div>
      <h3>How do I get started?</h3>
      <a href="#how-do-i-get-started">
        
      </a>
    </div>
    <p>Alarms are a great way to build new distributed primitives, like queues, atop Durable Objects. They also provide a method for guaranteeing work within a Durable Object will complete, without relying on a client request to “kick” the Object.</p><p>You can get started with Alarms now by enabling Durable Objects in the Cloudflare <a href="https://dash.cloudflare.com/">dashboard</a>. For more info, check the developer docs or jump in our Discord.</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Durable Objects]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Notifications]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">5FKrh4z1ggyDYSTMgbDku6</guid>
            <dc:creator>Matt Alonso</dc:creator>
            <dc:creator>Greg McKeon</dc:creator>
        </item>
        <item>
            <title><![CDATA[Get updates on the health of your origin where you need them]]></title>
            <link>https://blog.cloudflare.com/get-updates-on-the-health-of-your-origin-where-you-need-them/</link>
            <pubDate>Tue, 22 Mar 2022 15:08:45 GMT</pubDate>
            <description><![CDATA[ We are thrilled to announce Health Checks availability within Cloudflare’s centralized Notification tab, available to all Pro, Business, and Enterprise customers. Now, you can get critical alerts on the health of your origin without checking your inbox! ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We are thrilled to announce the availability of Health Checks in the Cloudflare Dashboard’s Notifications tab, available to all Pro, Business, and Enterprise customers. Now, you can get critical alerts on the health of your origin without checking your inbox! Keep reading to learn more about how this update streamlines notification management and unlocks countless ways to stay informed on the health of your servers.</p>
    <div>
      <h2>Keeping your site reliable</h2>
      <a href="#keeping-your-site-reliable">
        
      </a>
    </div>
    <p>We first announced Health Checks when we realized some customers were setting up Load Balancers for their origins to monitor the origins’ availability and responsiveness. The Health Checks product provides a similarly powerful interface to Load Balancing, offering users the ability to ensure their origins meet criteria such as reachability, responsiveness, correct HTTP status codes, and correct HTTP body content. Customers can also receive email alerts when a Health Check finds their origin is unhealthy based on their custom criteria. In building a more focused product, we’ve added a slimmer, monitoring-based configuration, Health Check Analytics, and made it available for all paid customers. Health Checks run in multiple locations within Cloudflare’s edge network, meaning customers can monitor site performance across geographic locations.</p>
    <div>
      <h2>What’s new with Health Checks Notifications</h2>
      <a href="#whats-new-with-health-checks-notifications">
        
      </a>
    </div>
    <p>Health Checks email alerts have allowed customers to respond quickly to incidents and guarantee minimum disruption for their users. As before, Health Checks users can still select up to 20 email recipients to notify if a Health Check finds their site to be unhealthy. And if email is the right tool for your team, we’re excited to share that we have jazzed up our notification emails and added details on which Health Check triggered the notification, as well as the status of the Health Check:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6wQaM5dANtGNveurNe8YL8/ff5aba1af881fa0fcde15b0067cde725/image9-1.png" />
            
            </figure><p><i>New Health Checks email format with Time, Health Status, and Health Check details</i></p><p>That being said, monitoring an inbox is not ideal for many customers needing to stay proactively informed. If email is not the communication channel your team typically relies upon, checking emails can at best be inconvenient and, at worst, allow critical updates to be missed. That's where the Notifications dashboard comes in.</p><p>Users can now create Health Checks notifications within the Cloudflare Notifications dashboard. By integrating Health Checks with Cloudflare's powerful Notification platform, we have unlocked myriad new ways to ensure customers receive critical updates for their origin health. One of the key benefits of Cloudflare's Notifications is webhooks, which give customers the flexibility to sync notifications with various external services. Webhook responses contain JSON-encoded information, allowing users to ingest them into their internal or third-party systems.</p><p>For real-time updates, users can now use webhooks to send Health Check alerts directly to their preferred instant messaging platforms such as Slack, Google Chat, or Microsoft Teams, to name a few. Beyond instant messaging, customers can also use webhooks to send Health Checks notifications to their internal APIs or their <a href="https://www.cloudflare.com/learning/security/what-is-siem/">Security Information and Event Management (SIEM)</a> platforms, such as DataDog or Splunk, giving customers a single pane of glass for all Cloudflare activity, including notifications and event logs. For more on how to configure popular webhooks, <a href="https://developers.cloudflare.com/fundamentals/notifications/create-notifications/configure-webhooks">check out our developer docs</a>. Below, we'll walk you through a couple of powerful webhook applications. But first, let's highlight a couple of other ways the update to Health Checks notifications improves user experience.</p><p>By including Health Checks in the Notifications tab, users need only to access one page for a single source of truth where they can manage their account notifications.  For added ease of use, users can also migrate to Notification setup directly from the Health Check creation page as well.  From within a Health Check, users will also be able to see what Notifications are tied to it.</p><p>Additionally, configuring notifications for multiple Health Checks is now simplified. Instead of configuring notifications one Health Check at a time, users can now set up notifications for multiple or even all Health Checks from a single workflow.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5KkiuxbDOJYQxkDjWPkkeu/74d1bfbb4303e7f4cab1b656721a392e/image6-8.png" />
            
            </figure><p>Also, users can now access Health Checks notification history, and Enterprise customers can integrate Health Checks <a href="https://developers.cloudflare.com/fundamentals/notifications/create-notifications/create-pagerduty">directly with PagerDuty</a>. Last but certainly not least, as Cloudflare’s Notifications infrastructure grows in capabilities, Health Checks will be able to leverage all of these improvements. This guarantees Health Checks users the most timely and versatile notification capabilities that Cloudflare offers now and into the future.</p>
    <div>
      <h2>Setting up a Health Checks webhook</h2>
      <a href="#setting-up-a-health-checks-webhook">
        
      </a>
    </div>
    <p>To get notifications for health changes at an origin, <a href="https://support.cloudflare.com/hc/en-us/articles/4404867308429-About-Health-Checks">we first need to set up a Health Check for it.</a> In this example, we'll monitor HTTP responses: leave the Type and adjacent fields to their defaults. We will also monitor HTTP response codes: add `200` as an expected code, which will cause any other HTTP response code to trigger an unhealthy status.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6x9auU4cTDBaE0jmDBrhxZ/3aa5c3f88ab7ea8914e83c770b19c548/image13.png" />
            
            </figure>
    <div>
      <h3>Creating the webhook notification policy</h3>
      <a href="#creating-the-webhook-notification-policy">
        
      </a>
    </div>
    <p>Once we’ve got our Health Check set up, we can create a webhook to link it to. Let’s start with a popular use case and send our Health Checks to a Slack channel. Before creating the webhook in the Cloudflare Notifications dashboard, we <a href="https://api.slack.com/messaging/webhooks">enable webhooks in our Slack workspace and retrieve the webhook URL of the Slack channel we want to send notifications to.</a> Next, we navigate to our account’s Notifications tab to add the Slack webhook as a Destination, entering the name and URL of our webhook — the secret will populate automatically.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/tZHXzAsptIeB2zPRASSXc/2d98e2b05b16508f8a5942bf090214e9/image2-91.png" />
            
            </figure><p><i>Webhook creation page with the following user input: Webhook name, Slack webhook url, and auto-populated Secret</i></p><p>Once we hit <b>Save and Test</b>, we will receive a message in the designated Slack channel verifying that our webhook is working.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7Is2c2YurjdOtduCuqNJB1/b50c6e395d4407023a1484945e1751f7/image5-23.png" />
            
            </figure><p><i>Message sent in Slack via the configured webhook, verifying the webhook is working</i></p><p>This webhook can now be used for any notification type available in the Notifications dashboard. To have a Health Check notification sent to this Slack channel, simply add a new Health Check notification from the Notifications dashboard, selecting the Health Check(s) to tie to this webhook and the Slack webhook we just created. And, voilà! Anytime our Health Check detects a response status code other than 200 or goes from unhealthy to healthy, this Slack channel will be notified.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7vlEAwkWNFpTbQBd3h8nj3/a9ed32ad15594f48f9b0b49059223053/image10-1.png" />
            
            </figure><p><i>Health Check notification sent to Slack, indicating our server is online and Healthy.</i></p>
    <div>
      <h3>Create an Origin Health Status Page</h3>
      <a href="#create-an-origin-health-status-page">
        
      </a>
    </div>
    <p>Let’s walk through another powerful webhooks implementation with Health Checks. Using the Health Check we configured in our last example, let’s create a simple status page using Cloudflare Workers and Durable Objects that stores an origin’s health, updates it upon receiving a webhook request, and displays a status page to visitors.</p><p><b>Writing our worker</b>You can find the code for this example <a href="https://github.com/georgethomas111/status-page">in this GitHub repository</a>, if you want to clone it and try it out.</p><p>We’ve got our Health Check set up, and we’re ready to write our worker and durable object. To get started, we first need to <a href="https://developers.cloudflare.com/workers/cli-wrangler/install-update">install</a> wrangler, our CLI tool for testing and deploying more complex worker setups.</p>
            <pre><code>$ wrangler -V
wrangler 1.19.8</code></pre>
            <p>The examples in this blog were tested in this wrangler version.</p><p>Then, to speed up writing our worker, we will use a template to generate a project:</p>
            <pre><code>$ wrangler generate status-page [https://github.com/cloudflare/durable-objects-template](https://github.com/cloudflare/durable-objects-template)
$ cd status-page</code></pre>
            <p>The template has a Durable Object with the name <code>Counter</code>. We’ll rename that to <code>Status</code>, as it will store and update the current state of the page.</p><p>For that, we update <code>wrangler.toml</code> to use the correct name and type, and rename the <code>Counter</code> class in <code>index.mjs</code>.</p>
            <pre><code>name = "status-page"
# type = "javascript" is required to use the `[build]` section
type = "javascript"
workers_dev = true
account_id = "&lt;Cloudflare account-id&gt;"
route = ""
zone_id = ""
compatibility_date = "2022-02-11"
 
[build.upload]
# Upload the code directly from the src directory.
dir = "src"
# The "modules" upload format is required for all projects that export a Durable Objects class
format = "modules"
main = "./index.mjs"
 
[durable_objects]
bindings = [{name = "status", class_name = "Status"}]</code></pre>
            <p>Now, we’re ready to fill in our logic. We want to serve two different kinds of requests: one at <code>/webhook</code> that we will pass to the Notification system for updating the status, and another at <code>/</code> for a rendered status page.</p><p>First, let’s write the <code>/webhook</code> logic. We will receive a JSON object with a <code>data</code> and a <code>text</code> field. The `data` object contains the following fields:</p>
            <pre><code>time - The time when the Health Check status changed.
status - The status of the Health Check.
reason - The reason why the Health Check failed.
name - The Health Check name.
expected_codes - The status code the Health Check is expecting.
actual_code - The actual code received from the origin.
health_check_id - The id of the Health Check pushing the webhook notification. </code></pre>
            <p>For the status page we are using the Health Check <code>name</code>, <code>status</code>, and <code>reason</code> (the reason a Health Check became unhealthy, if any) fields. The <code>text</code> field contains a user-friendly version of this data, but it is more complex to parse.</p>
            <pre><code> async handleWebhook(request) {
  const json = await request.json();
 
  // Ignore webhook test notification upon creation
  if ((json.text || "").includes("Hello World!")) return;
 
  let healthCheckName = json.data?.name || "Unknown"
  let details = {
    status: json.data?.status || "Unknown",
    failureReason: json.data?.reason || "Unknown"
  }
  await this.state.storage.put(healthCheckName, details)
 }</code></pre>
            <p>Now that we can store status changes, we can use our state to render a status page:</p>
            <pre><code> async statusHTML() {
  const statuses = await this.state.storage.list()
  let statHTML = ""
 
  for(let[hcName, details] of statuses) {
   const status = details.status || ""
   const failureReason = details.failureReason || ""
   let hc = `&lt;p&gt;HealthCheckName: ${hcName} &lt;/p&gt;
         &lt;p&gt;Status: ${status} &lt;/p&gt;
         &lt;p&gt;FailureReason: ${failureReason}&lt;/p&gt; 
         &lt;br/&gt;`
   statHTML = statHTML + hc
  }
 
  return statHTML
 }
 
 async handleRoot() {
  // Default of healthy for before any notifications have been triggered
  const statuses = await this.statusHTML()
 
  return new Response(`
     &lt;!DOCTYPE html&gt;
     &lt;head&gt;
      &lt;title&gt;Status Page&lt;/title&gt;
      &lt;style&gt;
       body {
        font-family: Courier New;
        padding-left: 10vw;
        padding-right: 10vw;
        padding-top: 5vh;
       }
      &lt;/style&gt;
     &lt;/head&gt;
     &lt;body&gt;
       &lt;h1&gt;Status of Production Servers&lt;/h1&gt;
       &lt;p&gt;${statuses}&lt;/p&gt;
     &lt;/body&gt;
     `,
   {
    headers: {
     'Content-Type': "text/html"
    }
   })
 }</code></pre>
            <p>Then, we can direct requests to our two paths while also returning an error for invalid paths within our durable object with a <code>fetch</code> method:</p>
            <pre><code>async fetch(request) {
  const url = new URL(request.url)
  switch (url.pathname) {
   case "/webhook":
    await this.handleWebhook(request);
    return new Response()
   case "/":
    return await this.handleRoot();
   default:
    return new Response('Path not found', { status: 404 })
  }
 }</code></pre>
            <p>Finally, we can call that <code>fetch</code> method from our worker, allowing the external world to access our durable object.</p>
            <pre><code>export default {
 async fetch(request, env) {
  return await handleRequest(request, env);
 }
}
async function handleRequest(request, env) {
 let id = env.status.idFromName("A");
 let obj = env.status.get(id);
 
 return await obj.fetch(request);
}</code></pre>
            
    <div>
      <h3>Testing and deploying our worker</h3>
      <a href="#testing-and-deploying-our-worker">
        
      </a>
    </div>
    <p>When we’re ready to deploy, it’s as simple as running the following command:</p><p><code>$ wrangler publish --new-class Status</code></p><p>To test the change, we create a webhook pointing to the path the worker was deployed to. On the Cloudflare account dashboard, navigate to Notifications &gt; Destinations, and create a webhook.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7DXxm3RcVgUe1EWhozBBqR/8d1436e9588ce2de2967b150ea8a2f08/image11.png" />
            
            </figure><p><i>Webhook creation page, with the following user input: name of webhook, destination URL, and optional secret is left blank.</i></p><p>Then, while still in the Notifications dashboard, create a Health Check notification tied to the status page webhook and Health Check.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ltPFjk9hURZNEk1DfzXSm/d2432cc32fb4cf5a9c1294a3673a4a38/image4-26.png" />
            
            </figure><p><i>Notification creation page, with the following user input: Notification name and the Webhook created in the previous step added.</i></p><p>Before getting any updates the <code>status-page</code> worker should look like this:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5vSrpTmAC3habEEBTyvuzu/437509c50d8649a232e4cf4e05aff26e/image1-103.png" />
            
            </figure><p><i>Status page without updates reads: “Status of Production Servers”</i></p><p>Webhooks get triggered when the Health Check status changes. To simulate the change of Health Check status we take the origin down, which will send an update to the worker through the webhook. This causes the status page to get updated.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1Bv5XIq7lDRy5KdGMNxs9i/5422ab4e4091c0237c76dc445cd3e823/image8-3.png" />
            
            </figure><p><i>Status page showing the name of the Health Check as "configuration-service", Status as "Unhealthy", and the failure reason as "TCP connection failed".</i> </p><p>Next, we simulate a return to normal by changing the Health Check expected status back to 200. This will make the status page show the origin as healthy.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6lyFS1mDPReF5CPG4ZU6jK/1b07d824de54eebce83879300820ccb0/image7-3.png" />
            
            </figure><p><i>Status page showing the name of the Health Check as "configuration-service", Status as "Healthy", and the failure reason as "No failures".</i> </p><p>If you add more Health Checks and tie them to the webhook durable object, you will see the data being added to your account.</p>
    <div>
      <h3>Authenticating webhook requests</h3>
      <a href="#authenticating-webhook-requests">
        
      </a>
    </div>
    <p>We already have a working status page! However, anyone possessing the webhook URL would be able to forge a request, pushing arbitrary data to an externally-visible dashboard. Obviously, that’s not ideal. Thankfully, webhooks provide the ability to authenticate these requests by supplying a secret. Let’s create a new webhook that will provide a secret on every request. We can generate a secret by generating a pseudo-random UUID with Python:</p>
            <pre><code>$ python3
&gt;&gt;&gt; import uuid
&gt;&gt;&gt; uuid.uuid4()
UUID('4de28cf2-4a1f-4abd-b62e-c8d69569a4d2')</code></pre>
            <p>Now we create a new webhook with the secret.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DvDHuoGw8qliF2bsYP7rZ/38e29d91df8569ded442bd7bd4bb95b8/image3-42.png" />
            
            </figure><p><i>Webhook creation page, with the following user input: name of webhook, destination URL, and now with a secret added.</i></p><p>We also want to provide this secret to our worker. Wrangler has a command that lets us save the secret.</p>
            <pre><code>$ wrangler secret put WEBHOOK_SECRET
Enter the secret text you'd like assigned to the variable WEBHOOK_SECRET on the script named status-page:
4de28cf2-4a1f-4abd-b62e-c8d69569a4d2
? Creating the secret for script name status-page
✨ Success! Uploaded secret WEBHOOK_SECRET.</code></pre>
            <p>Wrangler will prompt us for the secret, then provide it to our worker. Now we can check for the token upon every webhook notification, as the secret is provided by the header <code>cf-webhook-auth</code>. By checking the header’s value against our secret, we can authenticate incoming webhook notifications as genuine. To do that, we modify <code>handleWebhook</code>:</p>
            <pre><code> async handleWebhook(request) {
  // ensure the request we receive is from the Webhook destination we created
  // by examining its secret value, and rejecting it if it's incorrect
  if((request.headers.get('cf-webhook-auth') != this.env.WEBHOOK_SECRET) {
    return
   }
  ...old code here
 }</code></pre>
            <p>This origin health status page is just one example of the versatility of webhooks, which allowed us to leverage Cloudflare Workers and Durable Objects to support a custom Health Checks application. From highly custom use cases such as this to more straightforward, out-of-the-box solutions, pairing webhooks and Health Checks empowers users to respond to critical origin health updates effectively by delivering that information where it will be most impactful.</p>
    <div>
      <h2>Migrating to the Notifications Dashboard</h2>
      <a href="#migrating-to-the-notifications-dashboard">
        
      </a>
    </div>
    <p>The Notifications dashboard is now the centralized location for most Cloudflare services. In the interest of consistency and streamlined administration, we will soon be limiting Health Checks notification setup to the Notifications dashboard.  Many existing Health Checks customers have emails configured via our legacy alerting system. Over the next three months, we will support the legacy system, giving customers time to transition their Health Checks notifications to the Notifications dashboard. Customers can expect the following timeline for the phasing out of existing Health Checks notifications:</p><ul><li><p>For now, customers subscribed to legacy emails will continue to receive them unchanged, so any parsing infrastructure will still work. From within a Health Check, you will see two options for configuring notifications–the legacy format and a deep link to the Notifications dashboard.</p></li><li><p>On <b>May 24, 2022,</b> we will disable the legacy method for the configuration of email notifications from the Health Checks dashboard.</p></li><li><p>On <b>June 28, 2022,</b> we will stop sending legacy emails, and adding new emails at the <code>/healthchecks</code> endpoint will no longer send email notifications.</p></li></ul><p>We strongly encourage all our users to migrate existing Health Checks notifications to the Notifications dashboard within this timeframe to avoid lapses in alerts.</p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Notifications]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">5bgBhuIdy5M2zE86JGhvp7</guid>
            <dc:creator>Darius Jankauskas</dc:creator>
            <dc:creator>Arielle Olache</dc:creator>
            <dc:creator>George Thomas</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare customers on Free plans can now also get real-time DDoS alerts]]></title>
            <link>https://blog.cloudflare.com/free-ddos-alerts/</link>
            <pubDate>Mon, 17 Jan 2022 14:19:26 GMT</pubDate>
            <description><![CDATA[ We’re excited to announce that customers using our Free plan can now get real-time alerts about HTTP DDoS attacks that were automatically detected and mitigated by Cloudflare ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1MHWDeaWPlIkiSparwpkXh/eb5964ca6ba1e55cb7a8ab1d0be008f4/unnamed-13.png" />
            
            </figure><p>We’re excited to announce that customers using our <a href="https://www.cloudflare.com/plans/free/">Free plan</a> can now get real-time alerts about HTTP DDoS attacks that were automatically detected and mitigated by Cloudflare. The real-time DDoS alerts were originally announced over a year ago but were made available to customers on the <a href="https://www.cloudflare.com/plans/">Pro plan or higher</a>. This announcement extends the DDoS alerts feature to Free plan users. You can read the original announcement blog post <a href="/announcing-ddos-alerts/">here</a>.</p>
    <div>
      <h3>What is a DDoS attack?</h3>
      <a href="#what-is-a-ddos-attack">
        
      </a>
    </div>
    <p>A <a href="https://www.cloudflare.com/learning/ddos/what-is-a-ddos-attack/">Distributed Denial of Service (DDoS) attack</a> is a cyber-attack that attempts to disrupt your online business. Whether your business relies on VoIP servers, UDP-based gaming servers, or HTTP servers, DDoS attacks can be used to disrupt any type of Internet property, server, or network.</p><p>eIn this blog post, we’ll focus on DDoS attacks that target HTTP servers. Whether your HTTP server is powering a mobile app, an <a href="https://www.cloudflare.com/ecommerce/">eCommerce website</a>, an API gateway, or any other HTTP application, if an attacker sends you more requests than it can handle, your server won't be able to serve your real users. A flood of requests can cause service disruptions or even take your entire server offline. DDoS attacks can have real-world consequences such as a blow to your <a href="https://www.cloudflare.com/solutions/ecommerce/optimization/">revenue</a> and reputation.</p>
    <div>
      <h3>How Cloudflare detects and mitigates DDoS attacks</h3>
      <a href="#how-cloudflare-detects-and-mitigates-ddos-attacks">
        
      </a>
    </div>
    <p>Protecting your server against DDoS attacks requires two main capabilities:</p><ol><li><p>The bandwidth to absorb both your users’ requests and the attack requests</p></li><li><p>The ability to differentiate between your users’ requests and the attack requests</p></li></ol><p>Using our home-grown systems, we do just that, regardless of the size, frequency and duration of the attacks. All Cloudflare customers, including those using the Free plan, are protected by our <a href="/unmetered-mitigation/">unmetered DDoS mitigation commitment</a>.</p><p>To protect against DDoS attacks, first, we route your traffic to <a href="https://www.cloudflare.com/network/">our network of data centers</a>. Our network spans more than 250 cities in over 100 countries around the world. Its capacity is over 100 Tbps — fifty times larger than <a href="/cloudflare-blocks-an-almost-2-tbps-multi-vector-ddos-attack/">the largest attack we’ve ever seen</a>. Our bandwidth is more than enough to absorb both your users’ traffic and attack traffic.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1GWBF5Jde3aELnbCZHaoml/c5698adc10e6b5cb8fb0f8eefcc23812/image2-18.png" />
            
            </figure><p>Cloudflare's global network</p>
    <div>
      <h3>Cloudflare’s global network</h3>
      <a href="#cloudflares-global-network">
        
      </a>
    </div>
    <p>Second, once your traffic reaches our data centers, it goes through state-of-the-art analysis mechanisms that constantly scan for DDoS attacks. Once an attack is detected, a real-time mitigation rule is automatically generated to surgically mitigate the attack requests based on the attack pattern, whilst leaving your users' requests untouched. Using the <a href="https://developers.cloudflare.com/ddos-protection/managed-rulesets/http">HTTP DDoS Managed Ruleset</a> you can customize the settings of the mitigation system to tailor it to your needs and specific traffic patterns.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6SJYi6oiQXK7M4TNaZlWmf/08929f63d72d3f308d68d06b45d2f493/image1-13.png" />
            
            </figure><p>Not sure what to do? That’s ok. For the most part, you won’t need to do anything and our system will automatically keep your servers protected. You can read more about it in our <a href="https://developers.cloudflare.com/ddos-protection/get-started">Get Started guide</a> or in the original <a href="/http-ddos-managed-rules/">blog post</a>. If you’re interested, you can also read more about how our mitigation system works in this technical blog post: <a href="/deep-dive-cloudflare-autonomous-edge-ddos-protection/">A deep-dive into Cloudflare’s autonomous edge DDoS protection</a></p>
    <div>
      <h3>Configuring a DDoS alert</h3>
      <a href="#configuring-a-ddos-alert">
        
      </a>
    </div>
    <p>Once our system detects and mitigates a DDoS attack, you’ll receive a real-time alert. To receive an alert, make sure you, first, configure a notification policy by following these steps:</p><ol><li><p>Log in to the <a href="https://www.cloudflare.com/login/">Cloudflare dashboard</a> and select your account.</p></li><li><p>In the Home Screen, go to <b>Notifications.</b></p></li><li><p>Click <b>Add</b> and choose the <b>HTTP DDoS Attack Alerter</b>.</p></li><li><p>Give your alert a name, an optional description, add the recipients' email addresses and click <b>Create</b>.</p></li></ol><p>To learn more about DDoS alerts and supported delivery methods, check out our guide <a href="https://support.cloudflare.com/hc/en-us/articles/360053216191-Understanding-Cloudflare-DDoS-alerts">Understanding Cloudflare DDoS Alerts</a>.</p>
    <div>
      <h3>Free DDoS protection, control, and visibility</h3>
      <a href="#free-ddos-protection-control-and-visibility">
        
      </a>
    </div>
    <p>Cloudflare’s mission is to help build a better Internet, and it guides everything we do. As part of this mission, we believe that a better Internet is one where <a href="https://www.cloudflare.com/ddos/">enterprise-grade DDoS protection</a> is available for everyone, not just bigger organizations.</p><p>Furthermore, we’ve also made our <a href="/http-ddos-managed-rules/">DDoS Managed Ruleset</a> available for everyone to make sure that even non-paying customers can tailor and optimize their DDoS protection settings. Taking a step further, we want all of our users to be able to react as fast as possible when needed. This is why we’re providing real-time alerts for free. Knowledge is power, and notifying our users of attacks in real-time empowers them to ensure their website is safe, available, and performant.</p><p>Not using Cloudflare yet? <a href="https://dash.cloudflare.com/sign-up">Start now</a>.</p> ]]></content:encoded>
            <category><![CDATA[DDoS]]></category>
            <category><![CDATA[Notifications]]></category>
            <category><![CDATA[Free]]></category>
            <guid isPermaLink="false">1ZE8yOHaYoIuFT5xUBqCbi</guid>
            <dc:creator>Omer Yoachimik</dc:creator>
        </item>
        <item>
            <title><![CDATA[What’s new with Notifications?]]></title>
            <link>https://blog.cloudflare.com/whats-new-with-notifications/</link>
            <pubDate>Sat, 11 Dec 2021 13:59:18 GMT</pubDate>
            <description><![CDATA[ We know that notifications are incredibly important to our customers. Cloudflare sits in between your Internet property and the rest of the world. When something goes wrong, you want to know right away because it could have a huge impact on your end users. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Sxg57IttTVk04ZLpBTGR4/d36e2d321405131fe7f151590b315117/image1-64.png" />
            
            </figure><p>Back in 2019, we <a href="/new-tools-to-monitor-your-server-and-avoid-downtime/">blogged about our brand new Notification center</a> as a centralized hub for configuring notifications on your account. Since then, we’ve talked a lot about new types of notifications you can set up, but not as much about updates to the notification platform itself. So what’s new with Notifications?</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/20CKBWq8cNuT7F039v4Rp9/fc002415a966f5051c94ed3cf72234f3/image3-31.png" />
            
            </figure>
    <div>
      <h3>Why we care about notifications</h3>
      <a href="#why-we-care-about-notifications">
        
      </a>
    </div>
    <p>We know that notifications are incredibly important to our customers. Cloudflare sits in between your Internet property and the rest of the world. When something goes wrong, you want to know right away because it could have a huge impact on your end users. However, you don’t want to have to sit on the Cloudflare Dashboard all day, pressing refresh on analytics pages over and over just to make sure that you don’t miss anything important. This is where Notifications come in. Instead of requiring you to actively monitor your Internet properties, you want Cloudflare to be able to directly inform you when something might be going wrong.</p><p>Cloudflare has many different notification types to ensure that you don’t miss anything important. We have notifications to inform you that <a href="/announcing-ddos-alerts/">you’ve been DDoS’d</a>, or that <a href="/get-notified-when-your-site-is-under-attack/">the Firewall is blocking more requests than normal</a>, or that <a href="/smarter-origin-service-level-monitoring/">your origin is seeing high levels of 5xx errors</a>, or even that <a href="/introducing-workers-usage-notifications/">your Workers script’s CPU usage is above average</a>. We’re constantly adding new notifications, so make sure to check our <a href="https://developers.cloudflare.com/fundamentals/notifications/notification-available">Cloudflare Development Docs</a> to see what’s new!</p>
    <div>
      <h3>Emails are out, webhooks are in</h3>
      <a href="#emails-are-out-webhooks-are-in">
        
      </a>
    </div>
    <p>So we have all of these super great notifications, but <i>how</i> do we actually inform you of an event? The classic answer is “we email you.” All of our customers have the ability to configure notifications to send to the email addresses of their choosing.</p><p>However, email isn’t always the optimal choice. What happens when an email gets sent to spam, or filtered out into another folder that you rarely check? What if you’re a person who never cleans out their inbox and has four thousand unread emails that can drown out new important emails that come in? You want a way for notifications to go directly to the messaging platform that you check the most, whether that’s Slack or Microsoft Teams or Discord or something else entirely. For customers on our Professional, Business, and Enterprise plans, this is where webhooks come in.</p><p>Webhooks are incredibly powerful! They’re a type of API with a simple, standardized behavior. They allow one service (Cloudflare) to send events directly to another service. This destination service can be nearly anything: messaging platforms, data management systems, workflow automation systems, or even your own internal APIs.</p><p>While Cloudflare has had first class support for webhooking into Slack, Microsoft Teams, Google Chat, and customer’s own APIs for a while, we’ve recently added support for DataDog, Discord, OpsGenie, and Splunk as well. You can read about how to set up each of those types of webhooks in our <a href="https://developers.cloudflare.com/fundamentals/notifications/configure-webhooks">Cloudflare Development Docs</a>.</p><p>Because webhooks are so versatile, more and more customers are using them! The number of webhooks configured within Cloudflare’s notification system doubles, on average, every three months. Customers can configure webhooks in the Notifications tab in the dashboard.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4IK1GmOJoBLbBekVr4q2N3/15a7598ca9cced6394158b4cf5e1d6ad/image2-47.png" />
            
            </figure>
    <div>
      <h3>Those who forget history are doomed to repeat it</h3>
      <a href="#those-who-forget-history-are-doomed-to-repeat-it">
        
      </a>
    </div>
    <p>Webhooks are cool, but they still leave room for error. What happens when you receive a notification but accidentally delete it? Or when someone new starts at your company, but you forget to update the notification settings to send to the new employee?</p><p>Before now, Cloudflare notifications were entirely point in time. We sent you a notification via your preferred method, and we no longer had any visibility into that notification. If that notification gets lost on your end, we don’t have any way to help recover the information it contained.</p><p>Notification history fixes that exact issue. Users are able to see a log of the notifications that were sent, when they were sent, and who they were sent to. Customers on Free, Professional, or Business plans are able to see notification history for the past 30 days. Customers on Enterprise plans are able to see notification history for the past 90 days.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5LqewbFwuPn6q8uhizFiXU/a70a18b548a09ac6720cead1de36bb11/image4-27.png" />
            
            </figure><p>Right now, notification history is only <a href="https://api.cloudflare.com/#notification-history-properties">available via API</a>, but stay tuned for updates about viewing directly in the Cloudflare Dashboard!</p> ]]></content:encoded>
            <category><![CDATA[CIO Week]]></category>
            <category><![CDATA[Notifications]]></category>
            <category><![CDATA[Email]]></category>
            <guid isPermaLink="false">1z30mcJRU8FhUxPza6TpLe</guid>
            <dc:creator>Natasha Wissmann</dc:creator>
        </item>
        <item>
            <title><![CDATA[Get notified when your site is under attack]]></title>
            <link>https://blog.cloudflare.com/get-notified-when-your-site-is-under-attack/</link>
            <pubDate>Fri, 03 Dec 2021 13:59:21 GMT</pubDate>
            <description><![CDATA[ Cloudflare can now send proactive notifications about any application security event spike, so you are warned whenever an attack might be targeting your application. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Our core application security features such as the <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">WAF</a>, firewall rules and rate limiting help keep millions of Internet properties safe. They all do so quietly without generating any notifications when attack traffic is blocked, as our focus has always been to stop malicious requests first and foremost.</p><p>Today, we are happy to announce a big step in that direction. Business and Enterprise customers can now set up proactive alerts whenever we observe a spike in firewall related events indicating a likely ongoing attack.</p><p>Alerts can be configured via email, PagerDuty or webhooks, allowing for flexible integrations across many systems.</p><p>You can find and set up the new alert types <a href="https://developers.cloudflare.com/fundamentals/notifications">under the notifications tab in your Cloudflare account</a>.</p>
    <div>
      <h2>What Notifications are available?</h2>
      <a href="#what-notifications-are-available">
        
      </a>
    </div>
    <p>Two new notification types have been added to the platform.</p>
    <div>
      <h3>Security Events Alert</h3>
      <a href="#security-events-alert">
        
      </a>
    </div>
    <p>This notification can be set up on Business and Enterprise zones, and will alert on any spike of firewall related events across all products and services. You will receive the alert within two hours of the attack being mitigated.</p>
    <div>
      <h3>Advanced Security Events Alert</h3>
      <a href="#advanced-security-events-alert">
        
      </a>
    </div>
    <p>This notification can be set up on Enterprise zones only. It allows you to filter on the exact security service you are interested in monitoring and different notifications can be set up for different services as necessary. The alert will fire within five minutes of the attack being mitigated.</p>
    <div>
      <h2>Alerting on Application Security Anomalies</h2>
      <a href="#alerting-on-application-security-anomalies">
        
      </a>
    </div>
    <p>We’ve <a href="/smarter-origin-service-level-monitoring/">previously blogged</a> about how accurately calculating anomalies in time series data sets is hard. Simple threshold alerting — “notify me if there are more than X events” — doesn’t work well. It takes a lot of work to tune the specific thresholds to be accurate, and even then you’re still likely to end up with false positives or missed events.</p><p>For Origin Error Rate notifications, we leaned on the methodology outlined in the <a href="https://sre.google/workbook/alerting-on-slos/">Google SRE Handbook</a> for alerting based on Service Level Objectives (SLOs). However, SLO alerting assumes that there is an established baseline. We know exactly what percentage of responses from your origin are “allowed” to be errors before something is definitely wrong. We don’t know what that percentage is for Firewall events. For example, Internet properties with many Firewall rules are more likely to have more Firewall events than Internet properties with few Firewall rules.</p><p>Instead of using SLO based alerting for Security Event notifications, we’re using <a href="https://en.wikipedia.org/wiki/Standard_score">Z-score calculations</a>. The z-score methodology calculates how many standard deviations away from the mean a certain data point is. For Security Event notifications we can take the mean number of Firewall events for each distinct Internet property as the effective “baseline”, and compare the current number of Firewall events to see if there is a significant spike.</p><p>In this first iteration, a z-score threshold of 3.5 has been configured in the system and will be adjusted based on customer feedback. You can read more about the system in our <a href="https://developers.cloudflare.com/waf/alerts">WAF developer docs</a>.</p>
    <div>
      <h2>Getting started with Application Security Event notifications</h2>
      <a href="#getting-started-with-application-security-event-notifications">
        
      </a>
    </div>
    <p>To configure these notifications, navigate to the Notifications tab of the dashboard and click “Add”. Select <b>Security Events Alert</b> or <b>Advanced Security Events Alert.</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2RdUuk0JL1EebBfHRRwxBZ/3e8e40d3409c5040eb5d31c7e263aa3e/image4-1.png" />
            
            </figure><p>As with all Cloudflare notifications, you’re able to name and describe your notification, and choose how you want to be notified. From there, you can select which domains you want to monitor.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/WJEHsoYxwlOQdxseJ1iFW/626f9432c5fa9d8b1a4207b11c992d07/image1-8.png" />
            
            </figure><p>For Advanced Security Event notifications, you can also select which services the notification should monitor. The log value in <a href="https://developers.cloudflare.com/logs/reference/log-fields/zone/firewall_events">Firewall Event logs</a> for each relevant service is also displayed in the event you are integrating directly with Cloudflare logs and wish to filter relevant events in your existing SIEMs.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3usixXOJnfPWbcm9nbkrIk/ddba546ccf5b64b9d0d67553d787038c/image3.png" />
            
            </figure><p>Once the notifications have been set up, you can rely on Cloudflare to warn you whenever an anomaly is detected. An example email notification is shown below:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6FxFDHYOH8MZS9jOxcZcBq/9993510099f8f67a2ed6ea9a83d2107c/image5.png" />
            
            </figure><p>The alert provides details on the service detecting the events (in this case the WAF), the timestamp and the affected zone. A link is provided that will direct you to the Firewall Events dashboard filtered on the correct service and time range.</p>
    <div>
      <h2>The first of many alerts!</h2>
      <a href="#the-first-of-many-alerts">
        
      </a>
    </div>
    <p>We are looking forward to customers setting up their notifications, so they can stay on top of any malicious activity affecting their applications.</p><p>This is just the first step of many towards building a much more comprehensive suite of notifications and incident management systems directly embedded in the Cloudflare dashboard. We look forward to posting feature improvements to our application security alert system in the near future.</p> ]]></content:encoded>
            <category><![CDATA[WAF Rules]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Notifications]]></category>
            <guid isPermaLink="false">7EWowD9MzHYrt8KvKzLEn7</guid>
            <dc:creator>Michael Tremante</dc:creator>
            <dc:creator>Natasha Wissmann</dc:creator>
        </item>
        <item>
            <title><![CDATA[Smart(er) Origin Service Level Monitoring]]></title>
            <link>https://blog.cloudflare.com/smarter-origin-service-level-monitoring/</link>
            <pubDate>Thu, 08 Jul 2021 12:59:19 GMT</pubDate>
            <description><![CDATA[ Today we’re excited to announce Origin Error Rate notifications: a new, sophisticated way to detect and notify you when Cloudflare sees elevated levels of 5xx errors from your origin. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/49NSNbVLKyTHBtfUjU40tK/5139746eb239c89a907604999fcc2081/image10.png" />
            
            </figure><p>Today we’re excited to announce Origin Error Rate notifications: a new, sophisticated way to detect and notify you when Cloudflare sees elevated levels of 5xx errors from your origin.</p><p>In 2019, we announced <a href="/new-tools-to-monitor-your-server-and-avoid-downtime/">Passive Origin Monitoring alerts</a> to notify you when your origin goes down. Passive Origin Monitoring is great — it tells you if every request to your origin is returning a 521 error (web server down) for a full five minutes. But sometimes that’s not enough. You don’t want to wait for <i>all</i> of your users to have issues; you want to be notified when <i>more users than normal</i> are having issues before it becomes a big problem.</p>
    <div>
      <h3>Calculating Anomalies</h3>
      <a href="#calculating-anomalies">
        
      </a>
    </div>
    <p>No service is perfect — we know that a very small percentage of your origin responses are likely to be 5xx errors. Most of the time, these issues are one-offs and nothing actually needs to be done. However, for Internet properties with very high traffic, even a very small percentage could potentially be a large number. If we alerted you for every one of these errors, you would never stop getting useless notifications. When it comes to notifying, the question isn’t whether there are <i>any</i> errors, but <i>how many</i> errors need to exist before it’s a problem.</p><p>So how do we actually tell if something is a problem? As humans, it’s relatively easy for us to look at a graph, identify a spike, and think “hmm, that’s not supposed to be there.” For a computer it gets a little more complicated. Unlike humans, who have intuition and can exercise judgement in grey areas, a computer needs an exact set of criteria to tell whether something is out of the ordinary.</p><p>The simplest way to detect abnormalities in a time series dataset is to set a single threshold — for example, “notify me whenever more than 5% of the requests to my Internet properties result in errors.” Unfortunately, it’s really hard to pick an effective threshold. Too high and you never actually get notified; too low, and you’re drowning in notifications:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ShPGzlgkyWnQQQFMJnpe2/a42a00a2e2d65c9d1dc72d104e0b8e4e/image5-2.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/74X7tzqt2EUnsPmaoYrkC0/df02ebf6bec8266c2eb0616c2a94348b/image6-2.png" />
            
            </figure><p>Even when we find that happy medium, we can still miss issues that burn “low and slow”. This is where there’s no obvious, dramatic spike, but something has been going a little wrong for a long time:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ACE4r6XiZowbgWiHExatx/e4b86134dd8e82c78b0f9dd6c9ad2e97/image8.png" />
            
            </figure><p>We can try layering on multiple thresholds. For example: notify you if the error rate is ever over 10%, <b>or</b> if it’s over 5% for more than five minutes, <b>or</b> if it’s over 2% for more than 10 minutes. Not only does this quickly become complicated, but it also doesn’t account for periodic issues, such as kubernetes pods restarting or deployments going out at a regular interval. What if the error rate is over 5% for only four minutes, but it happens every five minutes? We know that a lot of your end users are being affected, but even the long set of rules listed above wouldn’t catch it.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4YCFFMiETN3Ed9Wg3Nnu7r/b94d79cbe4d3db665377d86bc1fd6c0b/image1-4.png" />
            
            </figure><p>So thresholds probably aren’t sophisticated enough to detect origin issues. Instead, we turn to the <a href="https://sre.google/workbook/alerting-on-slos/">Google SRE Handbook</a> for alerting based on Service Level Objectives (SLOs). An SLO is a part of an agreement between a customer and a service provider. It’s a defined metric and value that both parties agree on. One of the most common types of SLOs is availability, or “the service will be available for a certain percentage of the time”. In this case, the service is your origin and the agreement is between you and your end users. Your end users expect your origin to be available a certain percent of the time.</p><p>If we revisit our original concept, we know that you’re comfortable with your origin returning a certain number of errors. We define that number as your SLO. An SLO of 99.9 means that you’re OK with 0.01% of all of your requests over a month being errors. Therefore, 0.01% of all the requests that reach your origin is your total error budget — you can have this many errors in a month and never be notified, because you’ve defined that as acceptable.</p><p>What you really want to know is when you’re burning through that error budget too quickly — this probably means that something is actually going wrong (instead of a one-time occurrence). We can measure a burn rate to gauge how quickly you’re burning through your error budget, given the rate of errors that we’re currently seeing. A burn rate of one means that the entirety of the error budget will be used up exactly within the set time period — an ideal scenario. A burn rate of zero is even better since we’re not seeing any errors at all, but ultimately is pretty unrealistic. A burn rate of 10 is most likely a problem — if that rate keeps up for the full month, you’ll have had 10x the number of errors than you originally said was acceptable.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/X82KrLewyzlgRdirVRuiD/93fa48b97c57f33c482d69bae74bed4f/image2-1.png" />
            
            </figure><p>Even when using burn rates instead of thresholds, we still want to have multiple criteria. We want to measure a short time period with a high burn rate (a short indicator). This covers your need to “alert me quickly when something dramatic is happening.” But we also want to have a longer time period with a lower burn rate (a long indicator), in order to cover your need to “don’t alert me on issues that are over quickly.” This way we can ensure that we alert quickly without sending too many false positives.</p><p>Let’s take a look at the life of an incident using this methodology. In our first measurement, the short indicator tells us it looks like something is starting to go wrong. However, the long indicator is still within reasonable bounds. We’re not going to sound the alarm yet.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1ZfXwFdIg3Xnxgwherit2g/cc307ebf528bca4574e5c50b5ee73f32/image4-1.png" />
            
            </figure><p>When we measure next, we see that the problem is worse. Now we’re at the point where there are enough errors that not only is the short indicator telling us there’s something wrong, but the long indicator has been impacted too. We feel confident that there’s a problem, and it’s time to notify you.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6F1J2XiFoLzHYAePUpyynH/89f61ce38fc3a50b5e433a8f8d6f66af/image7.png" />
            
            </figure><p>A couple cycles later, the incident is over. The long indicator is still telling us that something is wrong, because the incident is still within the long time period. However, the short indicator shows that nothing is currently concerning. Since we don’t have both indicators telling us that something is wrong, we won’t notify you. This keeps us from sending notifications for incidents that are already over.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5z5B3oZ46km4yzhMiZXqdp/158c00fbaaf5068d4e431d98e93b9adc/image3-1.png" />
            
            </figure><p>This methodology is cool because of how well it responds to different incidents. If the original spike had been more dramatic, it would have triggered both the long and short indicators immediately. The more errors we’re seeing, the more confident we are that there’s an issue and the sooner we can notify you.</p><p>Even with this methodology, we know that different services behave differently. So for this notification, you can choose the Service Level Objective (SLO) you want to use to monitor your Internet property: 99.9% (high sensitivity), 99.8% (medium sensitivity), or 99.7% (low sensitivity). You can also choose which Internet properties you want to monitor — no need to be notified for test properties or lower priority domains.</p>
    <div>
      <h3>Getting started today</h3>
      <a href="#getting-started-today">
        
      </a>
    </div>
    <p>HTTP Origin Error Rate notifications can be configured in the Notifications tab of the dashboard. Select <b>Origin Error Rate Alert</b> as your alert type. As with all Cloudflare notifications, you’re able to name and describe your notification, and choose how you want to be notified. From there, you can select which domains you want to monitor, and at what SLO.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/XIuKjsl3jwbOkUF5CLfpq/eb632a2406a2cf2301a7ba95fc108a37/image9.gif" />
            
            </figure><p>This notification is available to all Enterprise customers. If you’re interested in monitoring your origin, we encourage you to give it a try.</p><p>Our team is hiring in <a href="https://boards.greenhouse.io/cloudflare/jobs/3129759?gh_jid=3129759">Austin</a>, <a href="https://boards.greenhouse.io/cloudflare/jobs/3231716?gh_jid=3231716">Lisbon</a> and <a href="https://boards.greenhouse.io/cloudflare/jobs/3231718?gh_jid=3231718">London</a>.</p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Notifications]]></category>
            <guid isPermaLink="false">3iBKhuAdX6wJvtSc4fiAPl</guid>
            <dc:creator>Natasha Wissmann</dc:creator>
        </item>
    </channel>
</rss>