---
title: Charmhub | Deploy Prometheus using Charmhub - The Open Operator Collection
description: Deploy the latest version of Prometheus as a Kubernetes Operator on any
  cloud.
url: https://charmhub.io/prometheus-k8s/configurations
---

# Prometheus

[Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

* [Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

Platform:

3.11/stable tf-3.11.1-1-g7307c58

```
juju deploy prometheus-k8s --channel 3.11/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [cpu](https://charmhub.io/prometheus-k8s/configurations#cpu)
* [evaluation\_interval](https://charmhub.io/prometheus-k8s/configurations#evaluation_interval)
* [log\_level](https://charmhub.io/prometheus-k8s/configurations#log_level)
* [max\_global\_exemplars\_per\_user](https://charmhub.io/prometheus-k8s/configurations#max_global_exemplars_per_user)
* [maximum\_retention\_size](https://charmhub.io/prometheus-k8s/configurations#maximum_retention_size)
* [memory](https://charmhub.io/prometheus-k8s/configurations#memory)
* [metrics\_retention\_time](https://charmhub.io/prometheus-k8s/configurations#metrics_retention_time)
* [metrics\_wal\_compression](https://charmhub.io/prometheus-k8s/configurations#metrics_wal_compression)
* [web\_external\_url](https://charmhub.io/prometheus-k8s/configurations#web_external_url)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* cpu | string

  K8s cpu resource limit, e.g. "1" or "500m". Default is unset (no limit). This value is used
  for the "limits" portion of the resource requirements (the "requests" portion is
  automatically deduced from it).
  See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
* evaluation\_interval | string

  Default: 1m

  How frequently rules will be evaluated.
* log\_level | string

  Default: info

  Prometheus server log level (only log messages with the given severity
  or above). Must be one of: [debug, info, warn, error, fatal].
  If not set, the Prometheus default one (info) will be used.
* max\_global\_exemplars\_per\_user | int

  The global limit for the number of exemplars.
  When unset or set to a non-positive number, exemplar storage is disabled.
  Otherwise, the value is set to the greater of the setpoint or 100,000.
  Ref: https://prometheus.io/docs/prometheus/latest/feature\_flags/#exemplars-storage
* maximum\_retention\_size | string

  Default: 80%

  The maximum storage to retain, expressed as a percentage (0-100) of the PVC capacity (e.g.
  "80%").
  The percentage value is then converted to bytes and passed to prometheus with the
  `--storage.tsdb.retention.size` argument.
  If this field is set to an invalid value, the `--storage.tsdb.retention.size` argument is dropped. In such cases, retention is only determined by `metrics_retention_time`.
  Default is 80%. If `metrics_retention_time` is also set, metrics will be dropped when **either** threshold has been exceeded.
* memory | string

  K8s memory resource limit, e.g. "1Gi". Default is unset (no limit). This value is used
  for the "limits" portion of the resource requirements (the "requests" portion is
  automatically deduced from it).
  See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
* metrics\_retention\_time | string

  Default: 15d

  How long to retain samples in the storage.
  Units Supported: y, w, d, h, m, s
  If `maximum_retention_size` is also set, metrics will be dropped when **either** threshold has been exceeded.
* metrics\_wal\_compression | boolean

  This flag enables compression of the write-ahead log (WAL).
  Depending on your data, you can expect the WAL size to be
  halved with little extra cpu load.
* web\_external\_url | string

  DEPRECATED. This config option is no longer used, in favor of "skipPrefix".

  The URL under which Prometheus is externally reachable (for example,
  if Prometheus is served via a reverse proxy).
  Used for generating relative and absolute links back to
  Prometheus itself. If the URL has a path portion, it will be used to
  prefix all HTTP endpoints served by Prometheus.

  The URL provided must point to the root of the Prometheus web application,
  e.g.:

  http://foo.bar/

  Note, do *not* set this configuration to a specific to an API path, e.g.,

  http://foo.bar//api/v1/write # DO NOT TRY THIS AT HOME

  This configuration option takes precedence over the URL provided over
  the "ingress" relation.
