Home > OS >  Location of grafana.ini File
Location of grafana.ini File

Time:07-23

I'm trying to configure email alerts through grafana and I'm unable to find the grafana.ini file. I followed this page to deploy a grafana instance on my local minikube setup and it works fine.

I'm just wondering how to access the grafana.ini file and modify it on minikube? I'm attempting to configure the smtp details in the grafana.ini file so I can send email alerts.

CodePudding user response:

Depending on your environment, configuring Grafana using environment variables instead of editing grafana.ini might be an easier option.

The environment variable pattern is the following: GF_<SectionName>_<KeyName>

E.g., to configure SMTP, one would edit the following environment variables:

# This is a bash script. In real life, you would
# probably add these environment variables in a .yaml file
# (e.g. docker-compose, Kubernetes deployment schema)
export GF_SMTP_ENABLED=true
export GF_SMTP_ENABLED=false
export GF_SMTP_HOST=localhost:25
export GF_SMTP_USER=
export GF_SMTP_PASSWORD=
export GF_SMTP_CERT_FILE=
export GF_SMTP_KEY_FILE=
export GF_SMTP_SKIP_VERIFY=false
export [email protected]
export GF_SMTP_FROM_NAME=grafana
export GF_SMTP_EHLO_IDENTITY=
export GF_SMTP_STARTTLS_POLICY=

Useful links

  • Related