The dashboard provide basic mechanism for displaying data via bar or pie charts.

Getting started

All example data in this tutorial was generated by Ralph's command - ralph make_demo_data.


Display graphs with quantity assets in each data centers.

First dashboard

First of all we must create new dasboard object in Ralph by clicking in menuDashboards > Dashboards next click Add new dashboard to add new one.


Next steps is create graph and configure it. add-first-graph

The important field of form above is Params - this field accepted configuration of graph in JSON format. Keys labels, series, filters are required. Below short description of these fields:

  • labels - which field in model are string representation,
  • series - aggregate by this field,
  • filters - filter query by conditions, Django ORM-like lookup (visit Django documentation for more information),
  • excludes - excludes items from results - opposite to filters.

OK, after save go our new dashboard object. Now we can see item (DC Capacity) in Graphs fields - select them. After save go to Dashboards > Dashboards in list view click Link. link-to-dashboard

Final result: link-dashboard-final

Special filters and fields

Special filters are some helpers to


series is special field which contains all annotated values and can be filtering like other fileds:

    "labels": "name",
    "series": "serverroom__rack",
    "filters": {
        "series__lt": 5

or, and

or, and extend query about extra condition, e.g.:

    "labels": "name",
    "series": "serverroom__rack",
    "excludes": {
        "name__exact|or": [null, ''],

Filters accept as a argument list of elements.


from_now works only with date and date-time fields in filters section, e.g.:

    "labels": "name",
    "series": "serverroom__rack__datacenterasset",
    "filters": {
        "created__gt|from_now": "-1y",

The filter above limit query to objects which created from one year ago to now. Possible variants of period:

  • y - years,
  • m - months,
  • d - days,


  • free assets aggregate by model name with invoice date from 2 years ago
  • from GET params to dashboard
  • len(params) > 3