How to Configure Grafana Dashboards Page

1. Working with Dashboards

In order to navigate to Grafana (Our visualization tool). Go to the “trips” page and hit the blue “Grafana” button.

Grafana-DB-5.png

2. Navigating to and between Dashboards

After navigating to Grafana you get to the landing page.

  • You can find your recently used dashboards on the left side after scrolling down a bit.
Grafana-DB-6.png

You find all available dashboards by hitting the “four squares” on the left side and then by hitting “Manage”.

Grafana-DB-7.png

There is a folder structure for Dashboards.

  • Click on the folders to see the dashboards there or create new folders there as well as new dashboards.
Grafana-DB-8.png

3. Best practices to create a new “time series” panel

Create a new panel.

  • Click “Add panel”.
Grafana-DB-5.png
  • Click “Add empty panel” in the new show panel.
Grafana-DB-9.png
Making your custom query
  1. Select the data source.

    1. Hit “select measurement” and choose your source
      • depending on how you collect your data (CAN, XCP, OBDII, UDS, GPS) you will find the according sources there.
      • the source “collectd” is there by default and gives the user access to device information of the used connectivity device.
  2. Hit the “+” next to WHERE and choose “vehicle_name”

    1. select “select_tag_value” and choose a fixed vehicle or “/$vehicle/” (which will always show the data of the current chosen vehicle in the “Vehicle drop-down” menu. (See Create “Vehicle drop-down” menu).
  3. Select signals.

    1. hit “value” in field(value) and select your signal (all the signals defined in your measurement configuration is here, use the fuzzy search).
    2. hit “+” on the right side of the “SELECT” row and “Aliasing” - “alias”. Click on “alias” in alias(alias) and enter the signal name you want to use.

Before creating the “query”

Grafana-DB-11.png

After creating the “query”

Grafana-DB-12.png

Adjusting the units of your panel.

  1. Two options:
  • On the right side, scroll down to “Standard options” and choose your “Unit” (use the search function).
  • On the right side, hit the “Search options” search bar and enter “unit” to get to the same menu as with option 1.
  1. Change from “autoscale” to “fixed” axis.
  • Similar to changing units. Go to “Standard options” and enter the “Min” and/or “Max” value.
  1. You can change your “Panel Title” in the “Panel Options”.

4. Best practices for adding a second signal to a time series panel

Click the “+” icon in the “Select” row.

  • From there navigate to the bottom of the list and select “Fields” and then “field”.
Grafana-DB-13.png

Once you’ve added the second field you can populate the options just as you did for the first signal.

  • It’s important to know that if you add multiple fields into one panel, you might have to play with “Field Overrides”.
  • For Example to set the the proper units for both fields “VehicleSpeed” and “EngineSpeed” you must set the units seperately in the overrides section as seen below.
Grafana-DB-14.png

5. Creating and using the FF-Map Panel

Start by creating a new panel.

  • Hit “Add panel”.
Grafana-DB-15.png
  • Hit “Add empty panel” in the new panel
  • Change the visualization in the drop-down in the top right corner (“Time Series” is the default).
Grafana-DB-16.png
  • Navigate to “FF-Map” and select it.
Grafana-DB-17.png

Make your query:

  • Select your data source.

    • Hit “select measurement” and choose your source
      • depending on how you collect your data (CAN, XCP, OBDII, UDS, GPS) you will find the according sources there.
      • the source “collectd” is there by default and gives the user access to device information of the used connectivity device.
    • Hit the “+” next to WHERE and choose “vehicle_name”.
    • Select “select_tag_value” and choose a fixed vehicle or “/^$vehicle/” (which will always show the data of the current chosen vehicle in the “Vehicle drop-down” menu).
  • Select the signals.

    • At this point, the query should look something like this (Remember the heading direction, PsngSysHding in this case, is optional).
  • This example is done using CAN messages from the Vehicle - you can also do this using the “GPS” data in the “From” section

    • If you choose to do it this way, since your CAN bus does not have the relevant telemetry data from the vehicle - you do not need to perform the “math/” operator." Grafana-DB-18.png

The map should show the path of the vehicle.

Grafana-DB-19.png

If you are not seeing the path, or if the location appears incorrect.

  • The units for each field should be in degrees. Your vehicle’s device may not relay the data in degrees.
  • To fix, use the “math” function as an additional parameter to the signal selector.
  • In this case, we received the latitude/longitude coordinates in milli-arcseconds, so we divided by 3.6*10^6 to obtain degrees.
Grafana-DB-20.png

Setting the “Selector” to “last” can remove unncessary noise in the data.

  • Hit the “+” icon next to each field row, drop down the “Selectors” tab, and choose “last”.
  • Doing this will override the current selector.
Grafana-DB-21.png

Make sure that the time range is encapsulating your data.

Grafana-DB-22.png

At this point your FF-Map panel is ready for use.

  • The best way to make full use of this panel is by creating a separate Time Series panel to display a metric of your choice.
  • Then, as you hover your cursor over the Time Series graph, a marker will simultaneously move along the path, indicating the GPS location of the vehicle at that time.
  • If you have incorporate heading data to the query, the marker will automatically become an arrow. This indicates the direction of the vehicle at the specified time.
Grafana-DB-23.png
  • Scroll to zoom in/out, and drag the map to see different locations.
    • Return to a view of your path with the “Center Path” button.

6. Create “Vehicle drop-down” menu

On the “home” page of Grafana.

  • Click on the Dashboard Settings Cog Wheel in the top right of your page.
Grafana-DB-1.png

Select “Variables” in the left menu.

Grafana-DB-2.png

Click on the large “Add Variable” button.

Grafana-DB-3.png

Fill out the following values:

  • Name: vehicle_name
  • Label: Vehicle
  • Query: SHOW TAG VALUES WITH KEY =
Grafana-DB-4.png