Menu
Grafana Cloud

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 does not exist, sys.env returns an empty string.

Examples

> sys.env("HOME")
"/home/alloy"

> sys.env("DOES_NOT_EXIST")
""