Enable the DataStream behavior

To start collecting logs for properties in a stream, you need to enable the DataStream behavior in each property that is part of any stream. You can't receive logs from properties with this behavior disabled even if they're part of active streams.

You can configure multiple streams for the same Akamai property, and use all of them to gather and send data at the same time, or use other streams as backup in case of upload failure to prevent data loss.

For streams linked to properties that belongs to a Cloud Wrapper product (e. g. Ion Premier), you can skip this procedure, but you need to enable DataStream (ID: 6105) in the MultiCDN section of Cloud Wrapper and reach out to your Akamai account team to enable the data sets you want to monitor.

When enabling the DataStream behavior, you can configure it to:

  • Collect logs from the stream that monitors a property of your choice.

  • Specify the sample of data for this property that the stream collects and sends to your destination.

  • Enable logging midgress traffic data within the ​Akamai​ platform, such as between two edge servers.

Apart from enabling the behavior in the default rule to apply it to all requests, you can enable it in a custom rule to capture data for specific hostnames, paths, status codes, and other requests matching your criteria. See Rules and Matches in Property Manager.

If you chose more than one property for a stream, you need to enable the DataStream behavior in each of them.

Multiple streams support

In Property Manager, you can configure multiple streams for the same Akamai property, and use all of them to gather and send data at the same time, or use other streams as backup in case of upload failure to prevent data loss. Choose up to 3 active streams in the DataStream behavior to send logs (for example, to different destinations, with different data sets, or as backup) at once.

Optionally, use the streams created for your property in combinations of rules, matches, and conditions. You can also add multiple instances of the DataStream behavior to your property configuration, but in each instance of the behavior you can choose only from the same streams you created (a maximum of 3 streams per property). See Rules and Matches in Property Manager for details on how to leverage rule logic.

If you want to send data in multiple streams, and you have multiple instances of the DataStream behavior in your configuration's rule tree, make sure you add all these streams in every instance of this behavior for your property. Incoming requests can hit only one instance of the DataStream behavior at once, and if that instance is missing the streams in question, they will not send data. For details, see Property Configuration logic in the Property Manager guide.

Example:

You chose the Stream1 stream as the default stream, and Stream2 and Stream3 as secondary streams with different destinations. Choose Stream1, Stream2, and Stream3 for each instance of the DataStream behavior in your property configuration to send logs to all of them. When you choose Stream1 in one behavior, and Stream2 with Stream3 in another behavior in the rule tree, Stream1 may not send data if the request hits the other behavior.

Before you begin

Check if DataStream has been added to your contract, and that a content provider (CP) code is available for use with DataStream. For assistance, contact your account representative.

If you want to enable DataStream through the Property Manager API make sure that you have set at least the READ access level to the API service called Datastream. The API client should have the Datastream Config API permission set.

🚧

On April 4, 2023, the logStreamName parameter in the JSON payload for this behavior changed from a single integer value (e. g. 1234) to an array of string values (e. g. [“1234”, “5678”]).

If you use the Property Manager API, make sure your property accepts single-value payload for your previous rule format, or use the latest rule format and the new payload to prevent errors. Click View JSON payload above the DataStream behavior details in Property Manager to check the latest payload.

How to

  1. Use the top-right menu in the header to select the appropriate ​Akamai Control Center​ account with access to the applicable product.

  2. Access Property Manager configuration associated with the selected ​Akamai Control Center​ account. Go to > CDN > Properties or just enter Properties in the search box.

    The Property Groups page opens.

  3. Click the Property Name link for your property.

  4. On the Property Details page, click the Version of your configuration that you want to access in Manage Versions and Activations.

    The Property Manager Editor appears.

  5. In the default rule, click Add Behavior, and select DataStream.

  6. Click Insert Behavior.

    The DataStream behavior appears in your rule.

  7. In Stream version, select DataStream 2.

  8. In the DataStream 2 section:

    • Set the Enable switch to On.

    • In DataStream names, choose the streams you want to configure from the drop-down list. You can choose up to 3 active streams to send logs (for example, to different destinations, with different data sets, or as backup in case of upload failure) at once.

    👍

    Using the search box

    You can find the names of all streams that monitor this property by entering the property name in the search box of the DataStream application.

    • Optionally, you can enable the Collect midgress traffic option to gather traffic data from within the ​Akamai​ platform, such as between two edge servers, and send them in all the streams selected above. If logging midgress traffic is not enabled on your contract, contact the ​Akamai​ support team.

    • In Sampling rate, specify the sample percentage of data for this property that you want the stream to send to your destination.

  9. Click Save.

  10. Enable logging custom data set parameters in the Log Request Details behavior. See Log custom parameters.

Do this step only if you want to monitor these Data set parameters:

  • User-Agent

  • Accept-Language

  • X-Forwarded-For

  • Referer

  • Host

  • Cookie

  • Custom field

  1. On the Activate tab, click Activate v# on Production.

Next steps

If you deployed any of the streams monitoring this property in an inactive state, remember to activate them in the DataStream application. Only active streams can collect logs about your properties. See Activate or deactivate a stream.