diff --git a/conf/defaults.ini b/conf/defaults.ini index 750f06f2f6a..481bb002582 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -557,3 +557,7 @@ callback_url = [panels] enable_alpha = false + +[enterprise] +license_path = + diff --git a/conf/sample.ini b/conf/sample.ini index e6a03718d19..61eb1d695e8 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -475,3 +475,8 @@ log_queries = # Options to configure external image rendering server like https://github.com/grafana/grafana-image-renderer ;server_url = ;callback_url = + +[enterprise] +# Path to a valid Grafana Enterprise license.jwt file +;license_path = + diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index 3750e95e6a4..9e8f6fec9a8 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -209,12 +209,10 @@ type Cfg struct { RendererLimitAlerting int DisableBruteForceLoginProtection bool - - TempDataLifetime time.Duration - - MetricsEndpointEnabled bool - - EnableAlphaPanels bool + TempDataLifetime time.Duration + MetricsEndpointEnabled bool + EnableAlphaPanels bool + EnterpriseLicensePath string } type CommandLineArgs struct { @@ -715,6 +713,10 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error { imageUploadingSection := iniFile.Section("external_image_storage") ImageUploadProvider = imageUploadingSection.Key("provider").MustString("") + + enterprise := iniFile.Section("enterprise") + cfg.EnterpriseLicensePath = enterprise.Key("license_path").MustString(filepath.Join(cfg.DataPath, "license.jwt")) + return nil }