Datadog

Our Datadog event integration (alert) creates an event when certain Next-Gen WAF activity occurs.

HINT: Want to set up alerting for your CDN or Compute service? Check out our Alerts documentation.

Setting up Datadog integrations (alerts)

To set up a Datadog integration (alert), create a Datadog API key and then add the integration (alert).

Creating Datadog API keys

Before you can set up the Datadog integration (alert), you need to create a Datadog API key:

  1. Log in to Datadog.
  2. Click Integrations in the navigation bar on the left.
  3. Click APIs.
  4. Click Create API Key.
  5. Create a new API key by following the steps.
  6. Copy the provided API Key.

Adding Datadog integrations (alerts)

Once you've created a Datadog API key, you can use that API key to set up the Datadog integration (alert):

  1. Fastly control panel
  2. Next-Gen WAF control panel
  1. Log in to the Fastly control panel.
  2. Go to Security > Next-Gen WAF > Workspaces.
  3. Click the gear Gear icon next to the workspace that you want to modify.
  4. Click Alerts and then Add alert.
  5. Fill out the Add alert form as follows:
    • From the Integration type menu, select Datadog.
    • In the API Key field, enter the API Key created in Datadog.
    • From the Site menu, select your preferred Datadog endpoint.
    • In the Select activities menu, leave Flagged IPs checked.
  6. Click Add workspace alert.

Activity types

IMPORTANT: This section only applies to Next-Gen WAF customers with access to the Next-Gen WAF control panel.

When setting up a Datadog integration (alert) in the Next-Gen WAF control panel, you can select from the following activity types:

Activity typeDescription
flagAn IP address was flagged
agentAlertAn agent alert was triggered

Using the default dashboard in Datadog

Datadog has a default dashboard populated with StatsD metrics from the Next-Gen WAF agent. To use this functionality:

  1. Find and install the Signal Sciences integration tile in Datadog integrations tab.

  2. Confirm that the Datadog agent is configured to listen for StatsD events.

  3. Configure the Next-Gen WAF agent to use dogstatsd:

    • Add the following line to each agent's agent.config file:

      statsd-type = "dogstatsd"
    • When this is done the agent's statsd client will have tagging enabled and metrics such as sigsci.agent.signal.<SIGNAL_TYPE> will be sent as sigsci.agent.signal and tagged with signal_type:<SIGNAL_TYPE> (e.g., sigsci.agent.signal.http404 => sigsci.agent.signal tag signal_type:http404).

    • If using Kubernetes to run the Datadog agent, make sure to enable DogStatsD non local traffic as described in the Kubernetes DogStatsD documentation.

  4. Configure the Next-Gen WAF agent to send metrics to the Datadog agent by adding the following line to each agent's agent.config file:

    $ statsd-address="<DATADOG_AGENT_HOSTNAME>:<DATADOG_AGENT_PORT>"
  5. Verify that the Signal Sciences - Overview dashboard is created and starting to capture metrics.