# Manage your Managed ClickHouse® service

Day-to-day operations on a Managed ClickHouse® service.

## Prerequisites

- [Exoscale CLI](/reference/cli/exo/) version 1.97 or later. Earlier releases expose no
  ClickHouse commands at all, and every command on this page fails as an unknown command.

> [!NOTE]
> Managed ClickHouse® is in early access: services are managed through the `exo x` API commands
> shown on this page. Dedicated `exo dbaas` subcommands will replace them at general availability.

## Inspect a service

Read the full service description, including state, version, plan, components and backups:

```bash
exo x get-dbaas-service-clickhouse my-clickhouse -z ch-gva-2
```

## Monitor a service

Expose your service metrics to your own monitoring stack with an external endpoint. See
[Managed ClickHouse® metrics available via Prometheus](/product/dbaas/service-specific/clickhouse/reference/clickhouse-metrics-prometheus/)
and
[Managed ClickHouse® metrics available via Datadog](/product/dbaas/service-specific/clickhouse/reference/clickhouse-metrics-datadog/).

Query level statistics are available in the service itself, see
[Fetch query statistics](/product/dbaas/service-specific/clickhouse/how-to/fetch-query-statistics/).

## Resize a service

Change the plan of a running service to add capacity. See
[Scaling a managed service](/product/dbaas/how-to/scaling/):

```bash
echo '{"plan":"startup-32"}' | \
  exo x update-dbaas-service-clickhouse my-clickhouse -z ch-gva-2
```

## Schedule maintenance updates

Set the weekly window during which Exoscale applies maintenance:

```bash
echo '{"maintenance":{"dow":"sunday","time":"04:00:00"}}' | \
  exo x update-dbaas-service-clickhouse my-clickhouse -z ch-gva-2
```

Apply the pending maintenance updates immediately, without waiting for the next window:

```bash
exo x start-dbaas-clickhouse-maintenance my-clickhouse -z ch-gva-2
```

Maintenance replaces the service nodes, so expect a short interruption, longer on
single-node plans. Some features expect a fully updated service: for example, all
maintenance updates must be applied before you
[enable tiered storage](/product/dbaas/service-specific/clickhouse/how-to/enable-tiered-storage/).

See [Maintenance window](/product/dbaas/how-to/maintenance-windows/) for the platform behavior.

## Fork a service

Create a new service from a backup of an existing one, see
[Fork and restore from Managed ClickHouse® backups](/product/dbaas/service-specific/clickhouse/how-to/restore-backup/).

## Delete a service

```bash
exo x delete-dbaas-service-clickhouse my-clickhouse -z ch-gva-2
```

If the service is protected against termination, the deletion is refused until you disable
the protection, see
[Secure a Managed ClickHouse® service](/product/dbaas/service-specific/clickhouse/how-to/secure-service/).

