Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

Field overrides

Overrides allow you to change the settings for one or more fields. Field options for overrides are exactly the same as the field options available in a particular visualization. The only difference is that you choose which fields to apply them to.

For example, you could change the number of decimal places shown in all numeric fields or columns by changing the Decimals option for Fields with type that matches Numeric.

View existing field overrides

  1. Navigate to the panel you want to edit, click the panel title, and then click Edit.
  2. In the side pane, click Overrides.

Grafana displays a list of field overrides, if any have been created for this panel.

View overrides

Add a field override

You can override as many fields and add as many field options to each override as you want to.

  1. Navigate to the panel you want to edit, click the panel title, and then click Edit.
  2. In the side pane, click Overrides.
  3. Click Add field override.
  4. Select which fields an override rule will be applied to:
    • Fields with name - Select a field from the list of all available fields. Properties you add to a rule with this selector are only applied to this single field.
    • Fields with name matching regex - Specify fields to override with a regular expression. Properties you add to a rule with this selector are applied to all fields where the field name match the regex.
    • Fields with type - Select fields by type, such as string, numeric, and so on. Properties you add to a rule with this selector are applied to all fields that match the selected type.
    • Fields returned by query - Select all fields returned by a specific query, such as A, B, or C. Properties you add to a rule with this selector are applied to all fields returned by the selected query.
  5. Click Add override property.
  6. Select the field option that you want to apply.
  7. Enter options by adding values in the fields. To return options to default values, delete the white text in the fields.
  8. Continue to add overrides to this field by clicking Add override property, or you can click Add override and select a different field to add overrides to.
  9. When finished, click Save to save all panel edits to the dashboard.

Edit a field override

  1. Navigate to the panel you want to edit, click the panel title, and then click Edit.
  2. In the side pane, click Overrides.
  3. Locate the override that you want to change. You can:
    • Edit settings on existing overrides or field selection parameters.
    • Delete existing override properties by clicking the X next to the property.
    • Add additional override properties by clicking Add override property.

Delete a field override

  1. Navigate to the panel you want to edit, click the panel title, and then click Edit.
  2. In the side pane, click Overrides.
  3. Click the trash can icon next to the override that you want to delete.

Example use case for field options and overrides

The following examples show how you might use field options and overrides.

Field option example

Let’s assume that our result set is a data frame that consists of two fields: time and temperature.

timetemperature
2020-01-02 03:04:0045.0
2020-01-02 03:05:0047.0
2020-01-02 03:06:0048.0

Each field (column) of this structure can have field options applied that alter the way its values are displayed. This means that you can, for example, set the Unit to Temperature > Celsius, resulting in the following table:

timetemperature
2020-01-02 03:04:0045.0 °C
2020-01-02 03:05:0047.0 °C
2020-01-02 03:06:0048.0 °C

While we’re at it, the decimal place doesn’t add anything to this display. You can change the Decimals from auto to zero (0), resulting in the following table:

timetemperature
2020-01-02 03:04:0045 °C
2020-01-02 03:05:0047 °C
2020-01-02 03:06:0048 °C

Field override example

Let’s assume that our result set is a data frame that consists of four fields: time, high temp, low temp, and humidity.

timehigh templow temphumidity
2020-01-02 03:04:0045.030.067
2020-01-02 03:05:0047.034.068
2020-01-02 03:06:0048.031.068

Let’s apply the field options from the field option example to apply the Celsius unit and get rid of the decimal place. This results in the following table:

timehigh templow temphumidity
2020-01-02 03:04:0045 °C30 °C67 °C
2020-01-02 03:05:0047 °C34 °C68 °C
2020-01-02 03:06:0048 °C31 °C68 °C

The temperature fields look good, but the humidity is nonsensical. We can fix this by applying a field option override to the humidity field and change the unit to Misc > percent (0-100). This results in a table that makes a lot more sense:

timehigh templow temphumidity
2020-01-02 03:04:0045 °C30 °C67%
2020-01-02 03:05:0047 °C34 °C68%
2020-01-02 03:06:0048 °C31 °C68%