Grafana Setup File
Grafana Setup File
#
# Do not modify this file in grafana installs
#
# Temporary files in `data` directory older than given duration will be removed
temp_data_lifetime = 24h
# Directory where grafana will automatically scan and look for plugins
plugins = data/plugins
# folder that contains provisioning config files that grafana will apply on startup
and while running.
provisioning = conf/provisioning
# The public facing domain name used to access grafana from a browser
domain = localhost
# enable gzip
enable_gzip = false
# CDN Url
cdn_url =
# Sets the maximum time in minutes before timing out read of an incoming request
and closing idle connections.
# `0` means there is no timeout for reading the request.
read_timeout = 0
ca_cert_path =
client_key_path =
client_cert_path =
server_cert_name =
# For "sqlite3" only. cache mode setting used for connecting to the database
cache_mode = private
# How long the data proxy waits to read the headers of the response before timing
out, default is 30 seconds.
# This setting also applies to core backend HTTP data sources where query requests
use an HTTP client with timeout set.
timeout = 30
# How long the data proxy waits to establish a TCP connection before timing out,
default is 10 seconds.
dialTimeout = 10
# How many seconds the data proxy waits before sending a keepalive request.
keep_alive_seconds = 30
# How many seconds the data proxy waits for a successful TLS Handshake before
timing out.
tls_handshake_timeout_seconds = 10
# How many seconds the data proxy will wait for a server's first response headers
after
# fully writing the request headers if the request has an "Expect: 100-continue"
# header. A value of 0 will result in the body being sent immediately, without
# waiting for the server to approve.
expect_continue_timeout_seconds = 1
# Optionally limits the total number of connections per host, including connections
in the dialing,
# active, and idle states. On limit violation, dials will block.
# A value of zero (0) means no limit.
max_conns_per_host = 0
# The maximum number of idle connections that Grafana will keep alive.
max_idle_connections = 100
# How many seconds the data proxy keeps an idle connection open before timing out.
idle_conn_timeout_seconds = 90
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header
with username into the request.
send_user_header = false
# Google Analytics universal tracking code, only enabled if you specify an id here
google_analytics_ua_id =
# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict",
"none" and "disabled"
cookie_samesite = lax
# Set to true if you want to enable http strict transport security (HSTS) response
header.
# This is only sent when HTTPS is enabled in this configuration.
# HSTS tells browsers that the site should only be accessed using HTTPS.
strict_transport_security = false
# Set to true to enable the X-XSS-Protection header, which tells browsers to stop
pages from loading
# when they detect reflected cross-site scripting (XSS) attacks.
x_xss_protection = true
# Set Content Security Policy template used when adding the Content-Security-Policy
header to your requests.
# $NONCE in the template includes a random nonce.
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-
inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self'
'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self'
grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src
'none';form-action 'self';"""
# Set to true to enable this Grafana instance act as an external snapshot server
and allow unauthenticated requests for
# creating and deleting snapshots.
public_mode = false
[dashboards]
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
versions_to_keep = 20
# Minimum dashboard refresh interval. When set, this will restrict users to set the
refresh interval of a dashboard lower than given interval. Per default this is 5
seconds.
# The interval string is a possibly signed sequence of decimal numbers, followed by
a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
min_refresh_interval = 5s
# Path to the default home dashboard. If this value is empty, then Grafana uses
StaticRootPath + "dashboards/home.json"
default_home_dashboard_path =
# Set to true to automatically assign new users to the default organization (id 1)
auto_assign_org = true
# Set this value to automatically add new users to the provided organization (if
auto_assign_org above is set to true)
auto_assign_org_id = 1
# Default role new users will be automatically assigned (if auto_assign_org above
is set to true)
auto_assign_org_role = Viewer
# Path to a custom home page. Users are only redirected to this if the default home
dashboard is used. It should match a frontend route and contain a leading slash.
home_page =
# Viewers can edit/inspect dashboard settings in the browser. But not save the
dashboard.
viewers_can_edit = false
# The duration in time a user invitation remains valid before expiring. This
setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w
(week). Default is 24h (24 hours). The minimum supported duration is 15m (15
minutes).
user_invite_max_lifetime_duration = 24h
# Enter a comma-separated list of usernames to hide them in the Grafana UI. These
users are shown to Grafana admins and to themselves.
hidden_users =
[auth]
# Login cookie name
login_cookie_name = grafana_session
# How often should auth tokens be rotated for authenticated users when being
active. The default is each 10 minutes.
token_rotation_interval_minutes = 10
# Set to true to disable (hide) the login form, useful if you use OAuth
disable_login_form = false
# Set to true to disable the sign out link in the side menu. Useful if you use
auth.proxy or auth.jwt.
disable_signout_menu = false
# Set to true to attempt login with OAuth automatically, skipping the login screen.
# This setting is ignored if multiple OAuth providers are configured.
oauth_auto_login = false
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
oauth_state_cookie_max_age = 600
[auth.grafana_com]
enabled = false
allow_sign_up = true
client_id = some_id
client_secret =
scopes = user:email
allowed_organizations =
[emails]
welcome_email_on_sign_up = false
templates_pattern = emails/*.html, emails/*.txt
content_types = text/html
# log line format, valid options are text, console and json
format = console
# log line format, valid options are text, console and json
format = text
# Max size shift of single file, default is 28 means 1 << 28, 256MB
max_size_shift = 28
[log.syslog]
level =
# log line format, valid options are text, console and json
format = text
# Syslog network type and address. This can be udp, tcp, or unix. If left blank,
the default unix endpoints will be used.
network =
address =
# Syslog facility. user, daemon and local0 through local7 are valid.
facility =
[log.frontend]
# Should Sentry javascript agent be initialized
enabled = false
# Custom HTTP endpoint to send events captured by the Sentry agent to. Default will
log the events to stdout.
custom_endpoint = /log
# Requests per second limit enforced per an extended period, for Grafana backend
log ingestion endpoint (/log).
log_endpoint_requests_per_second_limit = 3
# Max requests accepted per short interval of time for Grafana backend log
ingestion endpoint (/log)
log_endpoint_burst_limit = 15
# Default setting for new alert rules. Defaults to categorize error and timeouts as
alerting. (alerting, keep_state)
error_or_timeout = alerting
# Default setting for how Grafana handles nodata or null values in alerting.
(alerting, no_data, keep_state, ok)
nodata_or_nullvalues = no_data
# Alert notifications can include images, but rendering many images at the same
time can overload the server
# This limit will protect the server from render overloading and make sure
notifications are sent out quickly
concurrent_render_limit = 5
# Default setting for max attempts to sending alert notifications. Default value is
3
max_attempts = 3
# Configures for how long alert annotations are stored. Default is 0, which keeps
them forever.
# This setting should be expressed as an duration. Ex 6h (hours), 10d (days), 2w
(weeks), 1M (month).
max_annotation_age =
# Configures max number of alert annotations that Grafana stores. Default value is
0, which keeps all alert annotations.
max_annotations_to_keep =
[annotations.dashboard]
# Dashboard annotations means that annotations are associated with the dashboard
they are created on.
# Configures how long dashboard annotations are stored. Default is 0, which keeps
them forever.
# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days),
2w (weeks), 1M (month).
max_age =
# Configures max number of dashboard annotations that Grafana stores. Default value
is 0, which keeps all dashboard annotations.
max_annotations_to_keep =
[annotations.api]
# API annotations means that the annotations have been created using the API
without any
# association with a dashboard.
# Configures how long Grafana stores API annotations. Default is 0, which keeps
them forever.
# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days),
2w (weeks), 1M (month).
max_age =
# Configures max number of API annotations that Grafana keeps. Default value is 0,
which keeps all API annotations.
max_annotations_to_keep =
#If both are set, basic auth will be required for the metrics endpoint.
basic_auth_username =
basic_auth_password =
[grafana_com]
url = https://grafana.com
[external_image_storage.s3]
endpoint =
path_style_access =
bucket_url =
bucket =
region =
path =
access_key =
secret_key =
[external_image_storage.webdav]
url =
username =
password =
public_url =
[external_image_storage.gcs]
key_file =
bucket =
path =
enable_signed_urls = false
signed_url_expiration =
[external_image_storage.azure_blob]
account_name =
account_key =
container_name =
[external_image_storage.local]
# does not require any configuration
[rendering]
# Options to configure a remote HTTP image rendering service, e.g. using
https://github.com/grafana/grafana-image-renderer.
# URL to a remote HTTP image renderer service, e.g. http://localhost:8081/render,
will enable Grafana to render panels and dashboards to PNG-images using HTTP
requests to an external service.
server_url =
# If the remote HTTP image renderer service runs on a different server than the
Grafana server you may have to configure this to a URL where Grafana is reachable,
e.g. http://grafana.domain/.
callback_url =
# Concurrent render request limit affects when the /render HTTP endpoint is used.
Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of
concurrent requests.
concurrent_render_request_limit = 30
[panels]
# here for to support old env variables, can remove after a few months
enable_alpha = false
disable_sanitize_html = false
[plugins]
enable_alpha = false
app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins to load
even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins =
# Enable or disable installing plugins directly from within Grafana.
plugin_admin_enabled = false
plugin_admin_external_manage_enabled = false
plugin_catalog_url = https://grafana.com/grafana/plugins/
#################################### Grafana Live
##########################################
[live]
# max_connections to Grafana Live WebSocket endpoint per Grafana server instance.
See Grafana Live docs
# if you are planning to make it higher than default 100 since this can require
some OS and infrastructure
# tuning. 0 disables Live, -1 means unlimited connections.
max_connections = 100
# Instruct headless browser instance to use a default language when not provided by
Grafana, e.g. when rendering panel image of alert.
# Please refer to the HTTP header Accept-Language to understand how to format this
value, e.g. 'fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5'.
rendering_language =
# Instruct headless browser instance to use a default device scale factor when not
provided by Grafana, e.g. when rendering panel image of alert.
# Default is 1. Using a higher value will produce more detailed images (higher
DPI), but will require more disk space to store an image.
rendering_viewport_device_scale_factor =
# Instruct headless browser instance whether to capture and log verbose information
when rendering an image. Default is false and will
# only capture and log error messages. When enabled, debug messages are captured
and logged as well.
# For the verbose information to be included in the Grafana server log you have to
adjust the rendering log level to debug, configure
# [log].filter = rendering:debug.
rendering_verbose_logging =
# Instruct headless browser instance whether to output its debug and error messages
into running process of remote rendering service.
# Default is false. This can be useful to enable (true) when troubleshooting.
rendering_dumpio =
# You can configure the plugin to use a different browser binary instead of the
pre-packaged version of Chromium.
# Please note that this is not recommended, since you may encounter problems if the
installed version of Chrome/Chromium is not
# compatible with the plugin.
rendering_chrome_bin =
# Instruct how headless browser instances are created. Default is 'default' and
will create a new browser instance on each request.
# Mode 'clustered' will make sure that only a maximum of browsers/incognito pages
can execute concurrently.
# Mode 'reusable' will have one browser instance and will create a new incognito
page on each request.
rendering_mode =
# When rendering_mode = clustered you can instruct how many browsers or incognito
pages can execute concurrently. Default is 'browser'
# and will cluster using browser instances.
# Mode 'context' will cluster using incognito pages.
rendering_clustering_mode =
# When rendering_mode = clustered you can define maximum number of browser
instances/incognito pages that can execute concurrently..
rendering_clustering_max_concurrency =
# Limit the maximum viewport width, height and device scale factor that can be
requested.
rendering_viewport_max_width =
rendering_viewport_max_height =
rendering_viewport_max_device_scale_factor =
# Change the listening host and port of the gRPC server. Default host is 127.0.0.1
and default port is 0 and will automatically assign
# a port not in use.
grpc_host =
grpc_port =
[enterprise]
license_path =
[feature_toggles]
# enable features, separated by spaces
enable =
[date_formats]
# For information on what formatting patterns that are supported
https://momentjs.com/docs/#/displaying/
# Default system date format used in time range picker and other places where full
time is displayed
full_date = YYYY-MM-DD HH:mm:ss
# Used by graph and other places where we only show small intervals
interval_second = HH:mm:ss
interval_minute = HH:mm
interval_hour = MM/DD HH:mm
interval_day = MM/DD
interval_month = YYYY-MM
interval_year = YYYY
# Experimental feature
use_browser_locale = false
# Default timezone for user preferences. Options are 'browser' for the browser
local timezone or a timezone name from IANA Time Zone database, e.g. 'UTC' or
'Europe/Amsterdam' etc.
default_timezone = browser
[expressions]
# Enable or disable the expressions functionality.
enabled = true
[geomap]
# Set the JSON configuration for the default basemap
default_baselayer_config =
# Enterprise only
[white_labeling]
# Set to your company name to override application title
app_title =
# Set to main title on the login page
login_title =
# Set to login subtitle
login_subtitle =
# Set to complete url to override login logo
login_logo =
# Set to complete css background expression to override login background
# example: login_background = url(http://www.bhmpics.com/wallpapers/starfield-
1920x1080.jpg)
login_background =
# Set to complete css background expression to override login box background
login_box_background =
# Set to complete url to override menu logo
menu_logo =
# Set to complete url to override fav icon (icon shown in browser tab)
fav_icon =
# Set to complete url to override apple/ios icon
apple_touch_icon =
# Set to complete url to override loading logo
loading_logo =
# List the links id's to use here, Grafana will look for matching links
configurations
# the link id's should be space separated and contain no whitespace
footer_links =
[usage_insights.export]
# Enable the usage insights export feature
enabled = false
# Storage type
storage = loki
[usage_insights.export.storage.loki]
# Set the communication protocol to use with Loki (can be grpc or http)
type = grpc
# Set the address for writing logs to Loki (format must be host:port)
url = localhost:9095
# Defaults to true. If true, it establishes a secure connection to Loki
tls = true
[reporting]
# Set timeout for each panel rendering request
rendering_timeout = 10s
# Set maximum number of concurrent calls to the rendering service
concurrent_render_limit = 4
# Set the scale factor for rendering images. 2 is enough for monitor resolutions
# 4 would be better for printed material. Setting a higher value affects
performance and memory
image_scale_factor = 2
# Set the maximum file size in megabytes for the CSV attachments
max_attachment_size_mb = 10
# Path to the directory containing fonts
fonts_path =
# Name of the TrueType font file with Regular style
font_regular = DejaVuSansCondensed.ttf
# Name of the TrueType font file with Bold style
font_bold = DejaVuSansCondensed-Bold.ttf
# Name of the TrueType font file with Italic style
font_italic = DejaVuSansCondensed-Oblique.ttf
[analytics.summaries]
# Set interval for writing dashboard usage stats buffer to database
buffer_write_interval = 30s
# Set timeout for writing dashboard usage stats buffer to database
buffer_write_timeout = 3s
# Set interval for trying to rollup per dashboard usage summary
# only rolled up at most once per day
rollup_interval = 4h
# Set timeout for trying to rollup per dashboard usage summary
rollup_timeout = 60s
[analytics.views]
# Set age for recent active users
recent_users_age = 10m
[auditing]
# Enable the auditing feature
enabled = false
# List of enabled loggers
loggers = file
# Keep dashboard content in the logs (request or response fields); this can
significantly increase the size of your logs.
log_dashboard_content = false
[auditing.logs.file]
# Path to logs folder
path = data/log
# Maximum log files to keep
max_files = 5
# Max size in megabytes per log file
max_file_size_mb = 256
[auditing.logs.loki]
# Set the communication protocol to use with Loki (can be grpc or http)
type = grpc
# Set the address for writing logs to Loki (format must be host:port)
url = localhost:9095
# Defaults to true. If true, it establishes a secure connection to Loki
tls = true
[keystore.vault]
# Location of the Vault server
url =
# Vault's namespace if using Vault with multi-tenancy
namespace =
# Method for authenticating towards Vault. Vault is inactive if this option is not
set
# Possible values: token
auth_method =
# Secret token to connect to Vault when auth_method is token
token =
# Time between checking if there are any secrets which needs to be renewed.
lease_renewal_interval = 5m
# Time until expiration for tokens which are renewed. Should have a value higher
the lease_renewal_interval
lease_renewal_expires_within = 15m
# New duration for renewed tokens. Vault may be configured to ignore this value and
impose a stricter limit.
lease_renewal_increment = 1h
[security.egress]
# Allow and deny lists can be used to control what hosts can be accessed based on
what a user can configure through the ui.
# This includes:
# - datasource requests
# - alerting channels
# a list of hostnames or IP adresses separated by spaces for which outgoing
requests will be blocked
host_deny_list =
# a list of hostnames or IP adresses separated by spaces for which requests will be
allowed, all other requests will be blocked
host_allow_list =
# a list of headers that will be stripped from outgoing datasource and alerting
requests
header_drop_list =
# a list of cookies that will be stripped from outgoing datasource requests
cookie_drop_list =
[security.encryption]
# Encryption algorithm used to encrypt secrets stored into the database and
cookies,
# possible values are aes-cfb and aes-gcm.
algorithm =
[caching.encryption]
# Setting 'enabled' to true enables encryption of the values in the cache.
enabled = false
# The key used for the encryption of the values in the cache. If it is not
specified and encryption is enabled, the key will be randomly
# generated on startup. This must be specified to allow the encrypted cache to
persist between Grafana restarts. If not specified, the cache
# will be cleared upon restarts.
encryption_key = ""
[caching.memory]
# When storing cache data, how often a background process will clean up stale data
from the in-memory cache
gc_interval = 1m
# The maximum size of the in-memory cache in megabytes. Once this size is reached,
new cache items will be rejected. For more flexible control over cache eviction
policies and size, please use the Redis or Memcached backend
# To disable the maximum, set this value to 0. WARNING: Disabling the maximum is
not recommended in production environments.
max_size_mb = 25
[caching.redis]
# url should be a redis URL
url = "redis://localhost:6379"
# prefix redis keys with this string. Example: 'grafana:<key>'. This value can be
left empty and no prefix will be set.
prefix = "grafana"
[caching.memcached]
# A space-separated list of memcached servers
memcached_servers = "localhost:11211"