Documentation Index
Fetch the curated documentation index at: https://grafana_com_website/llms.txt
Fetch the complete documentation index at: https://grafana_com_website/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: /docs/grafana-cloud/send-data/alloy/reference/stdlib/sys.md (append .md) or send Accept: text/markdown to /docs/grafana-cloud/send-data/alloy/reference/stdlib/sys/. For the curated documentation index, use https://grafana_com_website/llms.txt. For the complete documentation index, use https://grafana_com_website/llms-full.txt.
sys
The sys namespace contains functions related to the system.
sys.env
The sys.env function gets the value of an environment variable from the system Alloy is running on.
If the environment variable doesn’t exist, sys.env returns an empty string.
Examples
> sys.env("HOME")
"/home/alloy"
> sys.env("DOES_NOT_EXIST")
""Was this page helpful?
Related resources from Grafana Labs


