惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
U
Unit 42
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
腾讯CDC
I
InfoQ
GbyAI
GbyAI
博客园_首页

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis
Use Datadog’s Notebooks API to programmatically manage yo...
Stephanie Niu, Kai Xin Tai · 2021-05-20 · via Datadog | The Monitor blog
Stephanie Niu

Stephanie Niu

Kai Xin Tai

Kai Xin Tai

Datadog Notebooks simplify the way teams across an organization find and share knowledge. By bringing together live data and rich Markdown text, Notebooks help teams create powerful, data-driven documents—from runbooks and support playbooks to incident postmortems and data reports. And with collaboration functionalities like real-time editing and commenting, team members can simultaneously make changes to a document and gather feedback along the way. Today, we’re excited to announce the launch of our new Notebooks API, which gives you the flexibility to create and update your Notebooks programmatically, as part of your existing workflows.

Use Datadog Notebooks to collaborate with your team on incident postmortems

In this post, we’ll show how you can use the Notebooks API to automatically:

  • Generate notebooks on new services and monitors

  • Keep your notebooks up-to-date

  • Create offline backups of your notebooks

Automatically generate notebooks on new services and monitors

We built our Notebooks API to help you seamlessly integrate data-driven documents into your existing workflows. As you create new application services, you can call the POST endpoint to automatically generate notebooks and populate them with graphs to help you better explore your data. You can make the call from the command line, as shown below, or integrate it into the setup scripts for your service. In this example, we are creating a support playbook for the web-store service, and adding a graph that shows the average system load over a minute:

curl --location --request POST 'https://app.datadoghq.com/api/v1/notebooks' \

--header 'Content-Type: application/json' \

--header 'dd-api-key: ${api_key}' \

--header 'dd-application-key: ${application_key}' \

--data-raw '{

"data": {

"type": "notebooks",

"attributes": {

"name": "Web-store playbook",

"cells": [

{

"attributes": {

"definition": {

"show_legend": true,

"type": "timeseries",

"requests": [

{

"q": "avg:system.load.1{*}",

"style": {

"line_width": "normal",

"palette": "dog_classic",

"line_type": "solid"

},

"display_type": "line"

}

],

"yaxis": {

"scale": "linear"

}

},

"graph_size": "m",

"split_by": {

"keys": [],

"tags": []

},

"time": null

},

"type": "notebook_cells"

}

],

"time": {

"live_span": "1h"

},

"status": "published"

}

}

}'

Now, if we head over to our Datadog account, we can see that the notebook was successfully created:

A web-store playbook containing a graph of system load

To further automate your monitoring workflows, you can chain the Notebooks API to other Datadog APIs and perform multiple calls at once. For instance, when you create a monitor using the Monitors API, you can include a call to the Notebooks API to automatically add a graph of the monitor query to an incident response playbook along with a list of recommended remediation steps. You can then add the playbook link, along with other useful resources, to the description of the monitor. This way, if the monitor triggers, it is easy for your incident response team to get the context they need to resolve the issue as quickly as possible.

Keep your library of notebooks up-to-date

Modern applications are constantly in flux, which is why we’ve made the maintenance of notebooks as quick, easy, and as hands-free as possible. When a service evolves—such as when its underlying infrastructure changes or a new feature is rolled out—you can include a call to the GET endpoint to retrieve all your notebooks that contain the name of that service in their title. You can then update each notebook by adding new graphs or modifying existing Markdown cells so that they reflect the latest state of your service. You can also incorporate the DELETE endpoint into your service deprecation process to remove notebooks associated with outdated services.

Create offline backups of your notebooks

Since notebooks are updated as services evolve—and often by multiple team members—it can be valuable to create backups of these notebooks to reference in the future. You can easily retrieve your notebook’s definition with the GET endpoint and store it for your team’s records. This way, you can see what your notebook looked like at a particular point in time. Doing this periodically means that you no longer have to worry about losing past versions of notebooks as you continue to update your records.

curl --location --request GET 'https://app.datadoghq.com/api/v1/notebooks/${notebook_id} \

--header 'dd-api-key: ${api_key}' \

--header 'dd-application-key: ${application_key}'

Start using the Notebooks API today

Having rich, easily accessible documentation is crucial for giving stakeholders across an organization the context they need to make decisions. And with the Datadog Notebooks API, you can programmatically create and update your notebooks within your existing workflows. If you’re currently using Datadog, head over to our documentation to see the full list of available endpoints. Otherwise, you can get started with a 14-day free trial today.