Log streaming: Scalyr

      Last updated October 01, 2020

    Fastly's Real-Time Log Streaming feature can send log files to Scalyr. Scalyr pulls all your server logs and metrics into a centralized, searchable system in real time.


    If you don't already have a Scalyr account, you'll need to register for one. Follow the signup instructions on the Scalyr website.

    Once you've signed up, navigate to the API Keys area in the Settings on your Scalyr dashboard and make note of your Scalyr Write Token. Scaylr uses this to associate data you send them with your account. You'll need this token when you set up your endpoint with Fastly.

    If you're adding the Scalyr endpoint via the command line, instead of the web interface, you should also have your Fastly API token and the service ID and version number of the Fastly service for which you'll be enabling Scalyr logging.

    Adding Scalyr as a logging endpoint

    Follow these instructions to add Scalyr as a logging endpoint:

    1. Review the information in our Setting Up Remote Log Streaming guide.
    2. Click the Scalyr Create endpoint button. The Create a Scalyr endpoint page appears.

      New Scalyr Endpoint page

    3. Fill out the Create a Scalyr endpoint fields as follows:
      • In the Name field, enter a human-readable name for the endpoint.
      • In the Log format field, optionally enter an Apache-style string or VCL variables to use for log formatting. The Apache Common Log format string appears in this field by default. Our discussion of format strings provides more information.
      • In the Logfile field, optionally specify the log file name under which your logs will appear on Scalyr's Overview page. Defaults to logplex.
      • In the Token field, type the Scalyr Write Token provided in the Scalyr dashboard.
      • From the Region menu, select the region to stream logs to.
    4. Click the Advanced options link of the Create a Scalyr endpoint page. The Advanced options appear.

      the advanced options on the create a new Scalyr endpoint page

    5. In the Placement area, select where the logging call should be placed in the generated VCL. Valid values are Format Version Default, None, and waf_debug (waf_debug_log). Selecting None creates a logging object that can only be used in custom VCL. See our guide on WAF logging for more information about waf_debug_log.
    6. Click the Create button to create the new logging endpoint.
    7. Click the Activate button to deploy your configuration changes.
    Back to Top