Database Service metrics in Google Distributed Cloud (GDC) air-gapped let you track
database cluster health, evaluate resource utilization, and detect performance
bottlenecks. You can observe these metrics and query diagnostic logs by using
the monitoring instance to help ensure that your database workloads run
reliably. For general information about monitoring and visualizing processes for
application operators (AOs) in GDC, see
[Monitoring and visualizing metrics](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/application/ao-user/observability-monitoring-and-visualizing).

You must create a database cluster before you can observe its metrics.

## View diagnostic logs

1. Navigate to the monitoring instance UI to access the database diagnostic logs for a
   database cluster.

2. Click the explore **Explore**
   button from the menu to open the **Explore** page.

3. Enter a query to search for Database Service logs using LogQL.

   1. Using the **Label filters** drop-down menu, create a filter for
      `service_name=dbs`.

   2. Click the add
      **Operations** button and select **Line contains**. Enter the database
      cluster's name in the text box.

   3. Click the add
      **Operations** button again and select **Line contains** . Enter
      <var translate="no">PROJECT_NAME</var> in the text box.

   4. Click the **Run query** button.

## View metrics

1. Navigate to the monitoring instance UI to access the metrics for a database cluster.

2. From the drop-down menu, select **prometheus** as the data source to
   retrieve metrics.

3. Application operators can access Database Service metrics that have the `dbs_` prefix.
   Enter `dbs_` in the **Select a metric** text box in the **Metrics browser**
   panel to view all Database Service metric types.

4. Application operators can also access metrics with the `pg_` prefix.