
<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>Mon, 13 Apr 2026 15:02:26 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Logpush: now lower cost and with more visibility]]></title>
            <link>https://blog.cloudflare.com/logpush-filters-alerts/</link>
            <pubDate>Thu, 22 Sep 2022 13:30:00 GMT</pubDate>
            <description><![CDATA[ Logpush jobs can now be filtered to contain only logs of interest. Also, you can receive alerts when jobs are failing, as well as get statistics on the health of your jobs ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Logs are a critical part of every successful application. Cloudflare products and services around the world generate massive amounts of logs upon which customers of all sizes depend. Structured logging from our products are used by customers for purposes including analytics, debugging performance issues, <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">monitoring application health</a>, maintaining security standards for compliance reasons, and much more.</p><p>Logpush is Cloudflare’s product for pushing these critical logs to customer systems for consumption and analysis. Whenever our products generate logs as a result of traffic or data passing through our systems from anywhere in the world, we buffer these logs and push them directly to customer-defined destinations like <a href="https://www.cloudflare.com/products/r2/">Cloudflare R2</a>, Splunk, AWS S3, and many more.</p><p>Today we are announcing three new key features related to Cloudflare’s <a href="https://developers.cloudflare.com/logs/about/">Logpush</a> product. First, the ability to have only logs matching certain criteria be sent. Second, the ability to get alerted when logs are failing to be pushed due to customer destinations having issues or network issues occurring between Cloudflare and the customer destination. In addition, customers will also be able to query for analytics around the health of Logpush jobs like how many bytes and records were pushed, number of successful pushes, and number of failing pushes.</p>
    <div>
      <h3>Filtering logs before they are pushed</h3>
      <a href="#filtering-logs-before-they-are-pushed">
        
      </a>
    </div>
    <p>Because logs are both critical and generated with high volume, many customers have to maintain complex infrastructure just to ingest and store logs, as well as deal with ever-increasing related costs. On a typical day, a real, example customer receives about 21 billion records, or 2.1 terabytes (about 24.9 TB uncompressed) of gzip compressed logs. Over the course of a month, that could easily be hundreds of billions of events and hundreds of terabytes of data.</p><p>It is often unnecessary to store and analyze all of this data, and customers could get by with specific subsets of the data matching certain criteria. For example, a customer might want just the set of HTTP data that had status code &gt;= 400, or the set of firewall data where the action taken was to block the user.We can now achieve this in our Logpush jobs by setting specific filters on the fields of the log messages themselves. You can use either our <a href="https://developers.cloudflare.com/logs/reference/filters/">API</a> or the Cloudflare dashboard to set up filters.</p><p>To do this in the dashboard, either create a new Logpush job or modify an existing job. You will see the option to set certain filters. For example, an ecommerce customer might want to receive logs only for the checkout page where the bot score was non-zero:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/AA0ciHtY8MWoYGyHOKMnQ/bc24585b7d80216f039b8fea1d003086/image2-30.png" />
            
            </figure>
    <div>
      <h3>Logpush job alerting</h3>
      <a href="#logpush-job-alerting">
        
      </a>
    </div>
    <p>When logs are a critical part of your infrastructure, you want peace of mind that logging infrastructure is healthy. With that in mind, we are announcing the ability to get notified when your Logpush jobs have been retrying to push and failing for 24 hours.</p><p>To set up alerts in the Cloudflare dashboard:</p><p>1. First, navigate to “Notifications” in the left-panel of the account view</p><p>2. Next, Click the “add” button</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/JLWRGmLeEDAsWSgD6QNGY/8226b630dcee4b2963a8a1447ebfccb5/image3-22.png" />
            
            </figure><p>3. Select the alert “Failing Logpush Job Disabled”</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7xw94OPKQCGuN9GwOUnanf/bf6179316ec0ed87075debd816777b93/image1-35.png" />
            
            </figure><p>4. Configure the alert and click Save.</p><p>That’s it — you will receive an email alert if your Logpush job is disabled.</p>
    <div>
      <h3>Logpush Job Health API</h3>
      <a href="#logpush-job-health-api">
        
      </a>
    </div>
    <p>We have also added the ability to query for stats related to the health of your Logpush jobs to our graphql API. Customers can now use our GraphQL API to query for things like the number of bytes pushed, number of compressed bytes pushed, number of records pushed, the status of each push, and much more. Using these stats, customers can have greater visibility into a core part of infrastructure. The GraphQL API is self documenting so full details about the new <code>logpushHealthAdaptiveGroups</code> node can be found using any GraphQL client, but head to <a href="https://developers.cloudflare.com/analytics/graphql-api/">GraphQL docs</a> for more information.</p><p>Below are a couple example queries of how you can use the GraphQL to find stats related to your Logpush jobs.</p><p>Query for number of pushes to S3 that resulted in status code != 200</p>
            <pre><code>query
{
  viewer
  {
    zones(filter: { zoneTag: $zoneTag})
    {
      logpushHealthAdaptiveGroups(filter: {
        datetime_gt:"2022-08-15T00:00:00Z",
        destinationType:"s3",
        status_neq:200
      }, 
      limit:10)
      {
        count,
        dimensions {
          jobId,
          status,
          destinationType
        }
      }
    }
  }
}</code></pre>
            <p>Getting the number of bytes, compressed bytes and records that were pushed</p>
            <pre><code>query
{
  viewer
  {
    zones(filter: { zoneTag: $zoneTag})
    {
      logpushHealthAdaptiveGroups(filter: {
        datetime_gt:"2022-08-15T00:00:00Z",
        destinationType:"s3",
        status:200
      }, 
      limit:10)
      {
        sum {
          bytes,
          bytesCompressed,
          records
        }
      }
    }
  }
}</code></pre>
            
    <div>
      <h3>Summary</h3>
      <a href="#summary">
        
      </a>
    </div>
    <p>Logpush is a robust and flexible platform for customers who need to integrate their own logging and monitoring systems with Cloudflare. Different Logpush jobs can be deployed to support multiple destinations or, with filtering, multiple subsets of logs.</p><p>Customers who haven't created Logpush jobs are encouraged to do so. Try pushing your logs to R2 for safe-<a href="/store-and-retrieve-logs-on-r2/">keeping</a>! For customers who don't currently have access to this powerful tool, consider upgrading your plan.</p> ]]></content:encoded>
            <category><![CDATA[GA Week]]></category>
            <category><![CDATA[General Availability]]></category>
            <category><![CDATA[Logs]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">5Wf012tJlAxide9kVaxpDX</guid>
            <dc:creator>Duc Nguyen</dc:creator>
        </item>
        <item>
            <title><![CDATA[Store and retrieve your logs on R2]]></title>
            <link>https://blog.cloudflare.com/store-and-retrieve-logs-on-r2/</link>
            <pubDate>Wed, 21 Sep 2022 14:15:00 GMT</pubDate>
            <description><![CDATA[ Log Storage on R2: a cost-effective solution to store event logs for any of our products ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Following today’s announcement of General Availability of Cloudflare R2 <a href="https://www.cloudflare.com/learning/cloud/what-is-object-storage/">object storage</a>, we’re excited to announce that customers can also store and retrieve their logs on R2.</p><p>Cloudflare’s Logging and Analytics products provide vital insights into customers’ applications. Though we have a breadth of capabilities, logs in particular play a pivotal role in understanding what occurs at a granular level; we produce detailed logs containing metadata generated by Cloudflare products via events flowing through our network, and they are depended upon to illustrate or investigate anything (and everything) from the general performance or health of applications to closely examining security incidents.</p><p>Until today, we have only provided customers with the ability to export logs to 3rd-party destinations - to both store and perform analysis. However, with Log Storage on R2 we are able to offer customers a cost-effective solution to store event logs for any of our products.</p>
    <div>
      <h3>The cost conundrum</h3>
      <a href="#the-cost-conundrum">
        
      </a>
    </div>
    <p>We’ve <a href="/logs-r2/">unpacked the commercial impact in a previous blog post,</a> but to recap, the <a href="https://r2-calculator.cloudflare.com/">cost of storage can vary broadly</a> depending on the volume of requests Internet properties receive. On top of that - and specifically pertaining to logs - there’s usually more expensive fees to access that data whenever the need arises. This can be incredibly problematic, especially when customers are having to balance their budget with the need to access their logs - whether it's to mitigate a potential catastrophe or just out of curiosity.</p><p>With R2, not only do we not charge customers <a href="https://developers.cloudflare.com/r2/platform/pricing/">egress costs</a>, but we also provide the opportunity to make further operational savings by centralizing storage and retrieval. Though, most of all, we just want to make it easy and convenient for customers to access their logs via our Retrieval API - all you need to do is provide a time range!</p>
    <div>
      <h3>Logs on R2: get started!</h3>
      <a href="#logs-on-r2-get-started">
        
      </a>
    </div>
    <p>Why would you want to store your logs on <a href="www.cloudflare.com/developer-platform/r2/">Cloudflare R2</a>? First, R2 is S3 API compatible, so your existing tooling will continue to work as is. Second, not only is R2 cost-effective for storage, we also do not charge any egress fees if you want to get your logs out of Cloudflare to be ingested into your own systems. You can store logs for any Cloudflare product, and you can also store what you need for as long as you need; retention is completely within your control.</p>
    <div>
      <h3>Storing Logs on R2</h3>
      <a href="#storing-logs-on-r2">
        
      </a>
    </div>
    <p>To create Logpush jobs pushing to R2, you can use either the dashboard or Cloudflare API. Using the dashboard, you can create a job and select R2 as the destination during configuration:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4LxlofboVHwn12lpAJ3iok/d8a69475331cf09feae68d1523b5dd76/image2-26.png" />
            
            </figure><p>To use the Cloudflare API to create the job, do something like:</p>
            <pre><code>curl -s -X POST 'https://api.cloudflare.com/client/v4/zones/&lt;ZONE_ID&gt;/logpush/jobs' \
-H "X-Auth-Email: &lt;EMAIL&gt;" \
-H "X-Auth-Key: &lt;API_KEY&gt;" \
-d '{
 "name":"&lt;DOMAIN_NAME&gt;",
"destination_conf":"r2://&lt;BUCKET_PATH&gt;/{DATE}?account-id=&lt;ACCOUNT_ID&gt;&amp;access-key-id=&lt;R2_ACCESS_KEY_ID&gt;&amp;secret-access-key=&lt;R2_SECRET_ACCESS_KEY&gt;",
 "dataset": "http_requests",
"logpull_options":"fields=ClientIP,ClientRequestHost,ClientRequestMethod,ClientRequestURI,EdgeEndTimestamp,EdgeResponseBytes,EdgeResponseStatus,EdgeStartTimestamp,RayID&amp;timestamps=rfc3339",
 "kind":"edge"
}' | jq .</code></pre>
            <p>Please see <a href="https://developers.cloudflare.com/logs/get-started/enable-destinations/r2/">Logpush over R2</a> docs for more information.</p>
    <div>
      <h3>Log Retrieval on R2</h3>
      <a href="#log-retrieval-on-r2">
        
      </a>
    </div>
    <p>If you have your logs pushed to R2, you could use the Cloudflare API to retrieve logs in specific time ranges like the following:</p>
            <pre><code>curl -s -g -X GET 'https://api.cloudflare.com/client/v4/accounts/&lt;ACCOUNT_ID&gt;/logs/retrieve?start=2022-09-25T16:00:00Z&amp;end=2022-09-25T16:05:00Z&amp;bucket=&lt;YOUR_BUCKET&gt;&amp;prefix=&lt;YOUR_FILE_PREFIX&gt;/{DATE}' \
-H "X-Auth-Email: &lt;EMAIL&gt;" \
-H "X-Auth-Key: &lt;API_KEY&gt;" \ 
-H "R2-Access-Key-Id: R2_ACCESS_KEY_ID" \
-H "R2-Secret-Access-Key: R2_SECRET_ACCESS_KEY" | jq .</code></pre>
            <p>See <a href="https://developers.cloudflare.com/logs/r2-log-retrieval/">Log Retrieval API</a> for more details.</p><p>Now that you have critical logging infrastructure on Cloudflare, you probably want to be able to monitor the health of these Logpush jobs as well as get relevant alerts when something needs your attention.</p>
    <div>
      <h3>Looking forward</h3>
      <a href="#looking-forward">
        
      </a>
    </div>
    <p>While we have a vision to build out log analysis and forensics capabilities on top of R2 - and a roadmap to get us there - we’d still love to hear your thoughts on any improvements we can make, particularly to our retrieval options.</p><p>Get setup on <a href="https://www.cloudflare.com/products/r2/">R2</a> to start <a href="https://developers.cloudflare.com/logs/get-started/enable-destinations/r2/">pushing logs</a> today! If your current plan doesn’t include Logpush, storing logs on R2 is another great reason to upgrade!</p> ]]></content:encoded>
            <category><![CDATA[GA Week]]></category>
            <category><![CDATA[General Availability]]></category>
            <category><![CDATA[Logs]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Storage]]></category>
            <guid isPermaLink="false">1jAMjJ9M01pYKP2KUM2EVn</guid>
            <dc:creator>Shelley Jones</dc:creator>
            <dc:creator>Duc Nguyen</dc:creator>
        </item>
    </channel>
</rss>