Skip to main content
Variables let you parameterize your monitors so the same monitor file can run against different environments. Unlike secrets, variable values are baked into the monitor definition when you run griffin apply — they’re not resolved at execution time. Use variable("key") with a single key for one value (e.g. base URL). To build a string from multiple variables, secrets, or prior response data, use the template tagged template literal (see Template interpolation).

Using variables

When you run griffin apply production, the CLI resolves variable("API_HOST") using the value set for the production environment.

Template interpolation

Use the template tagged template literal to embed variables in a larger string:

Managing variables with the CLI

Variables vs secrets

Common patterns

Per-environment base URLs

Versioned API paths