Quick tip: Using the new built-in monitoring and metrics tools in SingleStoreDB Cloud
Tags: singlestoredb, monitoring, metrics, cloud
Published: 2023-01-31 19:09:35

## Abstract
Monitoring and metrics are important for understanding the performance and behaviour of database workloads. SingleStoreDB Cloud now provides both real-time and historical metrics. In this short article, we'll see how to access these new features.

## Introduction
In a [previous article](https://dev.to/singlestore/quick-tip-monitoring-singlestoredb-using-datadog-50l5), we saw how to use monitoring for standalone or containerised installations of SingleStoreDB. However, SingleStoreDB Cloud now also supports monitoring and metrics. In this article, we'll see how to access these built-in features.

## Create a SingleStoreDB Cloud account
A [previous article](https://dev.to/singlestore/quick-tip-using-dbt-with-singlestoredb-161g) showed the steps required to create a free SingleStoreDB Cloud account. We'll use **Monitoring Demo Group** as our Workspace Group Name and **monitoring-demo** as our Workspace Name. At the time of creating a Workspace, we have the option to attach the MarTech Database and should check this option as shown in Figure 1. This will serve as a great example to demonstrate monitoring and metrics.

![Figure 1. Attach Database.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nbo9tc46a7e61m3t9d75.png)

<center>Figure 1. Attach Database.</center>

## Real-time Monitoring
After the Workspace has been successfully created, if we select **Workspaces** from the top navigation bar, we can see all our Workspaces along with real-time metrics for **CPU**, **Memory** and **Cache**, as shown in Figure 2.

![Figure 2. Real-time Metrics.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u43z502war5qt3l6mrbf.png)

<center>Figure 2. Real-time Metrics.</center>

These three metrics are often the first indicators of poor performance. Now they can be quickly checked. Hovering over the CPU bar shows both the **Average** and the **Maximum**. Hovering over the Memory bar shows **Used**, **Reserved** and **Available**.

## Historical Metrics
If we now select **Monitoring** from the top navigation bar, we will be presented with an option to **Open Monitoring**, as shown in Figure 3.

![Figure 3. Open Monitoring.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y82qhwnfvy39ducn1uzp.png)

<center>Figure 3. Open Monitoring.</center>

Next, we'll click **Open Monitoring**.

A new tab/browser window will open and we will be presented with a set of Grafana charts and graphs similar to Figure 4.

![Figure 4. Historical Metrics.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/frq7zzy34taj0p9jnvmm.png)

<center>Figure 4. Historical Metrics.</center>

From Figure 4, we can see a wide range of charts, including:

- Database CPU
- Query rate
- Rows read or written rate
- Sysinfo CPU
- Sysinfo Memory
- Sysyinfo Network

Hovering over the individual charts will give us more detailed information and we can also choose the historical range and refresh rate from the top right.

These historical metrics complement the real-time metrics and can be used to observe system behaviour during demand surges, for example.

## Database Explorer Resource Utilisation Metrics
Finally, if we select **Databases** from the top navigation bar, we will see all our databases, as shown in Figure 5.

![Figure 5. Database Explorer.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/df6n5m34533wx94xh79h.png)

<center>Figure 5. Database Explorer.</center>

In this example, we can see the MarTech database. If we select this database by clicking on the name, we will see a more detailed breakdown, as shown in Figure 6.

![Figure 6. Database Detail.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0shc80kkwgixu6ovx4dh.png)

<center>Figure 6. Database Detail.</center>

Four new columns have been added to the metrics:

1. Memory Usage
2. Index Disk Usage
3. Data Disk Usage
4. Compression Ratio

These will considerably aid customers without the need to write custom code.

## Summary
The additional monitoring and metrics now available in SingleStoreDB Cloud will aid administrators and developers in better understanding the performance of database workloads, and identifying performance problems or bottlenecks much faster. For additional details please check the article [Winter 2022 Release: Announcing Real-Time and Historical Monitoring in SingleStoreDB Cloud](https://www.singlestore.com/blog/real-time-historical-monitoring-singlestoredb-cloud/).