How does this work?
Scalyr Community Guy and Evangelist
Open source geek. Standards wonk. Will talk about anything.
Hi Dave--you sure can. It's pretty convenient if you want to store your API key in an environment variable, or if you have some other machine-specific env variable you want to use.
In your agent.json, you'll need to declare each variable you want to import in a list value for an "import_vars" attribute. You can then use the environment variables as values for other attributes. Be sure that the name is preceded by a dollar sign.
Here's an example:
import_vars: [ "SCALYR_API_KEY", "ENV_VAR1" ],
Thx for the response @Padilla