_
_
Back to Blog
Datadog
No items found.

Protect your Datadog Instances with Backup Automator

Have you had a fellow teammate or co-worker accidentally delete one of the monitors in your Datadog account?
3
min read
|
by
Tomás Cespedes
December 8, 2021

Have you had a fellow teammate or co-worker accidentally delete one of the monitors in your Datadog account? Or maybe, they wiped away half the widgets on one of your executive dashboards and you don't remember which metric and tag combinations were being leveraged? 

RapDev.io is now offering a new Datadog Marketplace Integration specifically designed to provide a safety net for the scenarios described above and much more. The RapDev Backup integration provides organizations (small and large) with the ability to create snapshots of their Datadog resources (dashboards, monitors, synthetics, and notebooks) on a regular schedule of their choice. As a result, organizations can begin to create a collection of JSON configurations of all your resources that are time stamped with the moment they were created. In the case that someone, either purposely or accidentally, makes changes that shouldn't happen, you'll be able to open up the backup from your desired time, easily find the file that is associated with the correct resource by using the index file provided, and then paste or upload it into Datadog.

The backup integration can be run from a Datadog agent on any supported Windows or Mac server that runs a Python3.X version. While run times and backup requirements can vary per org, the safest approach would be to run the custom check at most once a day and no less than once a month.

Backup Storage

To make maintainability and operations as smooth as possible, these backups can be seamlessly and securely uploaded to the cloud provider of your choice (AWS S3 and Azure Blob Storage) and is done so as a zipped file. This helps prevent having a mass number of large files and also reduce overall storage space usage when it's not required. If you decide you need to restore from a backup, all you would have to do is find the desired timestamp, download the file from the platform it was uploaded to, and then unzip it. From there, you'll have a folder for each resource that has a backup (e.g. Monitors, Dashboards, Synthetics, and Notebooks). Once unzipped, you can locate the correct json backup based on the public ID of the resource or the name, both of which are saved in an index file in each directory.

Backup Restoring

There are several methods that you can use to restore a backup from one of the json in your Datadog account. If you need to do a single dashboard, monitor, synthetic, etc... at a time, you can simply unzip the backup file, locate the appropriate <resource_id>.json file that you are planning to use, and then you can copy the entire contents of the JSON file and paste it into the associated page on Datadog.

i. Manual Method
- Dashboards

To backup a dashboard, either create a new dashboard or pick an existing one from your dashboard list. Once you are looking at the dashboard, in the upper right hand corner click the Cog wheel to open the drop down menu. From there, select "Import dashboard JSON..." and paste the contents of the JSON file you just copied.

- Monitors

To restore a monitor, hover over the "Monitors" menu item on the left hand side of the page. On the "Select a monitor type" page, scroll to the bottom and click "Import Monitor from JSON". Paste the contents you copied from the backup json file.

ii. Synthetics and Notebooks

Synthetics and Notebook restore functionality is not supported by the Datadog UI currently so this should be done via the API or by hand after looking through the JSON.

iii. Automated/Script Method

The second option for restoring Datadog resources from the backups is to use the RapDev restore script. It allows you to provide specific ID's to restore or a wildcard (e.g. "*") to automatically restore backups without having to do it by hand. We do not recommend attempting to automate this script as it will regularly replace resources in your Datadog account. Additionally, whoever runs this script should have a very good understanding of what it does and how it works. In order to obtain this script, please reach out to integrations@rapdev.io and we would be happy to provide it to you along with instructions and best practices. 

Complete your Organization's Datadog Strategy

After all the work you've done to get your Datadog account up to your organization’s standards, you can feel confident knowing your Datadog resources have been backed up in the case that you’d like to revert to previous configurations. By using RapDev's backup integration, you can provide your organizational teams with ease of mind that if they do make a mistake (since we're all human), it can easily be reverted without much effort.

Written by
Tomás Cespedes
Boston
Cloud Engineer with a robust background in developing and managing scalable cloud infrastructures and ensuring the seamless operation of high-performance applications. Also an unofficial steak connoisseur, mastering the art of grilling the perfect steak – a skill just as essential as cloud computing! Originally hailing from Argentina, now a proud Bostonian, blending tech and culinary adventures.
you might also like
back to blog