diff --git a/LICENSE b/LICENSE index 951338e24..467ec5502 100644 --- a/LICENSE +++ b/LICENSE @@ -227,7 +227,6 @@ SECTION 1: Apache License, V2.0 >>> consul_exporter >>> elasticsearch_exporter >>> firehose_exporter - >>> grafana >>> Grafana Status Panel Plugin >>> grafana-diagram >>> grafana-exporter @@ -272,6 +271,7 @@ SECTION 4: BSD-3-Clause License SECTION 5: GNU Affero General Public License v3.0 >>> mysql_dashboards + >>> grafana SECTION 6: Python Software Foundation License Version 2 @@ -372,22 +372,6 @@ SoundCloud Ltd. (https://soundcloud.com/). Cloud Foundry Firehose Prometheus exporter Copyright 2016-Present Ferran Rodenas ->>> grafana - -Copyright 2014-2017 Torkel Ödegaard, Raintank Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you -may not use this file except in compliance with the License. You may -obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -implied. See the License for the specific language governing -permissions and limitations under the License. - >>> Grafana Status Panel Plugin Copyright 2016 Vonage Holdings Corp. @@ -1051,6 +1035,13 @@ End >>> mysql_dashboards +>>> grafana + +Copyright 2014-2021 Grafana Labs + +This software is based on Kibana: +Copyright 2012-2013 Elasticsearch BV + --------------- SECTION 6: Python Software Foundation License Version 2 ---------- >>> Python diff --git a/config/blobs.yml b/config/blobs.yml index 85fd815a3..13a315735 100644 --- a/config/blobs.yml +++ b/config/blobs.yml @@ -64,7 +64,7 @@ gperf/gperf-3.1.tar.gz: sha: e3c0618c2d2e5586eda9498c867d5e4858a3b0e2 grafana/grafana-9.5.1.linux-amd64.tar.gz: size: 78487778 - object_id: be9aa32e-833d-4c34-4671-f21d83c75142 + object_id: f847c659-596f-49cc-57cd-bafd3464bcc3 sha: sha256:d9b7505cdd4299c1835c36547ffe2e62d3b0ec7600dca2c644a0519572c9c387 grafana_plugins/flant-statusmap-panel-0.5.1.zip: size: 289519 diff --git a/jobs/grafana/monit b/jobs/grafana/monit index f3aebbc35..d3e5d2e8c 100644 --- a/jobs/grafana/monit +++ b/jobs/grafana/monit @@ -1,5 +1,5 @@ check process grafana - with pidfile /var/vcap/sys/run/grafana/grafana.pid - start program "/var/vcap/jobs/grafana/bin/grafana_ctl start" - stop program "/var/vcap/jobs/grafana/bin/grafana_ctl stop" + with pidfile /var/vcap/sys/run/bpm/grafana/grafana.pid + start program "/var/vcap/jobs/bpm/bin/bpm start grafana" + stop program "/var/vcap/jobs/bpm/bin/bpm stop grafana" group vcap diff --git a/jobs/grafana/spec b/jobs/grafana/spec index 435ad5cc1..a721e704f 100644 --- a/jobs/grafana/spec +++ b/jobs/grafana/spec @@ -7,7 +7,7 @@ packages: - grafana_jq templates: - bin/grafana_ctl: bin/grafana_ctl + bpm.yml.erb: config/bpm.yml bin/grafana-admin-password: bin/grafana-admin-password bin/grafana-homepage: bin/grafana-homepage bin/grafana-users: bin/grafana-users @@ -36,6 +36,9 @@ templates: config/smtp_cert.pem: config/smtp_cert.pem config/smtp_key.pem: config/smtp_key.pem config/license.jwt: config/license.jwt + config/jwt_key.pem: config/jwt_key.pem + config/grpc_server_cert.pem: config/grpc_server_cert.pem + config/grpc_server_key.pem: config/grpc_server_key.pem provides: - name: grafana @@ -57,6 +60,10 @@ consumes: properties: grafana.app_mode: description: "possible values : production, development" + grafana.instance_name: + description: "Set the name of the grafana-server instance. Used in logging, internal metrics, and clustering info" + grafana.force_migration: + description: "Force migration will run migrations that might cause data loss. Default is false" grafana.paths.temp_data_lifetime: description: "Temporary files in data directory older than given duration will be removed" @@ -86,6 +93,19 @@ properties: description: "SSL certificate (PEM encoded)" grafana.server.ssl_key: description: "SSL private key (PEM encoded)" + grafana.server.socket_gid: + description: "GID where the socket should be set when protocol=socket" + grafana.server.socket_mode: + description: "Mode where the socket should be set when protocol=socket" + grafana.server.cdn_url: + description: "Specify a full HTTP URL address to the root of your Grafana CDN assets" + grafana.server.read_timeout: + description: "Sets the maximum time using a duration format (5s/5m/5ms) before timing out read" + grafana.server.custom_response_headers: + description: "This setting enables you to specify additional headers that the server adds to HTTP(S) responses" + example: + exampleHeader1: exampleValue1 + exampleHeader2: exampleValue2 grafana.database.type: description: "Database Type, either 'mysql', 'postgres' or 'sqlite3'" @@ -126,33 +146,43 @@ properties: default: "database" grafana.remote_cache.connstr: description: "Connection string" + grafana.remote_cache.prefix: + description: "Prefix prepended to all the keys in the remote cache" + grafana.remote_cache.encryption: + description: "This enables encryption of values stored in the remote cache" - grafana.dataproxy.logging_enabled: - description: "Enable data proxy logging" - grafana.dataproxy.timeout: - description: "How long the data proxy should wait before timing out" - grafana.dataproxy.keep_alive_seconds: - description: "How many seconds the data proxy waits before sending a keepalive request" - grafana.dataproxy.tls_handshake_timeout_seconds: - description: "How many seconds the data proxy waits for a successful TLS Handshake before timing out" - grafana.dataproxy.expect_continue_timeout_seconds: - description: "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" - grafana.dataproxy.max_idle_connections: - description: "The maximum number of idle connections that Grafana will keep alive" - grafana.dataproxy.idle_conn_timeout_seconds: - description: "How many seconds the data proxy keeps an idle connection open before timing out" - - grafana.dataproxy.send_user_header: - description: "If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request" - + grafana.analytics.enabled: + description: "Enable the analytics feature" grafana.analytics.reporting_enabled: - description: "Change this option to false to disable reporting." + description: "Change this option to false to disable reporting" grafana.analytics.check_for_updates: description: "Set to false to disable all checks to https://grafana.net" + grafana.analytics.check_for_plugin_updates: + description: "Set to false disables checking for new versions of installed plugins from https://grafana.co" grafana.analytics.google_analytics_ua_id: description: "Google Analytics universal tracking code, only enabled if you specify an id here" grafana.analytics.google_tag_manager_id: description: "Google Tag Manager ID" + grafana.analytics.application_insights_connection_string: + description: "Application Insights connection string. Specify an URL string to enable this feature" + grafana.analytics.application_insights_endpoint_url: + description: "Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``" + grafana.analytics.feedback_links_enabled: + description: "Controls if the UI contains any links to user feedback forms" + grafana.analytics.google_analytics_4_id: + description: "Google Analytics 4 tracking code, only enabled if you specify an id here" + grafana.analytics.google_analytics_4_send_manual_page_views: + description: "When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc" + grafana.analytics.reporting_distributor: + description: "The name of the distributor of the Grafana instance. Ex hosted-grafana, grafana-labs" + grafana.analytics.rudderstack_config_url: + description: "Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config" + grafana.analytics.rudderstack_data_plane_url: + description: "Rudderstack data plane url, enabled only if rudderstack_write_key is also set" + grafana.analytics.rudderstack_sdk_url: + description: "Rudderstack SDK url, optional, only valid if rudderstack_write_key and rudderstack_data_plane_url is also set" + grafana.analytics.rudderstack_write_key: + description: "Rudderstack write key, enabled only if rudderstack_data_plane_url is also set" grafana.security.disable_initial_admin_creation: description: "Disable creation of admin user on first start of grafana" @@ -188,6 +218,23 @@ properties: grafana.security.x_xss_protection: description: "Set to true to enable the X-XSS-Protection header, which tells browsers to stop pages from loadingwhen they detect reflected cross-site scripting (XSS) attacks" + grafana.security.admin_email: + description: "Default admin email, created on startup" + grafana.security.angular_support_enabled: + description: "Controls if old angular plugins are supported or not. This will be disabled by default in future release" + grafana.security.available_encryption_providers: + description: "list of configured key providers, space separated (Enterprise only): e.g., awskms.v1 azurekv.v1" + grafana.security.content_security_policy: + description: "Enable adding the Content-Security-Policy header to your requests" + grafana.security.content_security_policy_report_only: + description: "Enable adding the Content-Security-Policy-Report-Only header to your requests" + grafana.security.content_security_policy_report_only_template: + description: "Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests" + grafana.security.content_security_policy_template: + description: "Set Content Security Policy template used when adding the Content-Security-Policy header to your requests" + + grafana.snapshots.enabled: + description: "set to false to remove snapshot functionality" grafana.snapshots.external_enabled: description: "Extenal snaphot enabled" grafana.snapshots.external_snapshot_url: @@ -199,10 +246,22 @@ properties: grafana.snapshots.remove_expired: description: "Remove expired snapshots" + grafana.support_bundles.enabled: + description: "Enable support bundle creation (default: true)" + grafana.support_bundles.server_admin_only: + description: "Only server admins can generate and view support bundles (default: true)" + grafana.support_bundles.public_keys: + description: "If set, bundles will be encrypted with the provided public keys separated by whitespace" + + grafana.storage.allow_unsanitized_svg_upload: + description: "Allow uploading SVG files without sanitization" + grafana.dashboards.versions_to_keep: description: "Number dashboard versions to keep (per dashboard)" grafana.dashboards.min_refresh_interval: description: "Minimum dashboard refresh interval" + grafana.dashboards.default_home_dashboard_path: + description: "Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + dashboards/home.json" grafana.users.allow_sign_up: description: "disable user signup / registration" @@ -240,6 +299,14 @@ properties: email: user@example.com login: user password: userpassword + grafana.users.default_language: + description: "Default UI language (supported IETF language tag, such as en-US)" + grafana.users.hidden_users: + description: "Enter a comma-separated list of usernames to hide them in the Grafana UI. These users are shown to Grafana admins and to themselves" + grafana.users.home_page: + description: "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" + grafana.users.user_invite_max_lifetime_duration: + description: "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)" grafana.auth.login_cookie_name: description: "Login cookie name" @@ -251,6 +318,8 @@ properties: description: "How often should auth tokens be rotated for authenticated users when being active" grafana.auth.disable_login_form: description: "Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false" + grafana.auth.disable_login: + description: "Disable usage of Grafana build-in login solution" grafana.auth.disable_signout_menu: description: "Set to true to disable the signout link in the side menu" grafana.auth.signout_redirect_url: @@ -263,6 +332,8 @@ properties: description: "Limit of api_key seconds to live before expiration" grafana.auth.sigv4_auth_enabled: description: "Set to true to enable SigV4 authentication option for HTTP-based datasources" + grafana.auth.sigv4_verbose_logging: + description: "Set to true to enable verbose logging of SigV4 request signing" grafana.auth.anonymous.enabled: description: "enable anonymous access" @@ -272,6 +343,10 @@ properties: description: "specify role for unauthenticated users" grafana.auth.anonymous.hide_version: description: "mask the Grafana version number for unauthenticated users" + grafana.auth.oauth_skip_org_role_update_sync: + description: "Skip forced assignment of OrgID 1 or 'auto_assign_org_id' for social logins" + grafana.auth.azure_auth_enabled: + description: "Set to true to enable Azure authentication option for HTTP-based datasources" grafana.auth.github.enabled: description: "Github auth enabled" @@ -295,6 +370,14 @@ properties: description: "Github auth team ids" grafana.auth.github.allowed_organizations: description: "Github auth allowed organizations" + grafana.auth.github.allow_assign_grafana_admin: + description: "Allow or not setting the Grafana Admin role from the external provider" + grafana.auth.github.auto_login: + description: "Set to true to attempt login automatically, skipping the login screen" + grafana.auth.github.role_attribute_path: + description: "JMESPath expression to extract role from id_token" + grafana.auth.github.role_attribute_strict: + description: "Denies user access if no role or an invalid role is returned" grafana.auth.gitlab.enabled: description: "Gitlab auth enabled" @@ -316,6 +399,16 @@ properties: description: "Gitlab auth allowed domains" grafana.auth.gitlab.allowed_groups: description: "Gitlab auth allowed groups" + grafana.auth.gitlab.allow_assign_grafana_admin: + description: "Allow or not setting the Grafana Admin role from the external provider" + grafana.auth.gitlab.auto_login: + description: "Set to true to attempt login automatically, skipping the login screen" + grafana.auth.gitlab.role_attribute_path: + description: "Gitlab auth role attribute path" + grafana.auth.gitlab.role_attribute_strict: + description: "Denies user access if no role or an invalid role is returned" + grafana.auth.gitlab.skip_org_role_sync: + description: "Prevents the synchronization of organization roles" grafana.auth.google.enabled: description: "Google auth enabled" @@ -337,6 +430,10 @@ properties: description: "Google auth allowed domains" grafana.auth.google.hosted_domain: description: "Google auth hosted domain" + grafana.auth.google.auto_login: + description: "Set to true to attempt login automatically, skipping the login screen" + grafana.auth.google.skip_org_role_sync: + description: "Prevents the synchronization of organization roles" grafana.auth.grafananet.enabled: description: "Grafana.net auth enabled" @@ -363,6 +460,10 @@ properties: description: "Grafana.net auth scopes" grafana.auth.grafanacom.allowed_organizations: description: "Grafana.net auth allowed organizations" + grafana.auth.grafanacom.auto_login: + description: "Set to true to attempt login automatically, skipping the login screen" + grafana.auth.grafanacom.skip_org_role_sync: + description: "Prevents the synchronization of organization roles" grafana.auth.azuread.name: description: "Azure AD auth name" @@ -384,6 +485,14 @@ properties: description: "Azure AD auth allowed domains" grafana.auth.azuread.allowed_groups: description: "Azure AD auth allowed groups" + grafana.auth.azuread.allow_assign_grafana_admin: + description: "Allow or not setting the Grafana Admin role from the external provider" + grafana.auth.azuread.auto_login: + description: "Set to true to attempt login automatically, skipping the login screen" + grafana.auth.azuread.force_use_graph_api: + description: "Set to true to force graph API" + grafana.auth.azuread.role_attribute_strict: + description: "Denies user access if no role or an invalid role is returned" grafana.auth.okta.name: description: "Okta auth name" @@ -409,6 +518,16 @@ properties: description: "Okta auth allowed groups" grafana.auth.okta.role_attribute_path: description: "Okta auth role attribute path" + grafana.auth.okta.allow_assign_grafana_admin: + description: "Allow or not setting the Grafana Admin role from the external provider" + grafana.auth.okta.auto_login: + description: "Set to true to attempt login automatically, skipping the login screen" + grafana.auth.okta.icon: + description: "Set OAuth icon" + grafana.auth.okta.role_attribute_strict: + description: "Denies user access if no role or an invalid role is returned" + grafana.auth.okta.skip_org_role_sync: + description: "Prevents the synchronization of organization roles" grafana.auth.generic_oauth.name: description: "Generic OAuth name" @@ -454,27 +573,26 @@ properties: description: "Generic OAuth TLS Client key" grafana.auth.generic_oauth.tls_skip_verify_insecure: description: "Generic OAuth TLS skip verification" - - grafana.auth.saml.enabled: - description: "Auth SAML enabled" - grafana.auth.saml.certificate: - description: "Base64-encoded public X.509 certificate. Used to sign requests to the IdP" - grafana.auth.saml.private_key: - description: "Base64-encoded private key. Used to decrypt assertions from the IdP" - grafana.auth.saml.idp_metadata: - description: "Base64-encoded IdP SAML metadata XML. Used to verify and obtain binding locations from the IdP" - grafana.auth.saml.idp_metadata_url: - description: "URL to fetch SAML IdP metadata. Used to verify and obtain binding locations from the IdP" - grafana.auth.saml.max_issue_delay: - description: "Duration, since the IdP issued a response and the SP is allowed to process it" - grafana.auth.saml.metadata_valid_duration: - description: "Duration, for how long the SP's metadata should be valid" - grafana.auth.saml.assertion_attribute_name: - description: "Friendly name or name of the attribute within the SAML assertion to use as the user's name" - grafana.auth.saml.assertion_attribute_login: - description: "Friendly name or name of the attribute within the SAML assertion to use as the user's login handle" - grafana.auth.saml.assertion_attribute_email: - description: "Friendly name or name of the attribute within the SAML assertion to use as the user's email" + grafana.auth.generic_oauth.allow_assign_grafana_admin: + description: "Allow or not setting the Grafana Admin role from the external provider" + grafana.auth.generic_oauth.auth_style: + description: "Controls which OAuth2 AuthStyle is used when token is requested from OAuth provider. It determines how client_id and client_secret are sent to Oauth provider. Available values are AutoDetect, InParams and InHeader" + grafana.auth.generic_oauth.auto_login: + description: "Set to true to attempt login automatically, skipping the login screen" + grafana.auth.generic_oauth.empty_scopes: + description: "Set empty_scopes to true to use an empty scope during authentication" + grafana.auth.generic_oauth.groups_attribute_path: + description: "JMESPath to extract groups from id_token and UserInfo" + grafana.auth.generic_oauth.icon: + description: "Set OAuth icon" + grafana.auth.generic_oauth.role_attribute_strict: + description: "Denies user access if no role or an invalid role is returned" + grafana.auth.generic_oauth.team_ids_attribute_path: + description: "JMESPath to extract teams from id_token and UserInfo" + grafana.auth.generic_oauth.teams_url: + description: "The JSON used for the path lookup is the HTTP response obtained from querying the Teams endpoint specified via the teams_url configuration option (using /teams as a fallback endpoint)" + grafana.auth.generic_oauth.use_pkce: + description: "IETF’s RFC 7636 introduces “proof key for code exchange” (PKCE) which introduces additional protection against some forms of authorization code interception attacks" grafana.auth.basic.enabled: description: "Auth basic enabled" @@ -495,6 +613,8 @@ properties: description: "Auth proxy headers" grafana.auth.proxy.enable_login_token: description: "Auth proxy enable login token" + grafana.auth.proxy.headers_encoded: + description: "Proxy encoded headers" grafana.auth.ldap.enabled: description: "Auth LDAP enable" @@ -503,9 +623,44 @@ properties: grafana.auth.ldap.allow_sign_up: description: "Auth LDAP allow sign up" grafana.auth.ldap.sync_cron: - description: LDAP backround sync (Enterprise only)" + description: "LDAP backround sync (Enterprise only)" grafana.auth.ldap.active_sync_enabled: description: "LDAP backround sync (Enterprise only)" + grafana.auth.ldap.skip_org_role_sync: + description: "Prevents the synchronization of organization roles" + + grafana.auth.jwt.enabled: + description: "Enable JWT login" + grafana.auth.jwt.allow_assign_grafana_admin: + description: "Allow or not setting the Grafana Admin role from the external provider" + grafana.auth.jwt.auto_sign_up: + description: "Auto-create users if they are not already matched" + grafana.auth.jwt.cache_ttl: + description: "JWT cache TTL" + grafana.auth.jwt.email_claim: + description: "Specify a claim to use as an email to sign in" + grafana.auth.jwt.enable_login_token: + description: "Set true to enable login token" + grafana.auth.jwt.expect_claims: + description: "This can be seen as a required subset of a JWT Claims Set" + grafana.auth.jwt.header_name: + description: "HTTP header to look into to get a JWT token" + grafana.auth.jwt.jwk_set_file: + description: "Key set in the same format as in JWKS endpoint but located on disk" + grafana.auth.jwt.jwk_set_url: + description: "Verify token using a JSON Web Key Set loaded from https endpoint" + grafana.auth.jwt.key_file: + description: "PEM-encoded key file in PKIX, PKCS #1, PKCS #8 or SEC 1 format." + grafana.auth.jwt.role_attribute_path: + description: "JWT auth role attribute path" + grafana.auth.jwt.role_attribute_strict: + description: "Denies user access if no role or an invalid role is returned" + grafana.auth.jwt.skip_org_role_sync: + description: "Prevents the synchronization of organization roles" + grafana.auth.jwt.url_login: + description: "search for a JWT in the URL query parameter auth_token and use it as the authentication token" + grafana.auth.jwt.username_claim: + description: "Specify a claim to use as a username to sign in" grafana.smtp.enabled: description: "SMTP enabled" @@ -532,6 +687,10 @@ properties: grafana.emails.welcome_email_on_sign_up: description: "Welcome email on sign up" + grafana.emails.content_types: + description: "Enter a comma-separated list of content types that should be included in the emails that are sent" + grafana.emails.templates_pattern: + description: "Enter a comma separated list of template patterns. Default is emails/*.html, emails/*.txt" grafana.log.mode: description: "Either 'console', 'file', 'syslog'. Use space to separate multiple modes" @@ -560,6 +719,29 @@ properties: grafana.log.file.max_days: description: "Expired days of log file(delete after max days)" + grafana.log.frontend.enabled: + description: "Should Sentry javascript agent be initialized" + grafana.log.frontend.api_key: + description: "Api Key, only applies to Grafana Javascript Agent provider" + grafana.log.frontend.custom_endpoint: + description: "Custom HTTP endpoint to send events to. Default will log the events to stdout" + grafana.log.frontend.instrumentations_console_enabled: + description: "Should console instrumentation be enabled, only affects Grafana Javascript Agent" + grafana.log.frontend.instrumentations_errors_enabled: + description: "Should error instrumentation be enabled, only affects Grafana Javascript Agent" + grafana.log.frontend.instrumentations_webvitals_enabled: + description: "Should webvitals instrumentation be enabled, only affects Grafana Javascript Agent" + grafana.log.frontend.log_endpoint_burst_limit: + description: "Max requests accepted per short interval of time for Grafana backend log ingestion endpoint (/log)" + grafana.log.frontend.log_endpoint_requests_per_second_limit: + description: "Requests per second limit enforced per an extended period, for Grafana backend log ingestion endpoint (/log)." + grafana.log.frontend.provider: + description: "Defines which provider to use sentry or grafana" + grafana.log.frontend.sample_rate: + description: "Rate of events to be reported to Sentry between 0 (none) and 1 (all), float" + grafana.log.frontend.sentry_dsn: + description: "Sentry DSN if you want to send events to Sentry" + grafana.log.syslog.level: description: "log level" grafana.log.syslog.format: @@ -569,7 +751,7 @@ properties: grafana.log.syslog.address: description: "Syslog address" grafana.log.syslog.facility: - description: "Syslog facility. user, daemon and local0 through local7 are valid." + description: "Syslog facility. user, daemon and local0 through local7 are valid" grafana.log.syslog.tag: description: "Syslog tag" @@ -598,6 +780,17 @@ properties: description: "global limit of api_keys" grafana.quota.global_session: description: "global limit on number of logged in users" + grafana.quota.global_alert_rule: + description: "global limit of alerts" + grafana.quota.global_file: + description: "global limit of files uploaded to the SQL DB" + grafana.quota.org_alert_rule: + description: "limit number of alerts per Org" + + grafana.rbac.permission_cache: + description: "If enabled, cache permissions in a in memory cache" + grafana.rbac.reset_basic_roles: + description: "Reset basic roles permissions on boot" grafana.alerting.enabled: description: "Enable alerting engine & UI featuresn" @@ -626,11 +819,14 @@ properties: description: "Configures how long dashboard annotations are stored" grafana.annotations.dashboard.max_annotations_to_keep: description: "Configures max number of dashboard annotations that Grafana stores" - grafana.annotations.api.max_age: description: "Configures how long Grafana stores API annotations" grafana.annotations.api.max_annotations_to_keep: description: "Configures max number of API annotations that Grafana keeps" + grafana.annotations.cleanupjob_batchsize: + description: "Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations" + grafana.annotations.tags_length: + description: "Enforces the maximum allowed length of the tags for any newly introduced annotations. It can be between 500 and 4096 inclusive (which is the respective's column length)" grafana.explore.enabled: description: "Enable the Explore section" @@ -641,6 +837,11 @@ properties: description: "Publish interval" grafana.metrics.disable_total_stats: description: "Disable total stats (stat_totals_*) metrics to be generated" + grafana.metrics.environment_info: + description: "Metrics environment info adds dimensions to the `grafana_environment_info` metric, which can expose more information about the Grafana instance" + example: + exampleLabel1: "exampleValue1" + exampleLabel2: "exampleValue2" grafana.metrics.basic_auth.username: description: "Basic auth username for the metrics endpoint" @@ -657,6 +858,8 @@ properties: grafana.grafana_com.url: description: "Url used to to import dashboards directly from Grafana.com" + grafana.grafana_com.api_url: + description: "Api URL" grafana.tracing.jaeger.address: description: "jaeger destination (ex localhost:6831)" @@ -670,6 +873,19 @@ properties: description: "Whether or not to use Zipkin span propagation (x-b3- HTTP headers)" grafana.tracing.jaeger.disable_shared_zipkin_spans: description: "Setting this to true disables shared RPC spans" + grafana.tracing.jaeger.sampling_server_url: + description: "Sampling_server_url is the URL of a sampling manager providing a sampling strategy." + + grafana.tracing.opentelemetry.custom_attributes: + description: "attributes that will always be included in when creating new spans. ex (key1:value1,key2:value2)" + grafana.tracing.opentelemetry.jaeger.address: + description: "jaeger destination (ex http://localhost:14268/api/traces)" + grafana.tracing.opentelemetry.jaeger.propagation: + description: "Propagation specifies the text map propagation format: w3c, jaeger" + grafana.tracing.opentelemetry.otlp.address: + description: "otlp destination (ex localhost:4317)" + grafana.tracing.opentelemetry.otlp.propagation: + description: "Propagation specifies the text map propagation format: w3c, jaeger" grafana.external_image_storage.provider: description: "Used for uploading images to public servers so they can be included in slack/email messages (s3, webdav, gcs, azure_blob, local)" @@ -706,6 +922,10 @@ properties: description: "GCS bucket" grafana.external_image_storage.gcs.path: description: "GCS path" + grafana.external_image_storage.gcs.enable_signed_urls: + description: "If set to true, Grafana creates a signed URL for the image uploaded to Google Cloud Storage" + grafana.external_image_storage.gcs.signed_url_expiration: + description: "Sets the signed URL expiration, which defaults to seven days." grafana.external_image_storage.azure.account_name: description: "Azure account name" @@ -713,6 +933,8 @@ properties: description: "Azure account key" grafana.external_image_storage.azure.container_name: description: "Azure container name" + grafana.external_image_storage.azure.sas_token_expiration_days: + description: "Number of days for SAS token validity. If specified SAS token will be attached to image URL. Allow storing images in private containers" grafana.rendering.server_url: description: "External image rendering server URL" @@ -720,6 +942,30 @@ properties: description: "External image rendering callback URL" grafana.rendering.concurrent_render_request_limit: description: "External image rendering concurrent render request limit" + grafana.rendering.renderer_token: + description: "An auth token that will be sent to and verified by the renderer" + grafana.rendering.render_key_lifetime: + description: "Determines the lifetime of the render key used by the image renderer to access and render Grafana" + + grafana.secure_socks_datasource_proxy.enabled: + description: "Enable feature secure socks5 datasource proxy" + grafana.secure_socks_datasource_proxy.client_cert: + description: "Socks datasource client certificate" + grafana.secure_socks_datasource_proxy.client_key: + description: "Socks datasource client key" + grafana.secure_socks_datasource_proxy.proxy_address: + description: "The address of the socks5 proxy datasources should connect to" + grafana.secure_socks_datasource_proxy.root_ca_cert: + description: "Socks datasource client CA certificate" + grafana.secure_socks_datasource_proxy.server_name: + description: "Socks datasource client server name" + + grafana.search.dashboard_loading_batch_size: + description: "Defines the number of dashboards loaded at once in a batch during a full reindex" + grafana.search.full_reindex_interval: + description: "Defines the frequency of a full search reindex" + grafana.search.index_update_interval: + description: "Defines the frequency of partial index updates based on recent changes such as dashboard updates" grafana.panels.enable_alpha: description: "Enable alpha panels" @@ -732,8 +978,14 @@ properties: description: "Skip verify insecure for app tls" grafana.plugins.allow_loading_unsigned_plugins: description: "Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature" - grafana.plugins.marketplace_url: - description: "Marketplace URL" + grafana.plugins.plugin_admin_enabled: + description: "Enable or disable installing / uninstalling / updating plugins directly from within Grafana." + grafana.plugins.plugin_admin_external_manage_enabled: + description: "Set to true if you want to enable external management of plugins. Default is false. This is only applicable to Grafana Cloud users" + grafana.plugins.plugin_catalog_hidden_plugins: + description: "Enter a comma-separated list of plugin identifiers to hide in the plugin catalog" + grafana.plugins.plugin_catalog_url: + description: "Custom install/learn more URL for enterprise plugins. Defaults to https://grafana.com/grafana/plugins/" grafana.plugin.grafana_image_renderer.rendering_timezone: description: "Instruct headless browser instance to use a default timezone when not provided by Grafana" @@ -767,6 +1019,8 @@ properties: description: "Change the listening host of the gRPC server" grafana.plugin.grafana_image_renderer.grpc_port: description: "Change the listening port of the gRPC server" + grafana.plugin.grafana_image_renderer.rendering_clustering_timeout: + description: "When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out" grafana.enterprise.license: description: "Enterprise license" @@ -793,6 +1047,98 @@ properties: grafana.date_formats.default_timezone: description: "Default timezone for user preferences" + grafana.aws.allowed_auth_providers: + description: "Enter a comma-separated list of allowed AWS authentication providers" + grafana.aws.assume_role_enabled: + description: "Allow AWS users to assume a role using temporary security credentials" + grafana.aws.list_metrics_page_limit: + description: "Specify max no of pages to be returned by the ListMetricPages API" + + grafana.azure.cloud: + description: "Azure cloud environment where Grafana is hosted: Possible values are AzureCloud, AzureChinaCloud, AzureUSGovernment and AzureGermanCloud" + grafana.azure.managed_identity_client_id: + description: "Client ID to use for user-assigned managed identity" + grafana.azure.managed_identity_enabled: + description: "Specifies whether Grafana hosted in Azure service with Managed Identity configured (e.g. Azure Virtual Machines instance)" + + grafana.dashboard_previews.crawler.max_crawl_duration: + description: "Maximum duration of a single crawl" + grafana.dashboard_previews.crawler.rendering_timeout: + description: "Timeout passed down to the Image Renderer plugin" + grafana.dashboard_previews.crawler.scheduler_interval: + description: "Minimum interval between two subsequent scheduler runs" + grafana.dashboard_previews.crawler.thread_count: + description: "Number of dashboards rendered in parallel" + + grafana.expressions.enabled: + description: "Enable or disable the expressions functionality" + + grafana.geomap.default_baselayer_config: + description: "Set the JSON configuration for the default basemap" + grafana.geomap.enable_custom_baselayers: + description: "Enable or disable loading other base map layers" + + grafana.help.enabled: + description: "Enable the Help section" + + grafana.live.allowed_origins: + description: "allowed_origins is a comma-separated list of origins that can establish connection with Grafana Live" + grafana.live.ha_engine: + description: "engine defines an HA (high availability) engine to use for Grafana Live" + grafana.live.ha_engine_address: + description: "ha_engine_address sets a connection address for Live HA engine" + grafana.live.max_connections: + description: "max_connections to Grafana Live WebSocket endpoint per Grafana server instance" + + grafana.profile.enabled: + description: "Enable the Profile section" + + grafana.query_history.enabled: + description: "Enable the Query history" + + grafana.unified_alerting.enabled: + description: "Enable the Unified Alerting sub-system and interface" + grafana.service_accounts.token_expiration_day_limit: + description: "When set, Grafana will not allow the creation of tokens with expiry greater than this setting" + grafana.unified_alerting.admin_config_poll_interval: + description: "Specify the frequency of polling for admin config changes" + grafana.unified_alerting.alertmanager_config_poll_interval: + description: "Specify the frequency of polling for Alertmanager config changes" + grafana.unified_alerting.disabled_orgs: + description: "Comma-separated list of organization IDs for which to disable unified alerting" + grafana.unified_alerting.evaluation_timeout: + description: "Alert evaluation timeout when fetching data from the datasource" + grafana.unified_alerting.execute_alerts: + description: "Enable or disable alerting rule execution. The alerting UI remains visible" + grafana.unified_alerting.ha_advertise_address: + description: "Explicit address/hostname and port to advertise other Grafana instances" + grafana.unified_alerting.ha_gossip_interval: + description: "The interval between sending gossip messages" + grafana.unified_alerting.ha_listen_address: + description: "Listen address/hostname and port to receive unified alerting messages for other Grafana instances" + grafana.unified_alerting.ha_peers: + description: "Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster" + grafana.unified_alerting.ha_peer_timeout: + description: "Time to wait for an instance to send a notification via the Alertmanager" + grafana.unified_alerting.ha_push_pull_interval: + description: "The interval between gossip full state syncs" + grafana.unified_alerting.max_attempts: + description: "Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation" + grafana.unified_alerting.min_interval: + description: "Minimum interval to enforce between rule evaluations" + grafana.unified_alerting.reserved_labels.disabled_labels: + description: "Comma-separated list of reserved labels added by the Grafana Alerting engine that should be disabled" + grafana.unified_alerting.screenshots.capture: + description: "Enable screenshots in notifications. This option requires the Grafana Image Renderer plugin" + grafana.unified_alerting.screenshots.capture_timeout: + description: "The timeout for capturing screenshots" + grafana.unified_alerting.screenshots.max_concurrent_screenshots: + description: "The maximum number of screenshots that can be taken at the same time" + grafana.unified_alerting.screenshots.upload_external_image_storage: + description: "Uploads screenshots to the local Grafana server or remote storage such as Azure, S3 and GCS" + grafana.unified_alerting.state_history.enabled: + description: "Enable the state history functionality in Unified Alerting" + grafana.prometheus.datasource_name: description: "Name of the Prometheus datasource" default: prometheus @@ -834,6 +1180,15 @@ properties: description: "List of datasources in YAML format that Grafana will add or update during start up" grafana.datasources.delete: description: "List of datasources in YAML format that Grafana will delete before inserting/updating those in create list" + grafana.datasources.datasource_limit: + description: "Set maximum number of datasources" + + grafana.sql_datasources.max_open_conns_default: + description: "maximum number of open connections maintained in the connection pool when connecting to SQL based data sources" + grafana.sql_datasources.max_idle_conns_default: + description: "maximum number of idle connections maintained in the connection pool when connecting to SQL based data sources" + grafana.sql_datasources.max_conn_lifetime_default: + description: "maximum connection lifetime used when connecting to SQL based data sources" env.http_proxy: description: "HTTP proxy to use" diff --git a/jobs/grafana/templates/bin/grafana_ctl b/jobs/grafana/templates/bin/grafana_ctl deleted file mode 100644 index fe485f565..000000000 --- a/jobs/grafana/templates/bin/grafana_ctl +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -set -eu - -RUN_DIR=/var/vcap/sys/run/grafana -LOG_DIR=/var/vcap/sys/log/grafana -TMP_DIR=/var/vcap/sys/tmp/grafana -STORE_DIR=/var/vcap/store/grafana -mkdir -p ${RUN_DIR} ${LOG_DIR} ${TMP_DIR} ${STORE_DIR} - -PIDFILE=${RUN_DIR}/grafana.pid - -source /var/vcap/packages/grafana/common/utils.sh -exec 1>> ${LOG_DIR}/$(basename "$0").stdout.log -exec 2>> ${LOG_DIR}/$(basename "$0").stderr.log - -export PATH=/var/vcap/packages/grafana/bin:${PATH} -export LD_LIBRARY_PATH=/var/vcap/packages/grafana/lib - -case $1 in - start) - pid_guard ${PIDFILE} "grafana" - - <% if_p('env.http_proxy') do |http_proxy| %> - export HTTP_PROXY="<%= http_proxy %>" - export http_proxy="<%= http_proxy %>" - <% end %> - <% if_p('env.https_proxy') do |https_proxy| %> - export HTTPS_PROXY="<%= https_proxy %>" - export https_proxy="<%= https_proxy %>" - <% end %> - <% if_p('env.no_proxy') do |no_proxy| %> - export NO_PROXY="<%= no_proxy %>" - export no_proxy="<%= no_proxy %>" - <% end %> - - ulimit -n 65536 - - exec grafana-server \ - -config=/var/vcap/jobs/grafana/config/grafana.ini \ - -homepath=/var/vcap/packages/grafana \ - -pidfile=${PIDFILE} \ - >> ${LOG_DIR}/grafana.stdout.log \ - 2>> ${LOG_DIR}/grafana.stderr.log - ;; - - stop) - kill_and_wait ${PIDFILE} - ;; - - *) - echo "Usage: $0 {start|stop}" - exit 1 - ;; - -esac -exit 0 diff --git a/jobs/grafana/templates/bpm.yml.erb b/jobs/grafana/templates/bpm.yml.erb new file mode 100644 index 000000000..3c696639b --- /dev/null +++ b/jobs/grafana/templates/bpm.yml.erb @@ -0,0 +1,35 @@ +<% +# program env variables +env = { + "LD_LIBRARY_PATH" => "/var/vcap/packages/grafana/lib", +} +# add proxies to env +[ "http", "https", "no" ].each do |key| + name = "#{key}_proxy" + if_p("env.#{name}") do |val| + env[name.upcase] = val + env[name] = val + end +end + +config = { + "processes" => [ + { + "name" => "grafana", + "executable" => "/var/vcap/packages/grafana/bin/grafana-server", + "env" => env, + "persistent_disk" => true, + "ephemeral_disk" => true, + "args" => [ + "-config", "/var/vcap/jobs/grafana/config/grafana.ini", + "-homepath", "/var/vcap/packages/grafana", + ], + "limits" => { + "open_files" => 65536 + } + } + ] +} +%> + +<%= YAML.dump(config) %> diff --git a/jobs/grafana/templates/config/grafana.ini b/jobs/grafana/templates/config/grafana.ini index d195395fb..f85092526 100644 --- a/jobs/grafana/templates/config/grafana.ini +++ b/jobs/grafana/templates/config/grafana.ini @@ -8,6 +8,16 @@ app_mode = <%= app_mode %> <% end %> +<% if_p('grafana.instance_name') do |instance_name| %> +# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty +instance_name = <%= instance_name %> +<% end %> + +<% if_p('grafana.force_migration') do |force_migration| %> +# force migration will run migrations that might cause dataloss +force_migration = <%= force_migration %> +<% end %> + #################################### Paths #################################### [paths] # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) @@ -30,7 +40,7 @@ provisioning = /var/vcap/jobs/grafana/config/provisioning #################################### Server #################################### [server] <% if_p('grafana.server.protocol') do |protocol| %> -# Protocol (http or https) +# Protocol (http, https, h2, socket) protocol = <%= protocol %> <% end %> @@ -84,9 +94,61 @@ cert_file = /var/vcap/jobs/grafana/config/ssl_cert.pem cert_key = /var/vcap/jobs/grafana/config/ssl_key.pem <% end %> +<% if_p('grafana.server.socket_gid') do |socket_gid| %> +# Unix socket gid +# Changing the gid of a file without privileges requires that the target group is in the group of the process and that the process is the file owner +# It is recommended to set the gid as http server user gid +# Not set when the value is -1 +socket_gid = <%= socket_gid %> +<% end %> + +<% if_p('grafana.server.socket_mode') do |socket_mode| %> +# Unix socket mode +socket_mode = <%= socket_mode %> +<% end %> + # Unix socket path socket = /var/vcap/sys/run/grafana/grafana.sock +<% if_p('grafana.server.cdn_url') do |cdn_url| %> +# CDN Url +cdn_url = <%= cdn_url %> +<% end %> + +<% if_p('grafana.server.read_timeout') do |read_timeout| %> +# 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 = <%= read_timeout %> +<% end %> + +# This setting enables you to specify additional headers that the server adds to HTTP(S) responses. +[server.custom_response_headers] +#exampleHeader1 = exampleValue1 +#exampleHeader2 = exampleValue2 +<% p('grafana.server.custom_response_headers', {}).each do |key,value| %> +<%= key %> = <%= value %> +<% end %> + +#################################### GRPC Server ######################### +[grpc_server] +<% if_p('grafana.grpc_server.network') do |network| %> +network = <%= network %> +<% end %> + +<% if_p('grafana.grpc_server.address') do |address| %> +address = <%= address %> +<% end %> + +<% if_p('grafana.grpc_server.use_tls') do |use_tls| %> +use_tls = <%= use_tls %> +<% end %> + +<% if_p('grafana.grpc_server.cert_file', 'grafana.grpc_server.cert_key') do %> +# certs & key file +cert_file = /var/vcap/jobs/grafana/config/grpc_server_cert.pem +cert_key = /var/vcap/jobs/grafana/config/grpc_server_key.pem +<% end %> + #################################### Database #################################### [database] # Either "mysql", "postgres" or "sqlite3", it's your choice @@ -181,54 +243,29 @@ connstr = <%= p('grafana.remote_cache.connstr') %> <% else raise "Remote cache type #{p('grafana.remote_cache.type')} not supported" %> <% end %> -#################################### Data proxy ########################### -[dataproxy] - -<% if_p('grafana.dataproxy.logging_enabled') do |logging_enabled| %> -# This enables data proxy logging, default is false -logging = <%= logging_enabled %> -<% end %> - -<% if_p('grafana.dataproxy.timeout') do |timeout| %> -# How long the data proxy should wait before timing out default is 30 (seconds) -timeout = <%= timeout %> -<% end %> - -<% if_p('grafana.dataproxy.keep_alive_seconds') do |keep_alive_seconds| %> -# How many seconds the data proxy waits before sending a keepalive request. -keep_alive_seconds = <%= keep_alive_seconds %> -<% end %> - -<% if_p('grafana.dataproxy.tls_handshake_timeout_seconds') do |tls_handshake_timeout_seconds| %> -# How many seconds the data proxy waits for a successful TLS Handshake before timing out. -tls_handshake_timeout_seconds = <%= tls_handshake_timeout_seconds %> +<% if_p('grafana.remote_cache.prefix') do |prefix| %> +# prefix prepended to all the keys in the remote cache +prefix = <%= prefix %> <% end %> -<% if_p('grafana.dataproxy.expect_continue_timeout_seconds') do |expect_continue_timeout_seconds| %> -# 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 = <%= expect_continue_timeout_seconds %> +<% if_p('grafana.remote_cache.encryption') do |encryption| %> +# This enables encryption of values stored in the remote cache +encryption = <%= encryption %> <% end %> -<% if_p('grafana.dataproxy.max_idle_connections') do |max_idle_connections| %> -# The maximum number of idle connections that Grafana will keep alive. -max_idle_connections = <%= max_idle_connections %> +<% if_p('grafana.remote_cache.user_agent') do |user_agent| %> +# Sets a custom value for the `User-Agent` header for outgoing data proxy requests. If empty, the default value is `Grafana/` (for example `Grafana/9.0.0`). +user_agent = <%= encryption %> <% end %> -<% if_p('grafana.dataproxy.idle_conn_timeout_seconds') do |idle_conn_timeout_seconds| %> -# How many seconds the data proxy keeps an idle connection open before timing out. -idle_conn_timeout_seconds = <%= idle_conn_timeout_seconds %> -<% end %> +#################################### Analytics #################################### -<% if_p('grafana.dataproxy.send_user_header') do |send_user_header| %> -# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false. -send_user_header = <%= send_user_header %> +[analytics] +<% if_p('grafana.analytics.enabled') do |enabled| %> +# Enable the analytics feature +enabled = <%= enabled %> <% end %> -#################################### Analytics #################################### -[analytics] <% if_p('grafana.analytics.reporting_enabled') do |reporting_enabled| %> # Server reporting, sends usage counters to stats.grafana.org every 24 hours. # No ip addresses are being tracked, only simple counters to track @@ -237,25 +274,84 @@ send_user_header = <%= send_user_header %> reporting_enabled = <%= reporting_enabled %> <% end %> +<% if_p('grafana.analytics.reporting_distributor') do |reporting_distributor| %> +# The name of the distributor of the Grafana instance. Ex hosted-grafana, grafana-labs +reporting_distributor = <%= reporting_distributor %> +<% end %> + <% if_p('grafana.analytics.check_for_updates') do |check_for_updates| %> -# Set to false to disable all checks to https://grafana.net -# for new vesions (grafana itself and plugins), check is used -# in some UI views to notify that grafana or plugin update exists +# Set to false to disable all checks to https://grafana.com +# for new versions of grafana. The check is used +# in some UI views to notify that a grafana update exists. # This option does not cause any auto updates, nor send any information -# only a GET request to http://grafana.net to get latest versions +# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version. check_for_updates = <%= check_for_updates %> <% end %> +<% if_p('grafana.analytics.check_for_plugin_updates') do |check_for_plugin_updates| %> +# Set to false to disable all checks to https://grafana.com +# for new versions of plugins. The check is used +# in some UI views to notify that a plugin update exists. +# This option does not cause any auto updates, nor send any information +# only a GET request to https://grafana.com to get the latest versions. +check_for_plugin_updates = <%= check_for_plugin_updates %> +<% end %> + <% if_p('grafana.analytics.google_analytics_ua_id') do |google_analytics_ua_id| %> # Google Analytics universal tracking code, only enabled if you specify an id here google_analytics_ua_id = <%= google_analytics_ua_id %> <% end %> +<% if_p('grafana.analytics.google_analytics_4_id') do |google_analytics_4_id| %> +# Google Analytics 4 tracking code, only enabled if you specify an id here +google_analytics_4_id = <%= google_analytics_4_id %> +<% end %> + +<% if_p('grafana.analytics.google_analytics_4_send_manual_page_views') do |google_analytics_4_send_manual_page_views| %> +# When Google Analytics 4 Enhanced event measurement is enabled, we will try to avoid sending duplicate events and let Google Analytics 4 detect navigation changes, etc. +google_analytics_4_send_manual_page_views = <%= google_analytics_4_send_manual_page_views %> +<% end %> + <% if_p('grafana.analytics.google_tag_manager_id') do |google_tag_manager_id| %> # Google Tag Manager ID, only enabled if you specify an id here google_tag_manager_id = <%= google_tag_manager_id %> <% end %> +<% if_p('grafana.analytics.rudderstack_write_key') do |rudderstack_write_key| %> +# Rudderstack write key, enabled only if rudderstack_data_plane_url is also set +rudderstack_write_key = <%= rudderstack_write_key %> +<% end %> + +<% if_p('grafana.analytics.rudderstack_data_plane_url') do |rudderstack_data_plane_url| %> +# Rudderstack data plane url, enabled only if rudderstack_write_key is also set +rudderstack_data_plane_url = <%= rudderstack_data_plane_url %> +<% end %> + +<% if_p('grafana.analytics.rudderstack_sdk_url') do |rudderstack_sdk_url| %> +# Rudderstack SDK url, optional, only valid if rudderstack_write_key and rudderstack_data_plane_url is also set +rudderstack_sdk_url = <%= rudderstack_sdk_url %> +<% end %> + +<% if_p('grafana.analytics.rudderstack_config_url') do |rudderstack_config_url| %> +# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config +rudderstack_config_url = <%= rudderstack_config_url %> +<% end %> + +<% if_p('grafana.analytics.application_insights_connection_string') do |application_insights_connection_string| %> +# Application Insights connection string. Specify an URL string to enable this feature. +application_insights_connection_string = <%= application_insights_connection_string %> +<% end %> + +<% if_p('grafana.analytics.application_insights_endpoint_url') do |application_insights_endpoint_url| %> +# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``. +application_insights_endpoint_url = <%= application_insights_endpoint_url %> +<% end %> + +<% if_p('grafana.analytics.feedback_links_enabled') do |feedback_links_enabled| %> +# Controls if the UI contains any links to user feedback forms +feedback_links_enabled = <%= feedback_links_enabled %> +<% end %> + #################################### Security #################################### [security] <% if_p('grafana.security.disable_initial_admin_creation') do |disable_initial_admin_creation| %> @@ -269,11 +365,26 @@ admin_user = <%= p('grafana.security.admin_user') %> # default admin password, can be changed before first start of grafana, or in profile settings admin_password = <%= p('grafana.security.admin_password') %> +<% if_p('grafana.security.admin_email') do |admin_email| %> +# default admin email, created on startup +admin_email = <%= admin_email %> +<% end %> + <% if_p('grafana.security.secret_key') do |secret_key| %> # used for signing secret_key = <%= secret_key %> <% end %> +<% if_p('grafana.security.encryption_provider') do |encryption_provider| %> +# current key provider used for envelope encryption, default to static value specified by secret_key +encryption_provider = <%= encryption_provider %> +<% end %> + +<% if_p('grafana.security.available_encryption_providers') do |available_encryption_providers| %> +# list of configured key providers, space separated (Enterprise only): e.g., awskms.v1 azurekv.v1 +available_encryption_providers = <%= available_encryption_providers %> +<% end %> + <% if_p('grafana.security.disable_gravatar') do |disable_gravatar| %> # disable gravatar profile images disable_gravatar = <%= disable_gravatar %> @@ -295,7 +406,7 @@ cookie_secure = <%= cookie_secure %> <% end %> <% if_p('grafana.security.cookie_samesite') do |cookie_samesite| %> -# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict" and "none" +# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict", "none" and "disabled" cookie_samesite = <%= cookie_samesite %> <% end %> @@ -306,13 +417,11 @@ allow_embedding = <%= allow_embedding %> <% if_p('grafana.security.strict_transport_security') do |strict_transport_security| %> # 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. -# The default will change to true in the next minor release, 6.3. strict_transport_security = <%= strict_transport_security %> <% end %> -<% if_p('grafana.security.cstrict_transport_security_max_age_seconds') do |strict_transport_security_max_age_seconds| %> +<% if_p('grafana.security.strict_transport_security_max_age_seconds') do |strict_transport_security_max_age_seconds| %> # Sets how long a browser should cache HSTS. Only applied if strict_transport_security is enabled. strict_transport_security_max_age_seconds = <%= strict_transport_security_max_age_seconds %> <% end %> @@ -330,18 +439,67 @@ strict_transport_security_subdomains = <%= strict_transport_security_subdomains <% if_p('grafana.security.x_content_type_options') do |x_content_type_options| %> # Set to true to enable the X-Content-Type-Options response header. # The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised -# in the Content-Type headers should not be changed and be followed. The default will change to true in the next minor release, 6.3. +# in the Content-Type headers should not be changed and be followed. x_content_type_options = <%= x_content_type_options %> <% end %> <% if_p('grafana.security.x_xss_protection') do |x_xss_protection| %> # 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. The default will change to true in the next minor release, 6.3. +# when they detect reflected cross-site scripting (XSS) attacks. x_xss_protection = <%= x_xss_protection %> <% end %> +<% if_p('grafana.security.content_security_policy') do |content_security_policy| %> +# Enable adding the Content-Security-Policy header to your requests. +# CSP allows to control resources the user agent is allowed to load and helps prevent XSS attacks. +content_security_policy = <%= content_security_policy %> +<% end %> + +<% if_p('grafana.security.content_security_policy_template') do |content_security_policy_template| %> +# 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 = <%= content_security_policy_template %> +<% end %> + +<% if_p('grafana.security.content_security_policy_report_only') do |content_security_policy_report_only| %> +# Enable adding the Content-Security-Policy-Report-Only header to your requests. +# Allows you to monitor the effects of a policy without enforcing it. +content_security_policy_report_only = <%= content_security_policy_report_only %> +<% end %> + +<% if_p('grafana.security.content_security_policy_report_only_template') do |content_security_policy_report_only_template| %> +# Set Content Security Policy Report Only template used when adding the Content-Security-Policy-Report-Only header to your requests. +# $NONCE in the template includes a random nonce. +# $ROOT_PATH is server.root_url without the protocol. +content_security_policy_report_only_template = <%= content_security_policy_report_only_template %> +<% end %> + +<% if_p('grafana.security.angular_support_enabled') do |angular_support_enabled| %> +# Controls if old angular plugins are supported or not. This will be disabled by default in future release +angular_support_enabled = <%= angular_support_enabled %> +<% end %> + +[security.encryption] +<% if_p('grafana.security.encryption.data_keys_cache_ttl') do |data_keys_cache_ttl| %> +# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache). +# Please note that small values may cause performance issues due to a high frequency decryption operations. +data_keys_cache_ttl = <%= data_keys_cache_ttl %> +<% end %> + +<% if_p('grafana.security.encryption.data_keys_cache_cleanup_interval') do |data_keys_cache_cleanup_interval| %> +# Defines the frequency of data encryption keys cache cleanup interval. +# On every interval, decrypted data encryption keys that reached the TTL are removed from the cache. +data_keys_cache_cleanup_interval = <%= data_keys_cache_cleanup_interval %> +<% end %> + #################################### Snapshots ########################### [snapshots] +<% if_p('grafana.snapshots.enabled') do |enabled| %> +# set to false to remove snapshot functionality +enabled = <%= enabled %> +<% end %> + <% if_p('grafana.snapshots.external_enabled', 'grafana.snapshots.external_snapshot_url', 'grafana.snapshots.external_snapshot_name') do |external_enabled, external_snapshot_url, external_snapshot_name| %> # snapshot sharing options external_enabled = <%= external_enabled %> @@ -373,6 +531,39 @@ versions_to_keep = <%= versions_to_keep %> min_refresh_interval = <%= min_refresh_interval %> <% end %> +<% if_p('grafana.dashboards.default_home_dashboard_path') do |default_home_dashboard_path| %> +# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json" +default_home_dashboard_path = <%= default_home_dashboard_path %> +<% end %> + +################################### Data sources ######################### +[datasources] +<% if_p('grafana.datasources.datasource_limit') do |datasource_limit| %> +# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API. +datasource_limit = <%= datasource_limit %> +<% end %> + + +################################### Data sources ######################### +[sql_datasources] +<% if_p('grafana.sql_datasources.max_open_conns_default') do |max_open_conns_default| %> +# Default maximum number of open connections maintained in the connection pool +# when connecting to SQL based data sources +max_open_conns_default = <%= max_open_conns_default %> +<% end %> + +<% if_p('grafana.sql_datasources.max_idle_conns_default') do |max_idle_conns_default| %> +# Default maximum number of idle connections maintained in the connection pool +# when connecting to SQL based data sources +max_idle_conns_default = <%= max_idle_conns_default %> +<% end %> + +<% if_p('grafana.sql_datasources.max_conn_lifetime_default') do |max_conn_lifetime_default| %> +# Default maximum connection lifetime used when connecting +# to SQL based data sources. +max_conn_lifetime_default = <%= max_conn_lifetime_default %> +<% end %> + #################################### Users #################################### [users] <% if_p('grafana.users.allow_sign_up') do |allow_sign_up| %> @@ -396,7 +587,7 @@ auto_assign_org_id = <%= auto_assign_org_id %> <% end %> <% if_p('grafana.users.auto_assign_org_role') do |auto_assign_org_role| %> -# Default role new users will be automatically assigned (if disabled above is set to true) +# Default role new users will be automatically assigned (if auto_assign_org above is set to true) auto_assign_org_role = <%= auto_assign_org_role %> <% end %> @@ -416,10 +607,20 @@ password_hint = <%= password_hint %> <% end %> <% if_p('grafana.users.default_theme') do |default_theme| %> -# Default UI theme ("dark" or "light") +# Default UI theme ("dark" or "light" or "system") default_theme = <%= default_theme %> <% end %> +<% if_p('grafana.users.default_language') do |default_language| %> +# Default UI language (supported IETF language tag, such as en-US) +default_language = <%= default_language %> +<% end %> + +<% if_p('grafana.users.home_page') do |home_page| %> +# 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 = <%= home_page %> +<% end %> + # External user management <% if_p('grafana.users.external_manage_link_url') do |external_manage_link_url| %> external_manage_link_url = <%= external_manage_link_url %> @@ -441,12 +642,33 @@ viewers_can_edit = <%= viewers_can_edit %> editors_can_admin = <%= editors_can_admin %> <% end %> +<% if_p('grafana.users.user_invite_max_lifetime_duration') do |user_invite_max_lifetime_duration| %> +# 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 = <%= user_invite_max_lifetime_duration %> +<% end %> + +<% if_p('grafana.users.hidden_users') do |hidden_users| %> +# 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 = <%= hidden_users %> +<% end %> + +[service_accounts] +<% if_p('grafana.service_accounts.token_expiration_day_limit') do |token_expiration_day_limit| %> +# When set, Grafana will not allow the creation of tokens with expiry greater than this setting. +token_expiration_day_limit = <%= token_expiration_day_limit %> +<% end %> + [auth] <% if_p('grafana.auth.login_cookie_name') do |login_cookie_name| %> # Login cookie name login_cookie_name = <%= login_cookie_name %> <% end %> +<% if_p('grafana.auth.disable_login') do |disable_login| %> +# Disable usage of Grafana build-in login solution. +disable_login = <%= disable_login %> +<% end %> + <% if_p('grafana.auth.login_maximum_inactive_lifetime_duration') do |login_maximum_inactive_lifetime_duration| %> # The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes). login_maximum_inactive_lifetime_duration = <%= login_maximum_inactive_lifetime_duration %> @@ -463,12 +685,12 @@ token_rotation_interval_minutes = <%= token_rotation_interval_minutes %> <% end %> <% if_p('grafana.auth.disable_login_form') do |disable_login_form| %> -# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false +# Set to true to disable (hide) the login form, useful if you use OAuth disable_login_form = <%= disable_login_form %> <% end %> <% if_p('grafana.auth.disable_signout_menu') do |disable_signout_menu| %> -# Set to true to disable the signout link in the side menu. useful if you use auth.proxy +# 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 = <%= disable_signout_menu %> <% end %> @@ -480,14 +702,20 @@ signout_redirect_url = <%= signout_redirect_url %> <% if_p('grafana.auth.oauth_auto_login') do |oauth_auto_login| %> # Set to true to attempt login with OAuth automatically, skipping the login screen. # This setting is ignored if multiple OAuth providers are configured. +# Deprecated, use auto_login option for specific provider instead. oauth_auto_login = <%= oauth_auto_login %> <% end %> <% if_p('grafana.auth.oauth_state_cookie_max_age') do |oauth_state_cookie_max_age| %> -# OAuth state max age cookie duration. Defaults to 60 seconds. +# OAuth state max age cookie duration in seconds. Defaults to 600 seconds. oauth_state_cookie_max_age = <%= oauth_state_cookie_max_age %> <% end %> +<% if_p('grafana.auth.oauth_skip_org_role_update_sync') do |oauth_skip_org_role_update_sync| %> +# Skip forced assignment of OrgID 1 or 'auto_assign_org_id' for social logins +oauth_skip_org_role_update_sync = <%= oauth_skip_org_role_update_sync %> +<% end %> + <% if_p('grafana.auth.api_key_max_seconds_to_live') do |api_key_max_seconds_to_live| %> # limit of api_key seconds to live before expiration api_key_max_seconds_to_live = <%= api_key_max_seconds_to_live %> @@ -498,6 +726,16 @@ api_key_max_seconds_to_live = <%= api_key_max_seconds_to_live %> sigv4_auth_enabled = <%= sigv4_auth_enabled %> <% end %> +<% if_p('grafana.auth.sigv4_verbose_logging') do |sigv4_verbose_logging| %> +# Set to true to enable verbose logging of SigV4 request signing +sigv4_verbose_logging = <%= sigv4_verbose_logging %> +<% end %> + +<% if_p('grafana.auth.azure_auth_enabled') do |azure_auth_enabled| %> +# Set to true to enable Azure authentication option for HTTP-based datasources +azure_auth_enabled = <%= azure_auth_enabled %> +<% end %> + #################################### Anonymous Auth ########################## [auth.anonymous] <% if_p('grafana.auth.anonymous.enabled') do |enabled| %> @@ -530,6 +768,10 @@ enabled = <%= enabled %> allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.github.auto_login') do |auto_login| %> +auto_login = <%= auto_login %> +<% end %> + <% if_p('grafana.auth.github.client_id') do |client_id| %> client_id = <%= client_id %> <% end %> @@ -566,6 +808,18 @@ team_ids = <%= team_ids %> allowed_organizations = <%= allowed_organizations %> <% end %> +<% if_p('grafana.auth.github.role_attribute_path') do |role_attribute_path| %> +role_attribute_path = <%= role_attribute_path %> +<% end %> + +<% if_p('grafana.auth.github.role_attribute_strict') do |role_attribute_strict| %> +role_attribute_strict = <%= role_attribute_strict %> +<% end %> + +<% if_p('grafana.auth.github.allow_assign_grafana_admin') do |allow_assign_grafana_admin| %> +allow_assign_grafana_admin = <%= allow_assign_grafana_admin %> +<% end %> + #################################### GitLab Auth ######################### [auth.gitlab] <% if_p('grafana.auth.gitlab.enabled') do |enabled| %> @@ -576,6 +830,10 @@ enabled = <%= enabled %> allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.gitlab.auto_login') do |auto_login| %> +auto_login = <%= auto_login %> +<% end %> + <% if_p('grafana.auth.gitlab.client_id') do |client_id| %> client_id = <%= client_id %> <% end %> @@ -608,6 +866,22 @@ allowed_domains = <%= allowed_domains %> allowed_groups = <%= allowed_groups %> <% end %> +<% if_p('grafana.auth.gitlab.role_attribute_path') do |role_attribute_path| %> +role_attribute_path = <%= role_attribute_path %> +<% end %> + +<% if_p('grafana.auth.gitlab.role_attribute_strict') do |role_attribute_strict| %> +role_attribute_strict = <%= role_attribute_strict %> +<% end %> + +<% if_p('grafana.auth.gitlab.allow_assign_grafana_admin') do |allow_assign_grafana_admin| %> +allow_assign_grafana_admin = <%= allow_assign_grafana_admin %> +<% end %> + +<% if_p('grafana.auth.gitlab.skip_org_role_sync') do |skip_org_role_sync| %> +skip_org_role_sync = <%= skip_org_role_sync %> +<% end %> + #################################### Google Auth ########################## [auth.google] <% if_p('grafana.auth.google.enabled') do |enabled| %> @@ -618,6 +892,10 @@ enabled = <%= enabled %> allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.google.auto_login') do |auto_login| %> +auto_login = <%= auto_login %> +<% end %> + <% if_p('grafana.auth.google.client_id') do |client_id| %> client_id = <%= client_id %> <% end %> @@ -650,7 +928,12 @@ allowed_domains = <%= allowed_domains %> hosted_domain = <%= hosted_domain %> <% end %> +<% if_p('grafana.auth.google.skip_org_role_sync') do |skip_org_role_sync| %> +skip_org_role_sync = <%= skip_org_role_sync %> +<% end %> + #################################### Grafana.net Auth #################### +# legacy key names (so they work in env variables) [auth.grafananet] <% if_p('grafana.auth.grafananet.enabled') do |enabled| %> enabled = <%= enabled %> @@ -686,6 +969,10 @@ enabled = <%= enabled %> allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.grafanacom.auto_login') do |auto_login| %> +auto_login = <%= auto_login %> +<% end %> + <% if_p('grafana.auth.grafanacom.client_id') do |client_id| %> client_id = <%= client_id %> <% end %> @@ -702,6 +989,10 @@ scopes = <%= scopes %> allowed_organizations = <%= allowed_organizations %> <% end %> +<% if_p('grafana.auth.grafanacom.skip_org_role_sync') do |skip_org_role_sync| %> +skip_org_role_sync = <%= skip_org_role_sync %> +<% end %> + #################################### Azure AD OAuth ####################### [auth.azuread] <% if_p('grafana.auth.azuread.name') do |name| %> @@ -716,6 +1007,10 @@ enabled = <%= enabled %> allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.azuread.auto_login') do |auto_login| %> +auto_login = <%= auto_login %> +<% end %> + <% if_p('grafana.auth.azuread.client_id') do |client_id| %> client_id = <%= client_id %> <% end %> @@ -744,12 +1039,28 @@ allowed_domains = <%= allowed_domains %> allowed_groups = <%= allowed_groups %> <% end %> +<% if_p('grafana.auth.azuread.role_attribute_strict') do |role_attribute_strict| %> +role_attribute_strict = <%= role_attribute_strict %> +<% end %> + +<% if_p('grafana.auth.azuread.allow_assign_grafana_admin') do |allow_assign_grafana_admin| %> +allow_assign_grafana_admin = <%= allow_assign_grafana_admin %> +<% end %> + +<% if_p('grafana.auth.azuread.force_use_graph_api') do |force_use_graph_api| %> +force_use_graph_api = <%= force_use_graph_api %> +<% end %> + #################################### Okta OAuth ####################### [auth.okta] <% if_p('grafana.auth.okta.name') do |name| %> name = <%= name %> <% end %> +<% if_p('grafana.auth.okta.icon') do |icon| %> +icon = <%= icon %> +<% end %> + <% if_p('grafana.auth.okta.enabled') do |enabled| %> enabled = <%= enabled %> <% end %> @@ -758,6 +1069,10 @@ enabled = <%= enabled %> allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.okta.auto_login') do |auto_login| %> +auto_login = <%= auto_login %> +<% end %> + <% if_p('grafana.auth.okta.client_id') do |client_id| %> client_id = <%= client_id %> <% end %> @@ -794,12 +1109,28 @@ allowed_groups = <%= allowed_groups %> role_attribute_path = <%= role_attribute_path %> <% end %> +<% if_p('grafana.auth.okta.role_attribute_strict') do |role_attribute_strict| %> +role_attribute_strict = <%= role_attribute_strict %> +<% end %> + +<% if_p('grafana.auth.okta.allow_assign_grafana_admin') do |allow_assign_grafana_admin| %> +allow_assign_grafana_admin = <%= allow_assign_grafana_admin %> +<% end %> + +<% if_p('grafana.auth.okta.skip_org_role_sync') do |skip_org_role_sync| %> +skip_org_role_sync = <%= skip_org_role_sync %> +<% end %> + #################################### Generic OAuth ########################## [auth.generic_oauth] <% if_p('grafana.auth.generic_oauth.name') do |name| %> name = <%= name %> <% end %> +<% if_p('grafana.auth.generic_oauth.icon') do |icon| %> +icon = <%= icon %> +<% end %> + <% if_p('grafana.auth.generic_oauth.enabled') do |enabled| %> enabled = <%= enabled %> <% end %> @@ -808,6 +1139,10 @@ enabled = <%= enabled %> allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.generic_oauth.auto_login') do |auto_login| %> +auto_login = <%= auto_login %> +<% end %> + <% if_p('grafana.auth.generic_oauth.client_id') do |client_id| %> client_id = <%= client_id %> <% end %> @@ -820,6 +1155,10 @@ client_secret = <%= client_secret %> scopes = <%= scopes %> <% end %> +<% if_p('grafana.auth.generic_oauth.empty_scopes') do |empty_scopes| %> +empty_scopes = <%= empty_scopes %> +<% end %> + <% if_p('grafana.auth.generic_oauth.email_attribute_name') do |email_attribute_name| %> email_attribute_name = <%= email_attribute_name %> <% end %> @@ -840,10 +1179,22 @@ name_attribute_path = <%= name_attribute_path %> role_attribute_path = <%= role_attribute_path %> <% end %> +<% if_p('grafana.auth.generic_oauth.role_attribute_strict') do |role_attribute_strict| %> +role_attribute_strict = <%= role_attribute_strict %> +<% end %> + +<% if_p('grafana.auth.generic_oauth.groups_attribute_path') do |groups_attribute_path| %> +groups_attribute_path = <%= groups_attribute_path %> +<% end %> + <% if_p('grafana.auth.generic_oauth.id_token_attribute_name') do |id_token_attribute_name| %> id_token_attribute_name = <%= id_token_attribute_name %> <% end %> +<% if_p('grafana.auth.generic_oauth.team_ids_attribute_path') do |team_ids_attribute_path| %> +team_ids_attribute_path = <%= team_ids_attribute_path %> +<% end %> + <% if_p('grafana.auth.generic_oauth.auth_url') do |auth_url| %> auth_url = <%= auth_url %> <% end %> @@ -856,6 +1207,10 @@ token_url = <%= token_url %> api_url = <%= api_url %> <% end %> +<% if_p('grafana.auth.generic_oauth.teams_url') do |teams_url| %> +teams_url = <%= teams_url %> +<% end %> + <% if_p('grafana.auth.generic_oauth.allowed_domains') do |allowed_domains| %> allowed_domains = <%= allowed_domains %> <% end %> @@ -881,56 +1236,16 @@ tls_client_key = /var/vcap/jobs/grafana/config/generic_oauth_tls_client_key.pem tls_skip_verify_insecure = <%= tls_skip_verify_insecure %> <% end %> -#################################### SAML Auth ########################### -[auth.saml] # Enterprise only -<% if_p('grafana.auth.saml.enabled') do |enabled| %> -# Defaults to false. If true, the feature is enabled -enabled = <%= enabled %> -<% end %> - -<% if_p('grafana.auth.saml.certificate') do %> -# Path to the public X.509 certificate. Used to sign requests to the IdP -certificate_path = /var/vcap/jobs/grafana/config/saml_certificate.pem +<% if_p('grafana.auth.generic_oauth.use_pkce') do |use_pkce| %> +use_pkce = <%= use_pkce %> <% end %> -<% if_p('grafana.auth.saml.private_key') do %> -# Path to the private key. Used to decrypt assertions from the IdP -private_key_path = /var/vcap/jobs/grafana/config/saml_private_key.pem +<% if_p('grafana.auth.generic_oauth.auth_style') do |auth_style| %> +auth_style = <%= auth_style %> <% end %> -<% if_p('grafana.auth.saml.idp_metadata') do %> -# Path to the SAML metadata XML. Used to verify and obtain binding locations from the IdP -idp_metadata_path = /var/vcap/jobs/grafana/config/saml_ipd_metadata.xml -<% end %> - -<% if_p('grafana.auth.saml.idp_metadata_url') do |idp_metadata_url| %> -# URL to fetch SAML IdP metadata. Used to verify and obtain binding locations from the IdP -idp_metadata_url = <%= idp_metadata_url %> -<% end %> - -<% if_p('grafana.auth.saml.max_issue_delay') do |max_issue_delay| %> -# Duration, since the IdP issued a response and the SP is allowed to process it. Defaults to 90 seconds -max_issue_delay = <%= max_issue_delay %> -<% end %> - -<% if_p('grafana.auth.saml.metadata_valid_duration') do |metadata_valid_duration| %> -# Duration, for how long the SP's metadata should be valid. Defaults to 48 hours -metadata_valid_duration = <%= metadata_valid_duration %> -<% end %> - -<% if_p('grafana.auth.saml.assertion_attribute_name') do |assertion_attribute_name| %> -# Friendly name or name of the attribute within the SAML assertion to use as the user's name -assertion_attribute_name = <%= assertion_attribute_name %> -<% end %> - -<% if_p('grafana.auth.saml.assertion_attribute_login') do |assertion_attribute_login| %> -# Friendly name or name of the attribute within the SAML assertion to use as the user's login handle -assertion_attribute_login = <%= assertion_attribute_login %> -<% end %> - -<% if_p('grafana.auth.saml.assertion_attribute_email') do |assertion_attribute_email| %> -# Friendly name or name of the attribute within the SAML assertion to use as the user's email -assertion_attribute_email = <%= assertion_attribute_email %> +<% if_p('grafana.auth.generic_oauth.allow_assign_grafana_admin') do |allow_assign_grafana_admin| %> +allow_assign_grafana_admin = <%= allow_assign_grafana_admin %> <% end %> #################################### Basic Auth ########################## @@ -939,6 +1254,7 @@ assertion_attribute_email = <%= assertion_attribute_email %> enabled = <%= enabled %> <% end %> + #################################### Auth Proxy ########################## [auth.proxy] <% if_p('grafana.auth.proxy.enabled') do |enabled| %> @@ -969,10 +1285,84 @@ whitelist = <%= whitelist %> headers = <%= headers %> <% end %> +<% if_p('grafana.auth.proxy.headers_encoded') do |headers_encoded| %> +headers_encoded = <%= headers_encoded %> +<% end %> + <% if_p('grafana.auth.proxy.enable_login_token') do |enable_login_token| %> enable_login_token = <%= enable_login_token %> <% end %> +#################################### Auth JWT ########################## +[auth.jwt] +<% if_p('grafana.auth.jwt.enabled') do |enabled| %> +enabled = <%= enabled %> +<% end %> + +<% if_p('grafana.auth.jwt.enable_login_token') do |enable_login_token| %> +enable_login_token = <%= enable_login_token %> +<% end %> + +<% if_p('grafana.auth.jwt.header_name') do |header_name| %> +header_name = <%= header_name %> +<% end %> + +<% if_p('grafana.auth.jwt.email_claim') do |email_claim| %> +email_claim = <%= email_claim %> +<% end %> + +<% if_p('grafana.auth.jwt.username_claim') do |username_claim| %> +username_claim = <%= username_claim %> +<% end %> + +<% if_p('grafana.auth.jwt.jwk_set_url') do |jwk_set_url| %> +jwk_set_url = <%= jwk_set_url %> +<% end %> + +<% if_p('grafana.auth.jwt.jwk_set_file') do |jwk_set_file| %> +jwk_set_file = <%= jwk_set_file %> +<% end %> + +<% if_p('grafana.auth.jwt.cache_ttl') do |cache_ttl| %> +cache_ttl = <%= cache_ttl %> +<% end %> + +<% if_p('grafana.auth.jwt.expect_claims') do |expect_claims| %> +expect_claims = <%= expect_claims %> +<% end %> + +<% if_p('grafana.auth.jwt.key') do |key_file| %> +key_file = /var/vcap/jobs/grafana/config/jwt_key.pem +<% end %> + +<% if_p('grafana.auth.jwt.key_file') do |key_file| %> +key_file = <%= key_file %> +<% end %> + +<% if_p('grafana.auth.jwt.role_attribute_path') do |role_attribute_path| %> +role_attribute_path = <%= role_attribute_path %> +<% end %> + +<% if_p('grafana.auth.jwt.role_attribute_strict') do |role_attribute_strict| %> +role_attribute_strict = <%= role_attribute_strict %> +<% end %> + +<% if_p('grafana.auth.jwt.auto_sign_up') do |auto_sign_up| %> +auto_sign_up = <%= auto_sign_up %> +<% end %> + +<% if_p('grafana.auth.jwt.url_login') do |url_login| %> +url_login = <%= url_login %> +<% end %> + +<% if_p('grafana.auth.jwt.allow_assign_grafana_admin') do |allow_assign_grafana_admin| %> +allow_assign_grafana_admin = <%= allow_assign_grafana_admin %> +<% end %> + +<% if_p('grafana.auth.jwt.skip_org_role_sync') do |skip_org_role_sync| %> +skip_org_role_sync = <%= skip_org_role_sync %> +<% end %> + #################################### Auth LDAP ########################## [auth.ldap] <% if_p('grafana.auth.ldap.enabled') do |enabled| %> @@ -987,8 +1377,14 @@ config_file = /var/vcap/jobs/grafana/config/ldap.toml allow_sign_up = <%= allow_sign_up %> <% end %> +<% if_p('grafana.auth.ldap.skip_org_role_sync') do |skip_org_role_sync| %> # LDAP backround sync (Enterprise only) +skip_org_role_sync = <%= skip_org_role_sync %> +<% end %> + <% if_p('grafana.auth.ldap.sync_cron') do |sync_cron| %> +# LDAP background sync (Enterprise only) +# At 1 am every day sync_cron = <%= sync_cron %> <% end %> @@ -996,7 +1392,61 @@ sync_cron = <%= sync_cron %> active_sync_enabled = <%= active_sync_enabled %> <% end %> -#################################### SMTP / Emailing ########################## +#################################### AWS ########################### +[aws] +<% if_p('grafana.aws.allowed_auth_providers') do |allowed_auth_providers| %> +# Enter a comma-separated list of allowed AWS authentication providers. +# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 IAM Role) +allowed_auth_providers = <%= allowed_auth_providers %> +<% end %> + +<% if_p('grafana.aws.assume_role_enabled') do |assume_role_enabled| %> +# Allow AWS users to assume a role using temporary security credentials. +# If true, assume role will be enabled for all AWS authentication providers that are specified in aws_auth_providers +assume_role_enabled = <%= assume_role_enabled %> +<% end %> + +<% if_p('grafana.aws.list_metrics_page_limit') do |list_metrics_page_limit| %> +# Specify max no of pages to be returned by the ListMetricPages API +list_metrics_page_limit = <%= list_metrics_page_limit %> +<% end %> + +#################################### Azure ############################### +[azure] +<% if_p('grafana.azure.cloud') do |cloud| %> +# Azure cloud environment where Grafana is hosted +# Possible values are AzureCloud, AzureChinaCloud, AzureUSGovernment and AzureGermanCloud +# Default value is AzureCloud (i.e. public cloud) +cloud = <%= cloud %> +<% end %> + +<% if_p('grafana.azure.managed_identity_enabled') do |managed_identity_enabled| %> +# Specifies whether Grafana hosted in Azure service with Managed Identity configured (e.g. Azure Virtual Machines instance) +# If enabled, the managed identity can be used for authentication of Grafana in Azure services +# Disabled by default, needs to be explicitly enabled +managed_identity_enabled = <%= managed_identity_enabled %> +<% end %> + +<% if_p('grafana.azure.managed_identity_client_id') do |managed_identity_client_id| %> +# Client ID to use for user-assigned managed identity +# Should be set for user-assigned identity and should be empty for system-assigned identity +managed_identity_client_id = <%= managed_identity_client_id %> +<% end %> + +#################################### Role-based Access Control ########### +[rbac] +<% if_p('grafana.rbac.permission_cache') do |permission_cache| %> +# If enabled, cache permissions in a in memory cache +permission_cache = <%= permission_cache %> +<% end %> + +<% if_p('grafana.rbac.reset_basic_roles') do |reset_basic_roles| %> +# Reset basic roles permissions on boot +# Warning left to true, basic roles permissions will be reset on every boot +reset_basic_roles = <%= reset_basic_roles %> +<% end %> + +#################################### SMTP / Emailing ##################### [smtp] <% if_p('grafana.smtp.enabled') do |enabled| %> enabled = <%= enabled %> @@ -1011,6 +1461,7 @@ user = <%= user %> <% end %> <% if_p('grafana.smtp.password') do |password| %> +# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;""" password = <%= password %> <% end %> @@ -1047,6 +1498,14 @@ startTLS_policy = <%= starttls_policy %> welcome_email_on_sign_up = <%= welcome_email_on_sign_up %> <% end %> +<% if_p('grafana.emails.templates_pattern') do |templates_pattern| %> +templates_pattern = <%= templates_pattern %> +<% end %> + +<% if_p('grafana.emails.content_types') do |content_types| %> +content_types = <%= content_types %> +<% end %> + #################################### Logging ########################## [log] <% if_p('grafana.log.mode') do |mode| %> @@ -1056,7 +1515,7 @@ mode = <%= mode %> <% end %> <% if_p('grafana.log.level') do |level| %> -# Either "trace", "debug", "info", "warn", "error", "critical", default is "info" +# Either "debug", "info", "warn", "error", "critical", default is "info" level = <%= level %> <% end %> @@ -1139,15 +1598,70 @@ facility = <%= facility %> tag = <%= tag %> <% end %> +[log.frontend] +<% if_p('grafana.log.frontend.enabled') do |enabled| %> +# Should Sentry javascript agent be initialized +enabled = <%= enabled %> +<% end %> + +<% if_p('grafana.log.frontend.provider') do |provider| %> +# Defines which provider to use sentry or grafana +provider = <%= provider %> +<% end %> + +<% if_p('grafana.log.frontend.sentry_dsn') do |sentry_dsn| %> +# Sentry DSN if you want to send events to Sentry. +sentry_dsn = <%= sentry_dsn %> +<% end %> + +<% if_p('grafana.log.frontend.custom_endpoint') do |custom_endpoint| %> +# Custom HTTP endpoint to send events to. Default will log the events to stdout. +custom_endpoint = <%= custom_endpoint %> +<% end %> + +<% if_p('grafana.log.frontend.sample_rate') do |sample_rate| %> +# Rate of events to be reported to Sentry between 0 (none) and 1 (all), float +sample_rate = <%= sample_rate %> +<% end %> + +<% if_p('grafana.log.frontend.log_endpoint_requests_per_second_limit') do |log_endpoint_requests_per_second_limit| %> +# Requests per second limit enforced per an extended period, for Grafana backend log ingestion endpoint (/log). +log_endpoint_requests_per_second_limit = <%= log_endpoint_requests_per_second_limit %> +<% end %> + +<% if_p('grafana.log.frontend.log_endpoint_burst_limit') do |log_endpoint_burst_limit| %> +# Max requests accepted per short interval of time for Grafana backend log ingestion endpoint (/log) +log_endpoint_burst_limit = <%= log_endpoint_burst_limit %> +<% end %> + +<% if_p('grafana.log.frontend.instrumentations_errors_enabled') do |instrumentations_errors_enabled| %> +# Should error instrumentation be enabled, only affects Grafana Javascript Agent +instrumentations_errors_enabled = <%= instrumentations_errors_enabled %> +<% end %> + +<% if_p('grafana.log.frontend.instrumentations_console_enabled') do |instrumentations_console_enabled| %> +# Should console instrumentation be enabled, only affects Grafana Javascript Agent +instrumentations_console_enabled = <%= instrumentations_console_enabled %> +<% end %> + +<% if_p('grafana.log.frontend.instrumentations_webvitals_enabled') do |instrumentations_webvitals_enabled| %> +# Should webvitals instrumentation be enabled, only affects Grafana Javascript Agent +instrumentations_webvitals_enabled = <%= instrumentations_webvitals_enabled %> +<% end %> + +<% if_p('grafana.log.frontend.api_key') do |api_key| %> +# Api Key, only applies to Grafana Javascript Agent provider +api_key = <%= api_key %> +<% end %> + #################################### Usage Quotas ######################## [quota] <% if_p('grafana.quota.enabled') do |enabled| %> enabled = <%= enabled %> <% end %> -#### set quotas to -1 to make unlimited. #### - <% if_p('grafana.quota.org_user') do |org_user| %> +#### set quotas to -1 to make unlimited. #### # limit number of users per Org. org_user = <%= org_user %> <% end %> @@ -1167,6 +1681,11 @@ org_data_source = <%= org_data_source %> org_api_key = <%= org_api_key %> <% end %> +<% if_p('grafana.quota.org_alert_rule') do |org_alert_rule| %> +# limit number of alerts per Org. +org_alert_rule = <%= org_alert_rule %> +<% end %> + <% if_p('grafana.quota.user_org') do |user_org| %> # limit number of orgs a user can create. user_org = <%= user_org %> @@ -1197,15 +1716,151 @@ global_api_key = <%= global_api_key %> global_session = <%= global_session %> <% end %> -#################################### Alerting ###################################### +<% if_p('grafana.quota.global_alert_rule') do |global_alert_rule| %> +# global limit of alerts +global_alert_rule = <%= global_alert_rule %> +<% end %> + +<% if_p('grafana.quota.global_file') do |global_file| %> +# global limit of files uploaded to the SQL DB +global_file = <%= global_file %> +<% end %> + +#################################### Unified Alerting #################### +[unified_alerting] +<% if_p('grafana.unified_alerting.enabled') do |enabled| %> +# Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed when switching. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details. +enabled = <%= enabled %> +<% end %> + +<% if_p('grafana.unified_alerting.disabled_orgs') do |disabled_orgs| %> +# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled. +disabled_orgs = <%= disabled_orgs %> +<% end %> + +<% if_p('grafana.unified_alerting.admin_config_poll_interval') do |admin_config_poll_interval| %> +# Specify the frequency of polling for admin config changes. +# 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. +admin_config_poll_interval = <%= admin_config_poll_interval %> +<% end %> + +<% if_p('grafana.unified_alerting.alertmanager_config_poll_interval') do |alertmanager_config_poll_interval| %> +# Specify the frequency of polling for Alertmanager config changes. +# 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. +alertmanager_config_poll_interval = <%= alertmanager_config_poll_interval %> +<% end %> + +<% if_p('grafana.unified_alerting.ha_listen_address') do |ha_listen_address| %> +# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. +ha_listen_address = <%= ha_listen_address %> +<% end %> + +<% if_p('grafana.unified_alerting.ha_advertise_address') do |ha_advertise_address| %> +# Explicit address/hostname and port to advertise other Grafana instances. The port is used for both TCP and UDP. +ha_advertise_address = <%= ha_advertise_address %> +<% end %> + +<% if_p('grafana.unified_alerting.ha_peers') do |ha_peers| %> +# Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting. +ha_peers = <%= ha_peers %> +<% end %> + +<% if_p('grafana.unified_alerting.ha_peer_timeout') do |ha_peer_timeout| %> +# Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will +# be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should +# each instance wait before sending the notification to take into account replication lag. +# 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. +ha_peer_timeout = <%= ha_peer_timeout %> +<% end %> + +<% if_p('grafana.unified_alerting.ha_gossip_interval') do |ha_gossip_interval| %> +# The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated +# across cluster more quickly at the expense of increased bandwidth usage. +# 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. +ha_gossip_interval = <%= ha_gossip_interval %> +<% end %> + +<% if_p('grafana.unified_alerting.ha_push_pull_interval') do |ha_push_pull_interval| %> +# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds +# across larger clusters at the expense of increased bandwidth usage. +# 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. +ha_push_pull_interval = <%= ha_push_pull_interval %> +<% end %> + +<% if_p('grafana.unified_alerting.execute_alerts') do |execute_alerts| %> +# Enable or disable alerting rule execution. The alerting UI remains visible. This option has a legacy version in the `[alerting]` section that takes precedence. +execute_alerts = <%= execute_alerts %> +<% end %> + +<% if_p('grafana.unified_alerting.evaluation_timeout') do |evaluation_timeout| %> +# Alert evaluation timeout when fetching data from the datasource. This option has a legacy version in the `[alerting]` section that takes precedence. +# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m. +evaluation_timeout = <%= evaluation_timeout %> +<% end %> + +<% if_p('grafana.unified_alerting.max_attempts') do |max_attempts| %> +# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence. +max_attempts = <%= max_attempts %> +<% end %> + +<% if_p('grafana.unified_alerting.min_interval') do |min_interval| %> +# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence. +# 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_interval = <%= min_interval %> +<% end %> + +[unified_alerting.screenshots] +<% if_p('grafana.unified_alerting.screenshots.capture') do |capture| %> +# Enable screenshots in notifications. This option requires the Grafana Image Renderer plugin. +# For more information on configuration options, refer to [rendering]. +capture = <%= capture %> +<% end %> + +<% if_p('grafana.unified_alerting.screenshots.capture_timeout') do |capture_timeout| %> +# The timeout for capturing screenshots. If a screenshot cannot be captured within the timeout then +# the notification is sent without a screenshot. The maximum duration is 30 seconds. This timeout +# should be less than the minimum Interval of all Evaluation Groups to avoid back pressure on alert +# rule evaluation. +capture_timeout = <%= capture_timeout %> +<% end %> + +<% if_p('grafana.unified_alerting.screenshots.max_concurrent_screenshots') do |max_concurrent_screenshots| %> +# The maximum number of screenshots that can be taken at the same time. This option is different from +# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots +# that can be taken at the same time for all firing alerts where as concurrent_render_request_limit sets +# the total number of concurrent screenshots across all Grafana services. +max_concurrent_screenshots = <%= max_concurrent_screenshots %> +<% end %> + +<% if_p('grafana.unified_alerting.screenshots.upload_external_image_storage') do |upload_external_image_storage| %> +# Uploads screenshots to the local Grafana server or remote storage such as Azure, S3 and GCS. Please +# see [external_image_storage] for further configuration options. If this option is false then +# screenshots will be persisted to disk for up to temp_data_lifetime. +upload_external_image_storage = <%= upload_external_image_storage %> +<% end %> + +[unified_alerting.reserved_labels] +<% if_p('grafana.unified_alerting.reserved_labels.disabled_labels') do |disabled_labels| %> +# Comma-separated list of reserved labels added by the Grafana Alerting engine that should be disabled. +# For example: `disabled_labels=grafana_folder` +disabled_labels = <%= disabled_labels %> +<% end %> + +[unified_alerting.state_history] +<% if_p('grafana.unified_alerting.state_history.enabled') do |enabled| %> +# Enable the state history functionality in Unified Alerting. The previous states of alert rules will be visible in panels and in the UI. +enabled = <%= enabled %> +<% end %> + +#################################### Alerting ############################ [alerting] <% if_p('grafana.alerting.enabled') do |enabled| %> -# Disable alerting engine & UI features +# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details. enabled = <%= enabled %> <% end %> <% if_p('grafana.alerting.execute_alerts') do |execute_alerts| %> -# Makes it possible to turn off alert rule execution. +# Makes it possible to turn off alert execution but alerting UI is visible execute_alerts = <%= execute_alerts %> <% end %> @@ -1257,6 +1912,17 @@ max_annotations_to_keep = <%= max_annotations_to_keep %> <% end %> #################################### Annotations ######################### +[annotations] +<% if_p('grafana.annotations.cleanupjob_batchsize') do |cleanupjob_batchsize| %> +# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations. +cleanupjob_batchsize = <%= cleanupjob_batchsize %> +<% end %> + +<% if_p('grafana.annotations.tags_length') do |tags_length| %> +# Enforces the maximum allowed length of the tags for any newly introduced annotations. It can be between 500 and 4096 inclusive (which is the respective's column length). Default value is 500. +# Setting it to a higher value would impact performance therefore is not recommended. +tags_length = <%= tags_length %> +<% end %> [annotations.dashboard] # Dashboard annotations means that annotations are associated with the dashboard they are created on. @@ -1294,8 +1960,29 @@ max_annotations_to_keep = <%= max_annotations_to_keep %> enabled = <%= enabled %> <% end %> -#################################### Internal Grafana Metrics ########################## -# Metrics available at HTTP API Url /api/metrics +#################################### Help ############################# +[help] +<% if_p('grafana.help.enabled') do |enabled| %> +# Enable the Help section +enabled = <%= enabled %> +<% end %> + +#################################### Profile ############################# +[profile] +<% if_p('grafana.profile.enabled') do |enabled| %> +# Enable the Profile section +enabled = <%= enabled %> +<% end %> + +#################################### Query History ############################# +[query_history] +<% if_p('grafana.query_history.enabled') do |enabled| %> +# Enable the Query history +enabled = <%= enabled %> +<% end %> + +#################################### Internal Grafana Metrics ############ +# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId [metrics] <% if_p('grafana.metrics.enabled') do |enabled| %> # Disable / Enable internal metrics @@ -1318,9 +2005,19 @@ basic_auth_username = <%= basic_auth_username %> basic_auth_password = <%= basic_auth_password %> <% end %> -# Send internal metrics to Graphite +# Metrics environment info adds dimensions to the `grafana_environment_info` metric, which +# can expose more information about the Grafana instance. +[metrics.environment_info] +#exampleLabel1 = exampleValue1 +#exampleLabel2 = exampleValue2 +<% p('grafana.metrics.environment_info', {}).each do |key,value| %> +<%= key %> = <%= value %> +<% end %> + +# Send internal Grafana metrics to graphite [metrics.graphite] <% if_p('grafana.metrics.graphite.address') do |address| %> +# Enable by setting the address setting (ex localhost:2003) address = <%= address %> <% end %> @@ -1329,7 +2026,6 @@ prefix = <%= prefix %> <% end %> #################################### Grafana.com integration ########################## - [grafana_net] <% if_p('grafana.grafana_net.url') do |url| %> url = <%= url %> @@ -1340,7 +2036,12 @@ url = <%= url %> url = <%= url %> <% end %> +<% if_p('grafana.grafana_com.api_url') do |api_url| %> +api_url = <%= api_url %> +<% end %> + #################################### Distributed tracing ############ +# Opentracing is deprecated use opentelemetry instead [tracing.jaeger] <% if_p('grafana.tracing.jaeger.address') do |address| %> # jaeger destination (ex localhost:6831) @@ -1368,6 +2069,11 @@ sampler_type = <%= sampler_type %> sampler_param = <%= sampler_param %> <% end %> +<% if_p('grafana.tracing.jaeger.sampling_server_url') do |sampling_server_url| %> +# sampling_server_url is the URL of a sampling manager providing a sampling strategy. +sampling_server_url = <%= sampling_server_url %> +<% end %> + <% if_p('grafana.tracing.jaeger.zipkin_propagation') do |zipkin_propagation| %> # Whether or not to use Zipkin span propagation (x-b3- HTTP headers). zipkin_propagation = <%= zipkin_propagation %> @@ -1379,70 +2085,139 @@ zipkin_propagation = <%= zipkin_propagation %> disable_shared_zipkin_spans = <%= disable_shared_zipkin_spans %> <% end %> -#################################### External image storage ########################## +[tracing.opentelemetry] + +<% if_p('grafana.tracing.opentelemetry.custom_attributes') do |custom_attributes| %> +# attributes that will always be included in when creating new spans. ex (key1:value1,key2:value2) +custom_attributes = <%= custom_attributes %> +<% end %> + +[tracing.opentelemetry.jaeger] +<% if_p('grafana.tracing.opentelemetry.jaeger.address') do |address| %> +# jaeger destination (ex http://localhost:14268/api/traces) +address = <%= address %> +<% end %> + +<% if_p('grafana.tracing.opentelemetry.jaeger.propagation') do |propagation| %> +# Propagation specifies the text map propagation format: w3c, jaeger +propagation = <%= propagation %> +<% end %> + +# This is a configuration for OTLP exporter with GRPC protocol +[tracing.opentelemetry.otlp] +<% if_p('grafana.tracing.opentelemetry.otlp.address') do |address| %> +# otlp destination (ex localhost:4317) +address = <%= address %> +<% end %> + +<% if_p('grafana.tracing.opentelemetry.otlp.propagation') do |propagation| %> +# Propagation specifies the text map propagation format: w3c, jaeger +propagation = <%= propagation %> +<% end %> + +#################################### External Image Storage ############## [external_image_storage] <% if_p('grafana.external_image_storage.provider') do |provider| %> # Used for uploading images to public servers so they can be included in slack/email messages. -# you can choose between (s3, webdav, gcs, azure_blob, local) +# You can choose between (s3, webdav, gcs, azure_blob, local) provider = <%= provider %> <% end %> -<% if_p('grafana.external_image_storage.s3.access_key', 'grafana.external_image_storage.s3.secret_key') do |access_key, secret_key| %> [external_image_storage.s3] -access_key = <%= access_key %> -secret_key = <%= secret_key %> +<% if_p('grafana.external_image_storage.s3.endpoint') do |endpoint| %> +endpoint = <%= endpoint %> +<% end %> + +<% if_p('grafana.external_image_storage.s3.path_style_access') do |path_style_access| %> +path_style_access = <%= path_style_access %> +<% end %> + <% if_p('grafana.external_image_storage.s3.bucket_url') do |bucket_url| %> bucket_url = <%= bucket_url %> <% end %> + <% if_p('grafana.external_image_storage.s3.bucket') do |bucket| %> bucket = <%= bucket %> <% end %> + <% if_p('grafana.external_image_storage.s3.region') do |region| %> region = <%= region %> <% end %> + <% if_p('grafana.external_image_storage.s3.path') do |path| %> path = <%= path %> <% end %> -<% if_p('grafana.external_image_storage.s3.endpoint') do |endpoint| %> -endpoint = <%= endpoint %> -<% end %> -<% if_p('grafana.external_image_storage.s3.path_style_access') do |path_style_access| %> -path_style_access = <%= path_style_access %> + +<% if_p('grafana.external_image_storage.s3.access_key') do |access_key| %> +access_key = <%= access_key %> <% end %> + +<% if_p('grafana.external_image_storage.s3.secret_key') do |secret_key| %> +secret_key = <%= secret_key %> <% end %> -<% if_p('grafana.external_image_storage.webdav.url', 'grafana.external_image_storage.webdav.username', 'grafana.external_image_storage.webdav.password') do |url, username, password| %> [external_image_storage.webdav] +<% if_p('grafana.external_image_storage.webdav.url') do |url| %> url = <%= url %> +<% end %> + +<% if_p('grafana.external_image_storage.webdav.username') do |username| %> username = <%= username %> -password = <%= provider %> +<% end %> + +<% if_p('grafana.external_image_storage.webdav.password') do |password| %> +password = <%= password %> +<% end %> + <% if_p('grafana.external_image_storage.webdav.public_url') do |public_url| %> public_url = <%= public_url %> <% end %> -<% end %> -<% if_p('grafana.external_image_storage.gcs.json_key', 'grafana.external_image_storage.gcs.bucket') do |json_key, bucket| %> [external_image_storage.gcs] + +<% if_p('grafana.external_image_storage.gcs.json_key') do |key_file| %> key_file = /var/vcap/jobs/grafana/config/gcs_key.json +<% end %> + +<% if_p('grafana.external_image_storage.gcs.bucket') do |bucket| %> bucket = <%= bucket %> +<% end %> + <% if_p('grafana.external_image_storage.gcs.path') do |path| %> path = <%= path %> <% end %> + +<% if_p('grafana.external_image_storage.gcs.enable_signed_urls') do |enable_signed_urls| %> +enable_signed_urls = <%= enable_signed_urls %> +<% end %> + +<% if_p('grafana.external_image_storage.gcs.signed_url_expiration') do |signed_url_expiration| %> +signed_url_expiration = <%= signed_url_expiration %> <% end %> [external_image_storage.azure_blob] -<% if_p('grafana.external_image_storage.azure.account_name', 'grafana.external_image_storage.azure.account_key', 'grafana.external_image_storage.azure.container_name') do |account_name, account_key, container_name| %> +<% if_p('grafana.external_image_storage.azure.account_name') do |account_name| %> account_name = <%= account_name %> +<% end %> + +<% if_p('grafana.external_image_storage.azure.account_key') do |account_key| %> account_key = <%= account_key %> +<% end %> + +<% if_p('grafana.external_image_storage.azure.container_name') do |container_name| %> container_name = <%= container_name %> <% end %> +<% if_p('grafana.external_image_storage.azure.sas_token_expiration_days') do |sas_token_expiration_days| %> +sas_token_expiration_days = <%= sas_token_expiration_days %> +<% end %> + [external_image_storage.local] # does not require any configuration [rendering] -# Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer <% if_p('grafana.rendering.server_url') do |server_url| %> +# 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 = <%= server_url %> <% end %> @@ -1452,14 +2227,28 @@ server_url = <%= server_url %> callback_url = <%= callback_url %> <% end %> +<% if_p('grafana.rendering.renderer_token') do |renderer_token| %> +# An auth token that will be sent to and verified by the renderer. The renderer will deny any request without an auth token matching the one configured on the renderer side. +renderer_token = <%= renderer_token %> +<% end %> + <% if_p('grafana.rendering.concurrent_render_request_limit') do |concurrent_render_request_limit| %> # 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 = <%= concurrent_render_request_limit %> <% end %> +<% if_p('grafana.rendering.render_key_lifetime') do |render_key_lifetime| %> +# Determines the lifetime of the render key used by the image renderer to access and render Grafana. +# This setting should be expressed as a duration. Examples: 10s (seconds), 5m (minutes), 2h (hours). +# Default is 5m. This should be more than enough for most deployments. +# Change the value only if image rendering is failing and you see `Failed to get the render key from cache` in Grafana logs. +render_key_lifetime = <%= render_key_lifetime %> +<% end %> + [panels] <% if_p('grafana.panels.enable_alpha') do |enable_alpha| %> +# here for to support old env variables, can remove after a few months enable_alpha = <%= enable_alpha %> <% end %> @@ -1477,11 +2266,56 @@ app_tls_skip_verify_insecure = <%= app_tls_skip_verify_insecure %> <% end %> <% if_p('grafana.plugins.allow_loading_unsigned_plugins') do |allow_loading_unsigned_plugins| %> +# 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 = <%= allow_loading_unsigned_plugins %> <% end %> -<% if_p('grafana.plugins.marketplace_url') do |marketplace_url| %> -marketplace_url = <%= marketplace_url %> +<% if_p('grafana.plugins.plugin_admin_enabled') do |plugin_admin_enabled| %> +# Enable or disable installing / uninstalling / updating plugins directly from within Grafana. +plugin_admin_enabled = <%= plugin_admin_enabled %> +<% end %> + +<% if_p('grafana.plugins.plugin_admin_external_manage_enabled') do |plugin_admin_external_manage_enabled| %> +plugin_admin_external_manage_enabled = <%= plugin_admin_external_manage_enabled %> +<% end %> + +<% if_p('grafana.plugins.plugin_catalog_url') do |plugin_catalog_url| %> +plugin_catalog_url = <%= plugin_catalog_url %> +<% end %> + +<% if_p('grafana.plugins.plugin_catalog_hidden_plugins') do |plugin_catalog_hidden_plugins| %> +# Enter a comma-separated list of plugin identifiers to hide in the plugin catalog. +plugin_catalog_hidden_plugins = <%= plugin_catalog_hidden_plugins %> +<% end %> + +#################################### Grafana Live ########################################## +[live] +<% if_p('grafana.live.max_connections') do |max_connections| %> +# 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 = <%= max_connections %> +<% end %> + +<% if_p('grafana.live.allowed_origins') do |allowed_origins| %> +# allowed_origins is a comma-separated list of origins that can establish connection with Grafana Live. +# If not set then origin will be matched over root_url. Supports wildcard symbol "*". +allowed_origins = <%= allowed_origins %> +<% end %> + +<% if_p('grafana.live.ha_engine') do |ha_engine| %> +# engine defines an HA (high availability) engine to use for Grafana Live. By default no engine used - in +# this case Live features work only on a single Grafana server. +# Available options: "redis". +# Setting ha_engine is an EXPERIMENTAL feature. +ha_engine = <%= ha_engine %> +<% end %> + +<% if_p('grafana.live.ha_engine_address') do |ha_engine_address| %> +# ha_engine_address sets a connection address for Live HA engine. Depending on engine type address format can differ. +# For now we only support Redis connection address in "host:port" format. +# This option is EXPERIMENTAL. +ha_engine_address = <%= ha_engine_address %> <% end %> #################################### Grafana Image Renderer Plugin ########################## @@ -1546,19 +2380,24 @@ rendering_mode = <%= rendering_mode %> <% end %> <% if_p('grafana.plugin.grafana_image_renderer.rendering_clustering_mode') do |rendering_clustering_mode| %> -# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser' +# 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 = <%= rendering_clustering_mode %> <% end %> <% if_p('grafana.plugin.grafana_image_renderer.rendering_clustering_max_concurrency') do |rendering_clustering_max_concurrency| %> -# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently.. +# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'. rendering_clustering_max_concurrency = <%= rendering_clustering_max_concurrency %> <% end %> +<% if_p('grafana.plugin.grafana_image_renderer.rendering_clustering_timeout') do |rendering_clustering_timeout| %> +# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds. +rendering_clustering_timeout = <%= rendering_clustering_timeout %> +<% end %> + <% if_p('grafana.plugin.grafana_image_renderer.rendering_viewport_max_width') do |rendering_viewport_max_width| %> -# Limit the maximum viewport width that can be requested. +# Limit the maximum viewport width, height and device scale factor that can be requested. rendering_viewport_max_width = <%= rendering_viewport_max_width %> <% end %> @@ -1573,7 +2412,8 @@ rendering_viewport_max_device_scale_factor = <%= rendering_viewport_max_device_s <% end %> <% if_p('grafana.plugin.grafana_image_renderer.grpc_host') do |grpc_host| %> -# Change the listening host of the gRPC server. Default host is 127.0.0.1. +# 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_host %> <% end %> @@ -1588,11 +2428,23 @@ license_path = /var/vcap/jobs/grafana/config/license.jwt <% end %> [feature_toggles] +# there are currently two ways to enable feature toggles in the `grafana.ini`. +# you can either pass an array of feature you want to enable to the `enable` field or +# configure each toggle by setting the name of the toggle to true/false. Toggles set to true/false +# will take precedence over toggles in the `enable` list. + <% if_p('grafana.feature_toggles.enable') do |enable| %> -# enable features, separated by spaces +# enable = feature1,feature2 enable = <%= enable %> <% end %> +# Some features are enabled by default, see: +# https://grafana.com/docs/grafana/next/setup-grafana/configure-grafana/feature-toggles/ +# To enable features by default, set `Expression: "true"` in: +# https://github.com/grafana/grafana/blob/main/pkg/services/featuremgmt/registry.go + +# feature1 = true +# feature2 = false [date_formats] # For information on what formatting patterns that are supported https://momentjs.com/docs/#/displaying/ @@ -1601,8 +2453,8 @@ enable = <%= enable %> full_date = <%= full_date %> <% end %> -# Used by graph and other places where we only show small intervals <% if_p('grafana.date_formats.interval_second') do |interval_second| %> +# Used by graph and other places where we only show small intervals interval_second = <%= interval_second %> <% end %> @@ -1635,3 +2487,129 @@ use_browser_locale = <%= use_browser_locale %> # 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 = <%= default_timezone %> <% end %> + +[expressions] +<% if_p('grafana.expressions.enabled') do |enabled| %> +# Enable or disable the expressions functionality. +enabled = <%= enabled %> +<% end %> + +[geomap] +<% if_p('grafana.geomap.default_baselayer_config') do |default_baselayer_config| %> +# Set the JSON configuration for the default basemap +default_baselayer_config = <%= default_baselayer_config %> +<% end %> + +<% if_p('grafana.geomap.enable_custom_baselayers') do |enable_custom_baselayers| %> +# Enable or disable loading other base map layers +enable_custom_baselayers = <%= enable_custom_baselayers %> +<% end %> + +#################################### Dashboard previews ##################################### + +[dashboard_previews.crawler] +<% if_p('grafana.dashboard_previews.crawler.thread_count') do |thread_count| %> +# Number of dashboards rendered in parallel. Default is 6. +thread_count = <%= thread_count %> +<% end %> + +<% if_p('grafana.dashboard_previews.crawler.rendering_timeout') do |rendering_timeout| %> +# Timeout passed down to the Image Renderer plugin. It is used in two separate places within a single rendering request: +# First during the initial navigation to the dashboard and then when waiting for all the panels to load. Default is 20s. +# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes). +rendering_timeout = <%= rendering_timeout %> +<% end %> + +<% if_p('grafana.dashboard_previews.crawler.max_crawl_duration') do |max_crawl_duration| %> +# Maximum duration of a single crawl. Default is 1h. +# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes). +max_crawl_duration = <%= max_crawl_duration %> +<% end %> + +<% if_p('grafana.dashboard_previews.crawler.scheduler_interval') do |scheduler_interval| %> +# Minimum interval between two subsequent scheduler runs. Default is 12h. +# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes). +scheduler_interval = <%= scheduler_interval %> +<% end %> + +#################################### Support Bundles ##################################### +[support_bundles] +<% if_p('grafana.support_bundles.enabled') do |enabled| %> +# Enable support bundle creation (default: true) +enabled = <%= enabled %> +<% end %> + +<% if_p('grafana.support_bundles.server_admin_only') do |server_admin_only| %> +# Only server admins can generate and view support bundles (default: true) +server_admin_only = <%= server_admin_only %> +<% end %> + +<% if_p('grafana.support_bundles.public_keys') do |public_keys| %> +# If set, bundles will be encrypted with the provided public keys separated by whitespace + public_keys = <%= public_keys %> +<% end %> + +#################################### Storage ################################################ + +[storage] +<% if_p('grafana.storage.allow_unsanitized_svg_upload') do |allow_unsanitized_svg_upload| %> +# Allow uploading SVG files without sanitization. +allow_unsanitized_svg_upload = <%= allow_unsanitized_svg_upload %> +<% end %> + +#################################### Search ################################################ + +[search] +<% if_p('grafana.search.dashboard_loading_batch_size') do |dashboard_loading_batch_size| %> +# Defines the number of dashboards loaded at once in a batch during a full reindex. +# This is a temporary settings that might be removed in the future. +dashboard_loading_batch_size = <%= dashboard_loading_batch_size %> +<% end %> + +<% if_p('grafana.search.full_reindex_interval') do |full_reindex_interval| %> +# Defines the frequency of a full search reindex. +# This is a temporary settings that might be removed in the future. +full_reindex_interval = <%= full_reindex_interval %> +<% end %> + +<% if_p('grafana.search.index_update_interval') do |index_update_interval| %> +# Defines the frequency of partial index updates based on recent changes such as dashboard updates. +# This is a temporary settings that might be removed in the future. +index_update_interval = <%= index_update_interval %> +<% end %> + +# Move an app plugin referenced by its id (including all its pages) to a specific navigation section +# Dependencies: needs the `topnav` feature to be enabled +# Format: =
+[navigation.app_sections] + +# Move a specific app plugin page (referenced by its `path` field) to a specific navigation section +# Format: =
+[navigation.app_standalone_pages] + +#################################### Secure Socks5 Datasource Proxy ##################################### +[secure_socks_datasource_proxy] +<% if_p('grafana.secure_socks_datasource_proxy.enabled') do |enabled| %> +enabled = <%= enabled %> +<% end %> + +<% if_p('grafana.secure_socks_datasource_proxy.root_ca_cert') do |root_ca_cert| %> +root_ca_cert = <%= root_ca_cert %> +<% end %> + +<% if_p('grafana.secure_socks_datasource_proxy.client_key') do |client_key| %> +client_key = <%= client_key %> +<% end %> + +<% if_p('grafana.secure_socks_datasource_proxy.client_cert') do |client_cert| %> +client_cert = <%= client_cert %> +<% end %> + +<% if_p('grafana.secure_socks_datasource_proxy.server_name') do |server_name| %> +server_name = <%= server_name %> +<% end %> + +<% if_p('grafana.secure_socks_datasource_proxy.proxy_address') do |proxy_address| %> +# The address of the socks5 proxy datasources should connect to +proxy_address = <%= proxy_address %> +<% end %> diff --git a/jobs/grafana/templates/config/grpc_server_cert.pem b/jobs/grafana/templates/config/grpc_server_cert.pem new file mode 100644 index 000000000..4f3583b9e --- /dev/null +++ b/jobs/grafana/templates/config/grpc_server_cert.pem @@ -0,0 +1 @@ +<%= p('grafana.grpc_server.cert_file', '') %> diff --git a/jobs/grafana/templates/config/grpc_server_key.pem b/jobs/grafana/templates/config/grpc_server_key.pem new file mode 100644 index 000000000..f8e5b4ac8 --- /dev/null +++ b/jobs/grafana/templates/config/grpc_server_key.pem @@ -0,0 +1 @@ +<%= p('grafana.grpc_server.cert_key', '') %> diff --git a/jobs/grafana/templates/config/jwt_key.pem b/jobs/grafana/templates/config/jwt_key.pem new file mode 100644 index 000000000..bb859ee23 --- /dev/null +++ b/jobs/grafana/templates/config/jwt_key.pem @@ -0,0 +1 @@ +<%= p('grafana.auth.jwt.key', '') %> diff --git a/manifests/prometheus.yml b/manifests/prometheus.yml index 2576fb99b..894e94984 100644 --- a/manifests/prometheus.yml +++ b/manifests/prometheus.yml @@ -87,6 +87,8 @@ instance_groups: networks: - name: default jobs: + - name: bpm + release: bpm - name: grafana release: prometheus properties: