The more tools that your teams need to execute their workflows, the more friction and lost productivity there can be, especially if each tool requires a different CLI or set of APIs. Retool is a low-code platform that allows you to build internal web applications using a drag-and-drop interface. By integrating with a number of key backend databases and APIs, Retool enables you to create custom, centralized management tools to serve a wide range of employee-facing use cases.
To help DevOps further unify their system management and monitoring workflows, we’re excited to announce that Datadog now integrates with Retool. Your teams can now put together internal tools and apps that employ the full spectrum of Datadog API operations and manage complex workflows from a single UI, without worrying about the logic or integration maintenance that those tools often require. You can also embed your Retool apps into your Datadog dashboards, supporting your management workflows and helping inform team decisions from a single pane of glass.
In this post, we’ll walk through how to integrate Datadog into Retool to build an app to monitor and manage an Elasticsearch cluster.
Unify your monitoring and management toolkits
By integrating with the Datadog API, Retool can access any of the monitoring data you’re collecting in Datadog. This lets you easily visualize key metrics, logs, traces, and more alongside your management tools, spot problems in the performance of your assets, and implement the proper solutions from one window. If you already have Datadog and Retool accounts, you can start using Retool’s Datadog integration within minutes.
Create a Datadog app in Retool
Let’s say you wanted to create a tool that allows your engineers to configure and control your Elasticsearch resources without learning a new CLI. Having visibility into the health and performance of your hosts running Elasticsearch is vital to making informed cluster management and scaling decisions.
With our integration, you can use Retool to build an app that can manipulate your Elasticsearch assets and pull in and display key metrics from Datadog within the same window. This way, your users can see things like host CPU and memory usage to drive database management without needing to switch back and forth between apps.
To build a Retool app that uses Datadog data to manage Elasticsearch resources:
- Integrate Datadog with your Retool account by adding a Datadog API key and application key to Retool
- Connect Elasticsearch to Retool using a connection string
- Build queries that employ the Datadog and Elasticsearch APIs to perform key tasks with both services
- Create a custom UI with our drag-and-drop components
In the following section, we’ll walk you through how we built part of this app by creating a Datadog query and connecting it to a UI in Retool. If you want to get started right away with this app, you can duplicate the premade template. All you’ll need then is to connect to your Datadog and Elasticsearch resources (as outlined in steps one and two) and connect those resources to the queries in the app.
Query host data from Datadog
After you’ve followed the instructions to add your Datadog API and applications keys to your Retool account, create a new blank tool in Retool and create a query with Datadog as the resource type. You’ll see a query editor with all of the Datadog API endpoints available for GET
, POST
, and PUT
operations. Select Datadog’s /api/v1/usage/hosts
endpoint to pull your host metadata from Datadog (as shown in the screenshot below) and name your new query (e.g., getHosts
).
Next, drag a Table component into your workspace and fill it with the data from your host query (getHosts.data
). You can rearrange the columns and names to include your hosts’ metadata, as well as the status of the Elasticsearch indexes and shards on each host.
You might also want to include a search box in order to filter your hosts. To do that, drag a Text Input component into your workspace. Then, in the Datadog query (getHosts
), add textinput1.value
for the filter
query parameter. This will include any value added to your input component as a filter in your host query. Also, set the sort_field
parameter to True
. You can then type, for example, “elasticsearchEligible” into the text input to view Datadog metrics only on your hosts running Elasticsearch.
You can extend this application in a number of ways. For example, in the table below we made a GET
request to Datadog’s /api/v1/query
endpoint to pull in key system metrics for deeper host visibility.
Build Elasticsearch tooling
Retool integrates with Elasticsearch so that you can build tools to manage your Elasticsearch indexes. For example, we can create a Javascript-based Put
query that calls the Elasticsearch reindex
function to delete or create indexes. We can then attach that query to a Form component so that index creation and deletion can be performed with the click of a button.
As a final step, we might want to make sure that it’s possible to roll back any changes we make to our Elasticsearch cluster. We can use Retool’s Wizard component to manage the workflow of creating a snapshot of our cluster’s current state. This way, we can quickly revert to a backup cluster in the case of a management mistake.
Taken together, these read/write operations and components comprise a control panel app that lets you use Datadog monitoring data to drive management decisions for your Elasticsearch assets without switching back and forth between multiple services. For a full demo of this sample app, see Retool’s Datadog-Elasticsearch panel. And for a deep-dive into using the Retool app editor, see Retool’s walkthrough video.
The right tools for the job
Retool’s Datadog integration lets you build powerful Datadog-powered apps for your teams within minutes so that they can quickly evaluate and manage resources without logging into separate services. And because Datadog integrates with more than 750 other technologies, you can build Retool apps that take advantage of monitoring and performance data from any Datadog-integrated service. If you’re already a Datadog customer, you can log in to Retool and start adding your monitoring data to your internal apps now. And if you aren’t already using Datadog, get started with a free 14-day trial.