# What is Monitoring?

Monitoring records metrics of your machines and other resources, alarms on them, keeps the logs your apps and load balancers ship, checks your URLs from outside, and publishes status pages.

Monitoring needs nothing installed on your machines. The platform records CPU, disk and network of
every running compute instance and Managed PostgreSQL or Document Database node, and its own metrics of site-to-site VPN
connections, Kubernetes clusters, CDN distributions and app deployments. Your own code can publish
custom metrics next to them. An alarm watches one metric and mails you or calls a webhook when it
crosses a threshold. You find Monitoring under **Monitoring** in the Deutsche Cloud Console; the charts of a
resource are also on its own page.

## When to use it

- You want to know when a machine is busy, a disk fills or a tunnel goes down, without running a
  monitoring stack of your own.
- Your application should publish its own numbers (orders, queue depth, latency) through the API,
  OpenTelemetry or StatsD, and alarm on them.
- You want to read what a deployed app printed, or the requests an application load balancer or a
  CDN distribution served, without opening a shell.
- A URL, on Deutsche Cloud or anywhere else, should be requested on a schedule and someone told when
  it stops answering.
- Your users should see a public page that says whether your service works, with the incidents you
  post.

## Concepts

| Term              | Meaning                                                                                                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Metric**        | One measurement of one resource over time, such as `cpu_percent`. See [Metrics](metrics.md).                                                                              |
| **Custom metric** | A series your own code publishes: a namespace, a metric name and dimensions. See [Publish custom metrics](publish-custom-metrics.md).                                     |
| **Alarm**         | A rule on one metric: a statistic over a period, compared with a threshold. Its state is `OK`, `ALARM` or `INSUFFICIENT_DATA`. See [How alarms work](how-alarms-work.md). |
| **Log line**      | One line an app's container, a schedule, a function, an event rule, a load balancer or a CDN distribution shipped. See [Search logs](search-logs.md).                     |
| **Uptime check**  | A URL requested on a schedule from every location the platform checks from. See [How uptime checks work](how-uptime-checks-work.md).                                      |
| **Status page**   | A public page at `{slug}.status.<domain>` with components, incidents and subscribers. See [Create a status page](create-a-status-page.md).                                |

## Pricing

Metrics of your resources, alarms, uptime checks and status pages are free. The log events and the
custom metric points your organization keeps are metered by the GB-month, measured daily; where
they are not charged yet, the cost shows as "metered, not charged yet" and is not on your invoice.

## Interfaces

- The Deutsche Cloud Console, under **Monitoring**: **Alarms**, **Custom metrics**, **Uptime**,
  **Status pages** and **Logs**.
- The CLI: `dcloud monitoring …`; see the _CLI Command Reference_.
- The HTTP API under `/monitoring/api`; see the _API Reference_.
- Terraform: `dcloud_monitoring_alarm`, `dcloud_uptime_check`, `dcloud_status_page` and
  `dcloud_status_page_subscriber`.

## Next steps

- [Get started](getting-started.md): publish a metric, alarm on it, check a URL, and clean up.
- [Create an alarm](create-an-alarm.md)
- [Create an uptime check](create-an-uptime-check.md)
