
env zero has the ability to send all of your deployment logs and audit logs directly to Grafana Loki.
Setup
In order to set up Granfana Loki you will need to get the following data:- The Host URL
- Authorization username and password
Grafana Cloud
If you’re using Grafana Cloud follow these steps to get the relevant data:- On the left side menu, go to the
Connectionstab - Search for
Hosted logsand click on it. - In the
Configuration Detailstab under theConfigure promtail to send logs to your Grafana Cloudsection create a newAccess Policy token - In the YAML section see the
urlunder theclientsection - The URL consists of
https://{Number}:{Token}@{URL} - The number is the
ENV0_LOKI_USERNAMEyou will need to enter below in the environment variables section - for example:875656 - The token is the
ENV0_LOKI_PASSWORDyou will need to enter below in the environment variables section. - The URL should be the
ENV0_LOKI_HOST- Make sure you only take the Host part, and make sure you add anhttps://at the beginning. For example, a valid URL ishttps://logs-prod-006.grafana.net>
Self Installation of Grafana
- The URL should be the URL where
Lokiis deployed e.ghttp://localhost:3100 - The username and password of the Loki server if it requires basic authentication.
-
In the env zero app

-
Using environment variables
In the env zero platform you will need to configure the following environment variables in any scope you would like to have them:Environment variable name Description Mandatory ENV0_LOKI_HOSTThe URL where Loki is located - Should start with httporhttpsand should not contain the full URL, just the domain. For example:https://logs-prod-006.grafana.netYes ENV0_LOKI_USERNAMEThe Username for authentication No ENV0_LOKI_PASSWORDThe Password for authentication No
LabelsBy default we are adding a label called
app with a value of env0