Quick tip: Monitoring SingleStoreDB using Datadog
Tags: singlestoredb, datadog, monitoring
Published: 2022-10-04 12:44:36

## Abstract
In the recent past, Datadog announced support for SingleStoreDB and it is easy to set up the monitoring in a few minutes, whether using a standalone or containerised installation of SingleStoreDB. In this short article, we'll see the required steps to get the Datadog Agent up and running with SingleStoreDB.

## Install SingleStoreDB
For this article, SingleStoreDB was installed in a Virtual Machine running Ubuntu 20.04.3. A previous article described [How to Install SingleStoreDB in a Virtual Machine](https://medium.com/@VeryFatBoy/how-to-install-singlestore-in-a-virtual-machine-b3a9f916c81a). Although there have been minor changes in the portal UI since that article, the information is still available in similar menu options.

## Create a free Datadog account
A free trial account can be created through the [Datadog Home Page](https://www.datadoghq.com/). On the sign-up form, there is an option to choose a Region and, for this article, **Europe (EU1)** was selected. For new accounts, there is a three-step process:

1. Your Account.
2. Your Stack.
3. Agent Setup.

The Agent Setup is the main part that we need. We'll select Ubuntu to match the SingleStoreDB installation environment mentioned earlier.

An easy one-step install is then available, similar to the following:

```shell
DD_AGENT_MAJOR_VERSION=7 DD_API_KEY=<API Key> DD_SITE="datadoghq.eu" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)"
```

The `<API Key>` is prefilled by Datadog. After a short time, the installation should be complete, and the Datadog Agent should be running.

Next, we'll navigate to:

```shell
cd /etc/datadog-agent/conf.d/singlestore.d
```

We'll make a copy of the `yaml` file:

```shell
sudo cp conf.yaml.example conf.yaml
```

and then edit the `conf.yaml` file.

Under the `instances:` section, we can uncomment and change the values to match our SingleStoreDB installation.

To collect system-level metrics, we'll also need to uncomment and change `collect_system_metrics` to `true`.

After saving the file changes, we need to restart the Datadog Agent:

```shell
sudo service datadog-agent restart
```

Scrolling down the Datadog website, it should now report:

```
Your first Datadog Agent is reporting. Congrats!
```

We'll select the **Finish** button.

## Create the Datadog integration
On the left-hand navigation pane in Datadog, we'll select **Integrations > Integrations**. SingleStoreDB should be automatically detected but, if not, we can use the search bar to find it. When we are ready, we can install the integration.

Next, from the left-hand navigation pane in Datadog, we'll select **Dashboards > Dashboard List > All Dashboards > SingleStore Overview**.

We should see various widgets showing metrics, as shown in Figures 1, 2 and 3.

![Figure 1. Activity Summary.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dj7wqlqxhvyjnmq5h1fm.png)

<center>Figure 1. Activity Summary.</center>

![Figure 2. Read/Write and Connections.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ovi9poz1vsf16bsuzozs.png)

<center>Figure 2. Read/Write and Connections.</center>

![Figure 3. Resource Utilisation and Queries.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/flsvxufiuwaeoj59tf7u.png)

<center>Figure 3. Resource Utilisation and Queries.</center>

There is additional documentation on the [SingleStore website](https://docs.singlestore.com/db/v7.8/en/user-and-cluster-administration/cluster-health-and-performance/monitoring/configure-monitoring-with-datadog.html) and the [Datadog website](https://docs.datadoghq.com/integrations/singlestore/).

## Summary
Datadog is a popular monitoring service and now supports SingleStoreDB. It's easy to set up and configure, as we've seen in this article.