This product is not supported for your selected Datadog site. ().
Datadog Disaster Recovery (DDR) keeps your observability running when a cloud provider region or the Datadog services within it are disrupted. With DDR, you configure a secondary Datadog organization in a different region ahead of time and replicate your resources to it. When you fail over, the secondary site already has the dashboards, monitors, and users your team needs.
DDR uses an active-passive model: your secondary site stays in sync but passive until you decide to fail over to it. Failover is never automatic; you choose when to cut over.
DDR also lets you run periodic disaster recovery drills to test your ability to recover from outages and to meet your business and regulatory compliance needs.
Prerequisites
The minimum Datadog Agent version you need depends on which products you use:
Supported telemetry
Supported products
Agent version required
Logs
Logs
v7.54+
Metrics
Infrastructure Monitoring
v7.54+
Traces
APM
v7.68+
Datadog is continuously evaluating customer requests to support DDR for additional products. Contact the Disaster Recovery team to learn about upcoming capabilities and your specific needs if they are not covered above.
Setup
Follow these steps to enable Datadog Disaster Recovery. If you have questions about any of the steps, contact your Customer Success Manager or Datadog Support.
1. Create a DDR org and link it to your primary org
Create and share your DDR org
If you prefer, Datadog can set this up for you.
Create your DDR org
Go to Get Started with Datadog. You may need to log out of your current session, or use incognito mode, to access this page.
Choose a different Datadog site than your primary (for example, if you’re on US1, choose EU or US5). See the Datadog site list for options. All Datadog sites are geographically separated.
Follow the prompts to create an account.
Share the DDR org information with Datadog
Email your new org name to your Customer Success Manager. Then, your Customer Success Manager sets this new org as your DDR org.
Retrieve the public IDs and link your DDR and primary orgs
For security reasons, Datadog is unable to link the orgs on your behalf.
After Datadog designates your DDR organization, link your DDR org to your primary org:
Managed sync replicates user accounts from your primary org to your DDR org. Datadog recommends configuring Just-in-Time provisioning with SAML so users can access the DDR org during a failover without needing to reset their password.
Set up your cloud integrations (AWS, Azure, Google Cloud)
Your cloud integrations must be configured in both primary and DDR orgs, but they only run in one org at a time: by default in the primary org, and during failover in the DDR org.
Datadog manages resource sync on your behalf using the open source datadog-sync-cli tool. You do not need to run or operate this tool yourself.
Managed sync replicates resources from your primary org to your DDR org on a regular schedule. Replicated resources include dashboards, monitors, users, notebooks, and 34+ other resource types. Replication runs on this schedule so your DDR org stays current before an outage.
Users are scoped to each Datadog site. Managed sync replicates user accounts to your DDR org. However, users may need to reset their password on first login to the DDR org. Datadog recommends configuring Just-in-Time provisioning with SAML so users can access the DDR org without manual password resets.
Managed sync uses a Datadog service account. During onboarding, create a service account in your DDR org to read and replicate resources from your primary org. Resources synced by managed sync are provisioned by a user mapped to their original owner when possible.
Enable Remote Configuration (RECOMMENDED)
Remote Configuration (RC) allows you to remotely configure and change the behavior of Datadog Agents deployed in your infrastructure.
Remote Configuration is enabled by default for new orgs, including your DDR org. Any new API keys you create are RC-enabled for use with your Agent. For more details, see the Remote Configuration documentation.
Datadog strongly recommends using Remote Configuration for better failover control. As an alternative to RC, you can manually configure your Agents or use configuration management tools such as Puppet, Ansible, or Chef.
Dual ship telemetry to DDR org during failover or drills
To enable Dual Shipping, Datadog recommends using Fleet Automation for management at scale. Alternatively, you can configure it manually by editing your datadog.yaml file.
Contact your Datadog Customer Success Manager to schedule dedicated time windows for failover testing to measure performance and Recovery Time Objective (RTO).
Go to Fleet Automation > Configure Agents in your DDR org to create a failover policy or reuse an existing one, and apply it to your fleet of Agents. Soon after the policy is enabled, Agents begin dual-shipping telemetry to both the primary and DDR (failover) observability sites.
To create a failover policy, click Create Failover Policy.
Then, follow the prompt to scope the hosts and telemetry (metrics, logs, traces) that you are required to fail over.
Cloud Integrations can only run in either your primary or DDR Datadog site, but not both at the same time, so failing them over ceases Cloud Integration data in your primary site. During an integration failover, integrations run only in the DDR data center. When no longer in failover, disable the failover policy to return integration data collection to the primary org.
During a failover or failover exercises, update your Datadog Agent’s datadog.yaml configuration file as shown in the following example, and restart the Agent.
enabled: true allows the Agent to send Data about the Agent and the infrastructure host. For example, host name, host tags, Agent version. to the DDR Datadog site so you can view Agents and your Infra hosts in the DDR org. This allows you to see your Agents and infrastructure hosts in the failover org.
failover_metrics, failover_logs, and failover_apm are false by default. Setting these to true causes the Agent to start sending Data that is sent to the Datadog platform. For example, logs, metrics, traces. to the DDR org.
multi_region_failover:
enabled: true failover_metrics: false failover_logs: false failover_apm: false site: <DDR_SITE> # For example, "site: us5.datadoghq.com" for a US5 site api_key: <DDR_SITE_API_KEY>
Configure DNS-based failover
DNS-based failover is a complementary approach to Agent-based failover. Instead of configuring Agents with a secondary site endpoint, you configure all your data sources to send telemetry to a single Datadog-provided custom intake URL. During a failover event, Datadog updates the DNS record for that URL to redirect traffic from your primary site to your DDR site.
DNS failover is all-or-nothing. All telemetry sources using your custom endpoint cut over simultaneously.
Receive your custom DNS endpoint
If you choose to use DNS-based failover, Datadog provisions a custom intake URL for your organization (for example, <your-org>.intake.datadoghq.com). Configure all your data sources (such as Agents, log shippers, and custom instrumentation) to send telemetry to this endpoint instead of to the default Datadog intake URL. This is a one-time configuration change.
Trigger a DNS failover
Contact your Customer Success Manager or Datadog Support to initiate a DNS failover. Datadog updates the DNS record to redirect traffic from your primary site to your DDR site. The target Recovery Time Objective (RTO) is 2 hours from the time failover is initiated.
A customer-controlled way to trigger DNS failover directly from the DDR org is in Preview. Contact your Customer Success Manager to learn more.
3. Run failover tests in various environments
Activate and test DDR failover in Agent-based environments
To trigger a failover of your Agents, click one of the policies in Fleet Automation in your DDR org, then click Enable. The status of each host updates as the failover occurs.
Use the steps appropriate for your environment to activate/test the DDR failover.
For Agent deployments in non-containerized environments, use the below Agent CLI commands:
agent config set multi_region_failover.failover_metrics trueagent config set multi_region_failover.failover_logs trueagent config set multi_region_failover.failover_apm true
If you are running the Agent in a containerized environment like Kubernetes, you can still use the Agent command-line tool, but you need to invoke it on the container running the Agent. You can make changes using one of the following, depending on your needs:
Below is an example of using kubectl to fail over metrics and logs for a Datadog Agent pod deployed with either the official Helm chart or Datadog Operator. The <POD_NAME> should be replaced with the name of the Agent pod:
Alternatively, you can specify the below settings in the main Agent configuration file (datadog.yaml) and restart the Datadog Agent for the changes to apply:
You can make similar changes with either the official Helm chart or Datadog Operator if you need to specify a custom configuration. Otherwise, you can pass the settings as environment variables:
Activate and test DDR failover in cloud integrations
You can test failover for your cloud integrations from your DDR organization’s landing page.
On the failover landing page, you can check the status of your DDR org, or click Fail over your integrations to test your cloud integration failover.
When no longer in failover, disable the failover policy in the DDR org to return integration data collection to the primary org.
During testing, integration telemetry is spread over both organizations. If you cancel a failover test, the integrations return to running in the primary data center.
Further reading
Additional helpful documentation, links, and articles: