Add a text box variable
Text box variables display a free text input field with an optional default value. This is the most flexible variable, because you can enter any value. Use this type of variable if you have metrics with high cardinality or if you want to update multiple panels in a dashboard at the same time.
Enter General options
- Navigate to the dashboard you want to make a variable for and then click the Dashboard settings (gear) icon at the top of the page.
- On the Variables tab, click New.
- Enter a Name for your variable.
- In the Type list, select Text box.
- (optional) In Label, enter the display name of the variable dropdown. If you don’t enter a display name, then the dropdown label will be the variable name.
- Choose a Hide option:
- No selection (blank) - The variable dropdown displays the variable Name or Label value. This is the default.
- Label - The variable dropdown only displays the selected variable value and a down arrow.
- Variable - No variable dropdown is displayed on the dashboard.
Enter Text options
- (optional) In the Default value field, select the default value for the variable. If you do not enter anything in this field, then Grafana displays an empty text box for users to type text into.
- In Preview of values, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
- Click Add to add the variable to the dashboard.
Related Grafana resources
Unify your data with Grafana plugins: Splunk, MongoDB, Datadog, and more
Show how Grafana can be used to take data from multiple different sources and unify it, without disrupting the investments that are working today.
Getting started with Grafana Enterprise and observability
Join the Grafana Labs team for a 30-minute demo of how to get started with the Grafana Stack, so you can go from zero to observability in just a few minutes.