Variables
On this page
A variable is a plain value stored in an environment and reused in sensor fields as ${NAME}: a host, a port, a base URL. Change the value once, and every sensor that uses it picks the new value at its next check. Give the same variable a different value per environment, and the same sensor configuration works everywhere.
Variables require a paid plan and are managed by Managers and Admins.
Create a variable#
- Open Configuration → Environments and select the environment.
- In the Variables card, click New variable.
- Enter a Key — capital letters, digits and underscores only, for example
API_HOST— and a Value —api.corvane.example. - Save.
A key is unique within an environment; the same key in another environment is a separate variable.

Use a variable in a sensor#
Write ${KEY} in a supported field:
| Sensor | Fields |
|---|---|
| HTTP, Keyword, JSON, XML | URL, Basic username and password, Bearer token, header names and values |
| Ping, Port, Domain, Certificate | Host |
| SQL database | Query |
| Key-value store | Key name, field |
| Dead-letter queue | Queue name |
| File checksum | File path |
Several variables can be combined: https://${API_HOST}:${API_PORT}/health. The request payload of HTTP sensors does not accept variables.
Variables are replaced when the check is prepared, just before it is sent to the agent; the agent receives the final value. Saving a sensor that uses a variable requires the Manager role.
When a variable is missing#
If a sensor uses a variable that does not exist in its environment, the check is skipped: no result, no incident. The sensor then shows as Not checked. Check the key and the sensor's environment.
Variables or secrets?#
| Variables | Secrets | |
|---|---|---|
| For | Hosts, ports, URLs, names | Connection strings and credentials |
| Stored | In plain text | Encrypted |
| Displayed | Always | Never, after saving |
| Used | ${KEY} in text fields |
Secret selector of SQL, Key-value and Dead-letter queue sensors |
Do not store passwords or tokens in variables: they are visible to anyone who can open the environment.