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

# Grafana

[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:

12.4/stable tf-12.4.3-2-g8187475

```
juju deploy grafana-k8s --channel 12.4/stable --trust
```

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

* [admin\_roles](https://charmhub.io/grafana-k8s/configurations#admin_roles)
* [admin\_user](https://charmhub.io/grafana-k8s/configurations#admin_user)
* [allow\_anonymous\_access](https://charmhub.io/grafana-k8s/configurations#allow_anonymous_access)
* [allow\_embedding](https://charmhub.io/grafana-k8s/configurations#allow_embedding)
* [cpu](https://charmhub.io/grafana-k8s/configurations#cpu)
* [custom\_config](https://charmhub.io/grafana-k8s/configurations#custom_config)
* [datasource\_query\_timeout](https://charmhub.io/grafana-k8s/configurations#datasource_query_timeout)
* [editor\_roles](https://charmhub.io/grafana-k8s/configurations#editor_roles)
* [enable\_auto\_assign\_org](https://charmhub.io/grafana-k8s/configurations#enable_auto_assign_org)
* [log\_level](https://charmhub.io/grafana-k8s/configurations#log_level)
* [memory](https://charmhub.io/grafana-k8s/configurations#memory)
* [reporting\_enabled](https://charmhub.io/grafana-k8s/configurations#reporting_enabled)
* [web\_external\_url](https://charmhub.io/grafana-k8s/configurations#web_external_url)

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

* admin\_roles | string

  Unquoted, comma-separated list of groups oAuth2/OIDC that should be granted admin
  privileges in Grafana. Only applicable when using oAuth2/OIDC authentication.

  Example:
  juju config grafana admin\_roles="admin,another-group"
* admin\_user | string

  Default: admin

  The Grafana administrative user
* allow\_anonymous\_access | boolean

  Whether Grafana should allow anonymous access to dashboards. Unless
  you have some other authentication mechanism in front of your deployment,
  you likely do not want to enable this.
* allow\_embedding | boolean

  Whether Grafana should allow embedding dashboards using iframes. Unless
  you have a clear reason for doing so, you likely do not want to enable this.
* 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/
* custom\_config | string

  Additional configuration options to be added to grafana.ini.
  These options will be appended to the grafana.ini file, allowing for custom configuration.
  Note that this config option accepts only a small subset of the grafana.ini file.
  Currently supported sections:

  + [smtp], ref: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#smtp

  To set this configuration, create a local INI file and pass it using the @file syntax:

  juju config grafana-k8s custom\_config=@smtp-config.ini

  Sensitive values can be referenced from Juju secrets using a `secret://<secret-id>/<key>`
  URL in place of the plaintext value. The secret must exist in the same model and be
  granted to the charm with `juju grant-secret`. For example:

  juju add-secret smtp-config password="my-smtp-password"
  juju grant-secret smtp-config grafana-k8s

  cat > smtp-config.ini <<EOF
  [smtp]
  enabled = true
  password = secret://<secret-id>/password
  EOF
  juju config grafana-k8s custom\_config=@smtp-config.ini
* datasource\_query\_timeout | int

  Default: 300

  The default timeout for querying a Grafana datasource. Each datasource can
  also configure its own preferred timeout value through relation data. If the
  value configured through relation data is larger than datasource\_query\_timeout
  then that value is left unchanged. The value of this configuration option must
  be a positive integer representing the maximum number of seconds Grafana will
  wait for a datasource to respond to a query.
* editor\_roles | string

  Unquoted, comma-separated list of groups oAuth2/OIDC that should be granted editor
  privileges in Grafana. Only applicable when using oAuth2/OIDC authentication.

  Example:
  juju config grafana editor\_roles="devs,another-group"
* enable\_auto\_assign\_org | boolean

  Default: True

  Set to true to automatically add new users to the main organization (id 1). When set to
  false, new users automatically cause a new organization to be created for that new user.
* log\_level | string

  Default: info

  Logging level for Grafana. Options are “debug”, “info”,
  “warn”, “error”, and “critical”.
* 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/
* reporting\_enabled | boolean

  Default: True

  When disabled, Grafana will be configured to not send anonymous usage statistics to stats.grafana.org, nor
  periodically check for updates.
  It is very helpful to the Grafana project, so please leave this enabled.

  When enabled, Grafana will use its default values for analytics.

  Ref: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#analytics
* web\_external\_url | string

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

  The URL under which Grafana is externally reachable (for example,
  if Grafana is served via a reverse proxy).

  Used for generating relative and absolute links back to
  Grafana itself. If the URL has a path portion, it will be used to
  prefix all HTTP endpoints served by Grafana.

  If omitted, relevant URL components will be derived automatically.

  If provided, this should be a complete URI, including scheme, or a
  fully qualified subpath starting with `/`.

  If Grafana is being served directly from the root of a fully-qualified
  host or a bare A record, this may be omitted.
