Whether you are just starting your observability journey or already are an expert, our courses will help advance your knowledge and practical skills.
Expert insight, best practices and information on everything related to Observability issues, trends and solutions.
Explore our guides on a broad range of observability related topics.
Variables act as placeholders for a value used in queries, making dashboards more interactive and dynamic. You can use variables instead of hardcoding specific names for servers, applications, or sensors in your queries. Once set up in Custom Dashboards, these variables allow you to switch between different data views easily. This flexibility is particularly useful for complex, high-cardinality metrics, enabling you to focus on specific values of interest across widgets for all data types, regardless of the variable source type.
Choose from any of the following variable types:
Variable type | Description |
---|---|
Static-value variable | A static-value variable allows you to define the variable options manually. It contains a fixed list of values, such as a number or a string of numbers separated by a comma. For example, if you have country names that never change, you might want to create them as a static-value variable rather than a data source variable. |
Query variable | A query variable allows you to craft a data source query that returns lists of log, metric, or span values, metric names, metric labels, etc. For example, a query variable can generate a list of pod names, severity levels, or data centers, dynamically updating the values by fetching options via a data source query. Query variables prove beneficial when managing multiple data source instances, especially across diverse environments. |
Navigate to Dashboards > Custom Dashboards.
In a new or existing dashboard, click the variable icon { } in the upper right-hand corner of your dashboard.
You will be redirected to the variable setup section, where you will define each variable’s type and source, as well as its variable and display name.
Once you have defined your variable, you may choose from the Multi-value or Include all options.
When both options are selected, all of the variable options are selected by default and one or more may be deselected.
Opting out of both options will allow you to select one variable option at a time.
STEP 1. Select static values
as variable type.
STEP 2. Select the variable and display name.
STEP 3. Enter the variable values manually, separated by a comma.
STEP 4. Choose from the selection options and click SAVE.
STEP 1. Select query
as variable type.
STEP 2. Select variable and display name.
STEP 3. For query options:
logs
or spans
as your source.values
as your variable type.STEP 4. Choose from the selection options and click SAVE.
STEP 1. Select query
as variable type.
STEP 2. Select variable and display name.
STEP 3. For query options:
metrics
as your source.label values
as variable type.pod name
as your label name, you may choose to create a nested variable $.region
to filter your pods by region.STEP 4. Select the values’ display name and actual value. The Values Preview will then display a list of current variable values.
STEP 5. Choose from the selection options and click SAVE.
STEP 1. Select query
as variable type.
STEP 2. Select variable and display name.
STEP 3. For query options:
metrics
as your source.metric labels
as your variable type.STEP 4. Select the values’ display name and actual value. The Values Preview will then display a list of the field’s current variable values.
STEP 5. Choose from the selection options and click SAVE.
STEP 1. Select query
as variable type.
STEP 2. Select variable and display name.
STEP 3. For query options:
metrics
as your source.metric names
as your variable type.STEP 4. Select the values’ display name and actual value. The Values Preview will then display a list of the field’s current variable values.
STEP 5. Choose from the selection options and click SAVE.
Easily view and manage variables from the Custom Dashboards upper toolbar. You can rearrange the order of variables by dragging them.
To edit or delete a variable, select the variable display name to be rerouted to the variable setup. To delete, click on the trash icon.
Check out this instructional video to jump-start your variable setup.
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by emailing support@coralogix.com.