terraform-provider-signalform

Dashboard

A dashboard is a curated collection of specific charts and supports dimensional filters, dashboard variables and time range options. These options are applied to all charts in the dashboard, providing a consistent view of the data displayed in that dashboard. This also means that when you open a chart to drill down for more details, you are viewing the same data that is visible in the dashboard view.

NOTE: Since every dashboard is included in a dashboard group (SignalFx collection of dashboards), you need to create that first and reference it as shown in the example.

Example Usage

resource "signalform_dashboard" "mydashboard0" {
    name = "My Dashboard"
    dashboard_group = "${signalform_dashboard_group.mydashboardgroup0.id}"

    time_range = "-30m"

    filter {
        property = "collector"
        values = ["cpu", "Diamond"]
    }
    variable {
        property = "region"
        alias = "region"
        values = ["uswest-1-"]
    }
    chart {
        chart_id = "${signalform_time_chart.mychart0.id}"
        width = 12
        height = 1
    }
    chart {
        chart_id = "${signalform_time_chart.mychart1.id}"
        width = 5
        height = 2
    }
}

Argument Reference

The following arguments are supported in the resource block:

Dashboard Layout Information

Every SignalFx dashboard is shown as a grid of 12 columns and potentially infinite number of rows. The dimension of the single column depends on the screen resolution.

When you define a dashboard resource, you need to specify which charts (by chart_id) should be displayed in the dashboard, along with layout information determining where on the dashboard the charts should be displayed. You have to assign to every chart a width in terms of number of column to cover up (from 1 to 12) and a height in terms of number of rows (more or equal than 1). You can also assign a position in the dashboard grid where you like the graph to stay. In order to do that, you assign a row that represent the topmost row of the chart and a column that represent the leftmost column of the chart. If by mistake, you wrote a configuration where there are not enough columns to accommodate your charts in a specific row, they will be split in different rows. In case a row was specified with value higher than 1, if all the rows above are not filled by other charts, the chart will be placed the first empty row.

The are a bunch of use cases where this layout makes things too verbose and hard to work with loops. For those you can now use one of these two layouts: grids and columns.

Grid

The dashboard is divided into equal-sized charts (defined by width and height). The charts are placed in the grid one after another starting from a row (called start_row) and a column (or start_column). If a chart does not fit in the same row (because the total width > max allowed by the dashboard), this and the next ones will be place in the next row(s).

Dashboard Grid

resource "signalform_dashboard" "grid_example" {
    name = "Grid"
    dashboard_group = "${signalform_dashboard_group.example.id}"
    time_range = "-15m"

    grid {
        chart_ids = ["${concat(signalform_time_chart.rps.*.id,
                signalform_time_chart.50ths.*.id,
                signalform_time_chart.99ths.*.id,
                signalform_time_chart.idle_workers.*.id,
                signalform_time_chart.cpu_idle.*.id)}"]
        width = 3
        height = 1
        start_row = 0
    }
}

Column

The dashboard is divided into equal-sized charts (defined by width and height). The charts are placed in the grid by column (column number is called column) starting from a row you specify (called start_row).

Dashboard Column

resource "signalform_dashboard" "load" {
    name = "Load"
    dashboard_group = "${signalform_dashboard_group.example.id}"

    column {
        chart_ids = ["${signalform_single_value_chart.rps.*.id}"]
        width = 2
    }
    column {
        chart_ids = ["${signalform_time_chart.cpu_capacity.*.id}"]
        column = 2
        width = 4
    }
    chart {
        chart_id = "${signalform_single_value_chart.loadbalancer_rps.id}"
        width = 2
        height = 1
        row = 0
        column = 6
    }
    chart {
        chart_id = "${signalform_time_chart.cpu_idle.id}"
        width = 4
        height = 1
        row = 0
        column = 8
    }
    chart {
        chart_id = "${signalform_time_chart.network.id}"
        width = 6
        height = 3
        row = 1
        column = 6
    }
    chart {
        chart_id = "${signalform_single_value_chart.disk.id}"
        width = 2
        height = 1
        row = 5
        column = 6
    }
    chart {
        chart_id = "${signalform_time_chart.mem.id}"
        width = 4
        height = 1
        row = 5
        column = 8
    }
}