Menu
Open source
env
The env
function gets the value of an environment variable from the system Alloy is running on.
If the environment variable does not exist, env
returns an empty string.
Examples
> env("HOME")
"/home/alloy"
> env("DOES_NOT_EXIST")
""
Was this page helpful?
Related documentation
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video
Building advanced Grafana dashboards
In this webinar, we’ll demo how to build and format Grafana dashboards.
Video
Intro to Alerting with Grafana
Master alerting with Grafana: Navigate the complexities, reduce false positives, and boost reliability for your systems.
Video
Intro to Kubernetes monitoring in Grafana Cloud
In this webinar you’ll learn how Grafana offers developers and SREs a simple and quick-to-value solution for monitoring their Kubernetes infrastructure.