Code Monkey home page Code Monkey logo

grafana-polystat-panel's Introduction

Grafana Polystat Panel

Marketplace Downloads License Known Vulnerabilities Maintainability Test Coverage Build Status

This panel plugin provides a D3-based multi-stat panel for Grafana 8.4+.

A hexagon is created for each metric received, with the ability to group metrics into a composite metric, and display the triggered state of the composite.

Screenshots

This plugin supports autoscaling for best-fit sizing of each polygon to the panel size. When the complete text cannot be displayed, only tooltips are active.

All visible

polystat-v2-agent-all-visible

Scaled down

polystat-v2-agent-scaled-down

Scaled down with tooltip

polystat-v2-agent-scaled-down-tooltip

Options

This panel provides a large number of customization options, and are searchable from the menu.

Layout

By default the plugin with automatically size the polygons to be displayed using a "best fit" calculation based on the size of the panel.

Auto Layout

Alternatively, you can specify both the number of columns and rows manually, or automated only one of them.

Columns

Max # of columns to create

Rows

Max # rows to create NOTE: if both columns and rows are set, only rows*columns will be displayed, generally one or none should be set.

Manual Layout

If there are not enough columns and rows to display all of the data, a warning will be displayed.

Manual Layout Warning

Display Limit

Sets a limit for the number of polygons to be displayed. Set this to 0 for no limit (the default value is 100).

Sizing

The size of the polygon by default is calculated for a best-fit, but it can be manually set if needed.

This section also provides an option to set a border on each polygon (the default value is 2 pixels).

Polygon Sizing

Deselect the auto-size option to manually set a size.

Polygon Border Sizing

The size of the border for each polygon can be set in this section. The color used can be found in the "Global" section.

Text

The plugin will attempt to display as much text as possible with the largest font possible across all polygons. The color, font size, and font family can be manually set.

Font Family

You can also set the font family to be used for the rendered text. Currently the default is Inter, and migrations will convert from Roboto to Inter

Auto Scale Fonts

Polygon Auto Text Font Size

Uncheck "Auto Scale Fonts" to manually enter a font size.

Polygon Manual Text Font Size

Automate Font Color

Uncheck "Automate Font Color" to manually set the font color. The automated option uses the current theme to pick a color, which may not be suitable for all cases.

Polygon Text Manual Font Color

Manually Set Font Color with color picker

Polygon Text Font Manual Color Picker

Sorting

The order (left to right) of the displayed polygons can be set with the sort options.

Sort Settings

The following directions are supported:

Sorting Directions

And the following fields:

Sorting Fields

Tooltips

Tooltips

Enable/Disable Tooltip

Toggles displaying tooltips for the panel

Tooltip Font Family

Sets the font family to be used in tooltips.

Show Timestamp

Toggles display of the timestamp at the bottom of the tooltip

Display mode

You can choose to display only metrics that have triggered a threshold in the tooltip, or display all metrics. This is useful when there are many metrics rolled up into a composite.

Tooltip Display Modes

Tooltip - Non Triggered State Text

When there are no threshold violations, this text will be displayed in the tooltip instead of the metric value. Leave blank if you want to show the value.

Tooltip Sorting

The following settings are used by composites when there are multiple metrics to be displayed.

Tooltips have a wider set of sort options to aid in displaying important data "at the top" of the tooltip. You can specify a field and direction to first sort by, plus a secondary field and direction. You can also disable sorting if needed.

Tooltip Sort Directions

Sort Direction
Disabled No sorting is performed
Alphabetical (asc) Ascending Alphabetical
Alphabetical (desc) Descending Alphabetical
Numerical (asc) Numerical Ascending
Numerical (descending) Numerical Descending
Alphabetical (case insensitive, asc) Case Insensitive Ascending Alphabetical
Alphabetical (case insensitive, desc) Case Insensitive Descending Alphabetical
Primary Sorting
Primary Sort Direction (see above table)

The type of sort to be applied to the tooltip metrics.

Primary Sort By Field

Which field to sort by

Tooltip Sort By Field

Sort By Field
Name name of the field - after all aliasing
Threshold Level from lowest to highest
Value raw value
Secondary Sorting

The secondary sorting works in the same manner as primary sorting, but can be in a different direction using a different field/threshold/value. This is applied after primary sorting is performed.

Secondary Sort Direction (see above table)
Secondary Sort By Field

Global

The following settings are available in the Global section, and are detailed below.

Global

Display Mode

You can choose to display only metrics that have triggered a threshold or display all metrics.

Display Mode
All All polygons are displayed
Triggered Only polygons with a threshold triggered are displayed

Global - Non Triggered State Text

Text to be displayed in polygon when there are no triggered thresholds and global display mode is set to triggered.

Show Value (Global)

Show the value of the metric along with the name.

Show Timestamp (Global)

This option will display the time of the metric in the polygon.

Global Show Timestamp

Timestamp Formats

Presets are provided for the timestamp, and the field will also accept a custom format.

Timestamp Position

The timestamp can be displayed above or below the value. If the value is not displayed, it will be place where the value is normally rendered.

Global Show Timestamp Position Above

Global Show Timestamp Position Below

Timestamp Y-Offset

This allows adjust the timestamp up or down to fine tune placement. Positive values move the timestamp down, negative values move it up.

Shape

Currently there are three shapes that can be selected, and each use a best fit method to maximize size to the panel.

Polygon Shapes

Hexagon Pointed Top

Polygon Hexagon Pointed Top

Circle

Polygon Circle

Square

Polygon Square

Use Color Gradients

This option will apply a shaded color instead of a uniform color.

Global Fill Color

This is the color used when there are no thresholds that apply to the metric or composite.

Global Border Color

The color of the border for each polygon can be set, and is used along with the size setting above.

Unit

All of the unit types are available in this selector and will be applied to the value displayed.

Stat

Select which statistic to display for the value. The full set of statistics that Grafana provides are available.

Decimals

This limits the number of decimals displayed.

Global Thresholds

This set of thresholds are applied to all metrics that do not have a matching override.

See the section thresholds below for details on how thresholds are evaluated.

Global Clickthrough

This clickthrough URL will be applied to all polygons that do not have an override or composite with a clickthrough specified.

Clickthrough - Sanitize URL

Normally this is enabled, and is intended to prevent malicious data entry.

Clickthrough - Open URL In New Tab

When checked, this will cause a new tab to be opened when you click on a polygon. For drill-down dashboards, disabling this is recommended.

Clickthrough - Enable Custom URL Target

Custom URL Target

When checked, this will allow you to set a custom value for the target attribute of the clickthrough. NOTE: This is only visible when Open in New Tab is disabled.

Clickthrough - Custom URL Target

Specify the content for the target attribute of the clickthrough URL.

Typical values are: _blank|_self|_parent|_top|

Global Aliasing

This field allows you to specify a regular expression to pick a portion of matching metric names to be rendered instead of the full name.

If you have these 3 Queries, returning a series: Foo-A, values 1,2,3 Bar-B, values 4,5,6 Misc, values 7,8,9

Before Aliasing

Adding the regular expression: /(Foo|Bar)/, will display:

After Aliasing

Specify a regular expression to pick a portion of matching metric names.

Overrides

Overrides are used to apply additional rendering options for metrics, including custom thresholds and clickthroughs.

This is an example override that sets the unit for metrics that match a regular expression:

Override without Thresholds

The same override with thresholds added:

Override with Thresholds

The final result of the above override with thresholds applied:

Override with Thresholds Rendered

Label

New in V2 is the ability to name overrides to find them easier when there are many being created. The label is not rendered on the polygon.

Metric

The panel will provide "hints" for metric names, and allow you to enter a regular expression to match multiple metrics.

Decimals (limit)

Sets the maximum number of decimals to be displayed. Leave this empty to show all decimals.

Statistic to Display (Stat)

This lets you specify a different statistic to use for the matching metric, and will replace the global statistic. As with the global setting, the full set of statistics Grafana provides are available.

Unit Formatting

All of the unit types are available in this selector and will be applied to the value displayed. A suffix is typically added by the formatter to indicate the unit like "B/sec" or symbols for temperatures, percentages, and similar.

Thresholds

An override can specify a set of thresholds that are to be applied to the matching metric, and will replace any global threshold settings.

See the section thresholds below for details on how thresholds are evaluated.

Prefix

Text in this field will be prepended to the rendered metric.

Suffix

Text in this field will be appended to the rendered metric after any unit text is applied.

Clickthrough URL

Use this to specify an URL to go to when the polygon is clicked on. Regular expression capture groups and template variables are available to form the URL.

Example using capture groups

For example, if we have multiple metrics like this:

hera_memutil
plex_memutil

And a regular expression for the override:

/(.*)_mem/

The capture group $1 can be used in the url:

/dashboard/detail-dash?var-HOSTNAME=$1

The url will end up being:

https://myserver/dashboard/detail-dash?var-HOSTNAME=hera

For more examples using template variables and regular expression capture groups see this section on templating

Sanitize URL

Normally this is enabled, and is intended to prevent malicious data entry.

Open URL in New Tab

When checked, this will cause a new tab to be opened when you click on the polygon. For drill-down dashboards, disabling this is recommended.

Enable Custom URL Target

Custom URL Target

When checked, this will allow you to set a custom value for the target attribute of the clickthrough. NOTE: This is only visible when Open URL in New Tab is disabled. This will override the equivalent global setting.

Custom URL Target

Specify the content for the target attribute of the clickthrough URL. This will override the equivalent global setting.

Typical values are: _blank|_self|_parent|_top|

Bottom Menu

There is a menu at the bottom right side of the override that provides additional controls.

Override Menu

Ordering

Up and Down arrows allow you move the override so you can force a different evaluation priority or simply to group similar overrides together.

Hide/Show

Use the "eye" icon to enable/disable the override.

Duplicate

This button will make a copy of the current override and append it to the end of the list. It will have a new name with "Copy" at the end.

Delete

This button will delete the override completely.

Composites

Composites allow you to combine multiple metrics into a single representation that reflects the "worst" state of the metrics combined. This is useful as a roll-up view of more complex systems being monitored.

When there are multiple metrics to be displayed by a composite, the polygon will cycle through each of them depending on the composite configuration.

Composites Options All

This is what two composites look like once they are rendered:

Composite Rendered

This is the tooltip that is displayed when hovering over the composite:

Composite Rendered with Tooltip

Animation Example

When there are multiple metrics the rendered polygon will cycle through each of them based on the composite settings.

Here's an example of two composites and their animation sequence:

Animation Example

Global Settings for Composites

There are two global settings that apply to all composites.

Enable Composites

A toggle is provided to quickly disable all composites from being rendered. Additionally each composite has a hide icon to toggle its visibility.

Animation Speed (ms)

This setting controls how fast the animation cycle occurs (in milliseconds).

Composite Settings

Composite Name

Sets the name of the composite to be rendered. This accepts a regular expression along with template variables.

Capture groups are also supported which allows you to simplify the name displayed using the alias option.

Show Name (composite)

This setting will hide/show the name on the displayed polygon.

Show Value (composite)

This setting will hide/show the values on the displayed polygon.

Show Members

When this is enabled, the composite is shown along with all of the metrics. Typically this is disabled and just the composite is displayed.

Display Mode (composite)

This will override the global display mode for just this composite. As with the global setting, you can choose to display only metrics that have triggered a threshold or display all metrics.

Display Mode
All All metrics are displayed
Triggered Only metrics with a threshold triggered are displayed

Clickthrough URL (composite)

Use this to specify an URL to go to when the polygon is clicked on. Regular expression capture groups and template variables are available to form the URL. See the overrides section for details on advanced usage.

Sanitize URL (composite)

Normally this is enabled, and is intended to prevent malicious data entry.

Open URL in New Tab (composite)

When checked, this will cause a new tab to be opened when you click on the polygon. For drill-down dashboards, disabling this is recommended.

Enable Custom URL Target (composite)

Custom URL Target

When checked, this will allow you to set a custom value for the target attribute of the clickthrough. NOTE: This is only visible when Open URL in New Tab is disabled.

Custom URL Target (composite)

Specify the content for the target attribute of the clickthrough URL.

Typical values are: _blank|_self|_parent|_top|

Bottom Menu (composite)

There is a menu at the bottom right side of the composite that provides additional controls.

Composite Bottom Menu

Ordering (composite)

Up and Down arrows allow you move the composite for easier grouping.

Hide/Show (composite)

Use the "eye" icon to enable/disable the composite.

Duplicate (composite)

This button will make a copy of the current composite and append it to the end of the list. It will have a new name with "Copy" at the end.

Delete (composite)

This button will delete the composite completely.

Adding Metrics to a Composite

The "Add Metric" button is used to append to the list of metrics to be included in the composite.

Composite Add Metric

Metric/Regex (composite)

The editor provides a list of metrics returned by your queries and also accepts a regular expression that may also include template variables.

NOTE: Template variables are expanded first, then the regex is applied to further filter which metrics are included in the composite.

Alias (composite)

If this has any content, it will be used instead of the metric name.

Capture groups from the metric name plus template variables are available to construct a new name to be displayed.

Using template variables, capture groups, and composite variables are detailed in section below

Value Mappings

This is a built-in option in Grafana and behaves in the same manner as documented here.

NOTE: Color assignments are ignored, only threshold colors are applied.

Thresholds Details

This plugin supports "ranged" states.

Thresholds are expected to be sorted by ascending value, where

T0 = lowest decimal value, any state
TN = highest decimal value, any state

Initial state is set to "ok"

A comparison is made using "greater than or equal to" against the value If value >= thresholdValue state = X

Comparisons are made in reverse order, using the range between the Nth (inclusive) threshold and N+1 (exclusive)

  InclusiveValue = T(n).value
  ExclusiveValue = T(n+1).value

When there is no n+1 threshold, the highest value threshold T(n), a simple inclusive >= comparison is made

Example 1: (typical linear)

    T0 - 5, ok
    T1 - 10, warning
    T2 - 20, critical
  Value >= 20 (Value >= T2)
  10 <= Value < 20  (T1 <= Value < T2)
  5 <= Value < 10   (T0 <= Value < T1)

Example 2: (reverse linear)

    T0 - 50, critical
    T1 - 90, warning
    T2 - 100, ok
  Value >= 100
  90 <= value < 100
  50 <= value < 90

Example 3: (bounded)

    T0 - 50, critical
    T1 - 60, warning
    T2 - 70, ok
    T3 - 80, warning
    T4 - 90, critical
    Value >= 90
    80 <= Value < 90
    70 <= Value < 80
    60 <= Value < 70
    50 <= Value < 60

The "worst" state is returned after checking every threshold range

Templating

Using Dashboard Template Variables

Template variables are available in the clickThroughUrl setting, specified by using ${varname}. They can also be passed to another dashboard by appending var-VARNAME=value to the url

/dashboard/xyz?var-VARNAME=${VARNAME}

Overrides using regular expressions with capture groups provide addition variables that can be referenced in a clickthroughUrl.

Example:

Regular Expression: /TEMP_(?<A_HOST>.*)_/ Clickthrough URL: /grafana/d/eCLHPr57k/drilldown?orgId=1&var-host=${A_HOST}

The above example will expand the capture named group A_HOST and replace the value in the specified URL.

Using Polystat Variables

Each polygon represents either a single metric, or a composite metric

An example drilldown clickthrough url can be specified like this:

dashboard/db/drilldown?var-HOSTNAME=${__cell_name}

NOTE: Metrics are sorted using the global options "Sorting" settings. Global filters are also applied before dereferencing is performed.

Single Metric Variables

The name and value of a polygon can be referenced using the following syntax:

  • Metric Name: ${__cell_name}
  • Metric Value: ${__cell}
  • Metric Raw Value: ${__cell:raw} syntax. By default values are URI encoded. Use this syntax to disable encoding
Composite Metric Variables

The names and values of a composite polygon can be referenced using the following syntax:

  • Composite Name: ${__composite_name}
  • Metric Name: ${__cell_name_n}
  • Metric Value: ${__cell_n}
  • Metric Raw Value: ${__cell_n:raw} syntax. By default values are URI encoded. Use this syntax to disable encoding

Building

This plugin relies on Plugin Tools, typical build sequence:

yarn install
yarn build

The code will be parsed then copied into "dist" if "tslint" passes without errors.

For development, you can run:

yarn dev

Docker Support

A docker-compose.yml file is include for easy development and testing, just run

docker-compose up

Then browse to http://localhost:3000

External Dependencies

  • Grafana 8.4+

Enable Grafana TestData

Grafana TestData is not enabled by default. To enable it, first navigate to the Plugins section, found in your Grafana main menu. Click the Apps tabs in the Plugins section and select the Grafana TestData App. (Or navigate to http://your_grafana_instance/plugins/testdata/edit to go directly there). Finally click the enable button to enable.

Acknowledgements

This panel is based on this D3 example:

Many thanks to contributors:

  • Mathieu Rollet (matletix)
  • Mattias Jiderhamn (mjiderhamn)
  • AnushaBoggarapu
  • KamalakarGoretta
  • Rene Hennig (renehennig)
  • Hamza Ziyani (HZiyani)

and many others!

grafana-polystat-panel's People

Contributors

anushaboggarapu avatar briangann avatar daniellee avatar dependabot[bot] avatar dgarc359 avatar dgarcia-collegeboard avatar hziyani avatar kamalakargoretta avatar matletix avatar mjiderhamn avatar renehennig avatar ryantxu avatar srclosson avatar stevenvachon avatar tolzhabayev avatar ukochka avatar w4rgrum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grafana-polystat-panel's Issues

Junk in panel json

The unit options are appearing in the panel json

{
  "animationModes": [
    {
      "text": "Show All",
      "value": "all"
    },
    {
      "text": "Show Triggered",
      "value": "triggered"
    }
  ],
  "colors": [
    "#299c46",
    "rgba(237, 129, 40, 0.89)",
    "#d44a3a"
  ],
  "d3DivId": "d3_svg_2",
  "datasource": "gdev-testdata",
  "decimals": 2,
  "displayModes": [
    {
      "text": "Show All",
      "value": "all"
    },
    {
      "text": "Show Triggered",
      "value": "triggered"
    }
  ],
  "fontSizes": [
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
    20,
    22,
    24,
    26,
    28,
    30,
    32,
    34,
    36,
    38,
    40,
    42,
    44,
    46,
    48,
    50,
    52,
    54,
    56,
    58,
    60,
    62,
    64,
    66,
    68,
    70
  ],
  "fontTypes": [
    "Open Sans",
    "Arial",
    "Avant Garde",
    "Bookman",
    "Consolas",
    "Courier",
    "Courier New",
    "Futura",
    "Garamond",
    "Helvetica",
    "Palatino",
    "Times",
    "Times New Roman",
    "Verdana"
  ],
  "format": "none",
  "gridPos": {
    "h": 9,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "id": 2,
  "notcolors": [
    "rgba(245, 54, 54, 0.9)",
    "rgba(237, 129, 40, 0.89)",
    "rgba(50, 172, 45, 0.97)"
  ],
  "operatorName": "avg",
  "operatorOptions": [
    {
      "text": "Average",
      "value": "avg"
    },
    {
      "text": "Count",
      "value": "count"
    },
    {
      "text": "Current",
      "value": "current"
    },
    {
      "text": "Delta",
      "value": "delta"
    },
    {
      "text": "Difference",
      "value": "diff"
    },
    {
      "text": "First",
      "value": "first"
    },
    {
      "text": "Log Min",
      "value": "logmin"
    },
    {
      "text": "Max",
      "value": "max"
    },
    {
      "text": "Min",
      "value": "min"
    },
    {
      "text": "Name",
      "value": "name"
    },
    {
      "text": "Time of Last Point",
      "value": "last_time"
    },
    {
      "text": "Time Step",
      "value": "time_step"
    },
    {
      "text": "Total",
      "value": "total"
    }
  ],
  "polystat": {
    "animationSpeed": 2500,
    "columnAutoSize": true,
    "columns": 1,
    "defaultClickThrough": "",
    "defaultClickThroughSanitize": true,
    "displayLimit": 100,
    "fontAutoScale": true,
    "fontSize": 12,
    "globalDisplayMode": "all",
    "globalOperatorName": "avg",
    "gradientEnabled": true,
    "hexagonSortByDirection": "asc",
    "hexagonSortByField": "name",
    "maxMetrics": 0,
    "polygonBorderColor": "black",
    "polygonBorderSize": 2,
    "radius": "",
    "radiusAutoSize": true,
    "rowAutoSize": true,
    "rows": 1,
    "shape": "hexagon_pointed_top",
    "tooltipDisplayMode": "all",
    "tooltipDisplayTextTriggeredEmpty": "OK",
    "tooltipFontSize": 12,
    "tooltipFontType": "Open Sans",
    "tooltipPrimarySortDirection": "desc",
    "tooltipPrimarySortField": "thresholdLevel",
    "tooltipSecondarySortDirection": "desc",
    "tooltipSecondarySortField": "value",
    "tooltipTimestampEnabled": true
  },
  "savedComposites": [],
  "savedOverrides": [],
  "shapes": [
    {
      "text": "Hexagon Pointed Top",
      "value": "hexagon_pointed_top"
    },
    {
      "text": "Hexagon Flat Top",
      "value": "hexagon_flat_top"
    },
    {
      "text": "Circle",
      "value": "circle"
    },
    {
      "text": "Cross",
      "value": "cross"
    },
    {
      "text": "Diamond",
      "value": "diamond"
    },
    {
      "text": "Square",
      "value": "square"
    },
    {
      "text": "Star",
      "value": "star"
    },
    {
      "text": "Triangle",
      "value": "triangle"
    },
    {
      "text": "Wye",
      "value": "wye"
    }
  ],
  "sortDirections": [
    {
      "text": "Ascending",
      "value": "asc"
    },
    {
      "text": "Descending",
      "value": "desc"
    }
  ],
  "sortFields": [
    {
      "text": "Name",
      "value": "name"
    },
    {
      "text": "Threshold Level",
      "value": "thresholdLevel"
    },
    {
      "text": "Value",
      "value": "value"
    }
  ],
  "svgContainer": {},
  "targets": [
    {
      "alias": "Sensor-A",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "A",
      "scenarioId": "csv_metric_values",
      "stringInput": "1,20,90,30,5,0"
    },
    {
      "alias": "Sensor-B",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "B",
      "scenarioId": "csv_metric_values",
      "stringInput": "3433,23432,55"
    },
    {
      "alias": "Sensor-C",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "C",
      "scenarioId": "csv_metric_values",
      "stringInput": "1,2,3,4,5,6"
    },
    {
      "alias": "Sensor-E",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "D",
      "scenarioId": "csv_metric_values",
      "stringInput": "1,20,90,30,5,0"
    }
  ],
  "thresholdStates": [
    {
      "text": "ok",
      "value": 0
    },
    {
      "text": "warning",
      "value": 1
    },
    {
      "text": "critical",
      "value": 2
    },
    {
      "text": "custom",
      "value": 3
    }
  ],
  "title": "Panel Title",
  "type": "grafana-polystat-panel",
  "unitFormats": [
    {
      "submenu": [
        {
          "text": "none",
          "value": "none"
        },
        {
          "text": "short",
          "value": "short"
        },
        {
          "text": "percent (0-100)",
          "value": "percent"
        },
        {
          "text": "percent (0.0-1.0)",
          "value": "percentunit"
        },
        {
          "text": "Humidity (%H)",
          "value": "humidity"
        },
        {
          "text": "decibel",
          "value": "dB"
        },
        {
          "text": "hexadecimal (0x)",
          "value": "hex0x"
        },
        {
          "text": "hexadecimal",
          "value": "hex"
        },
        {
          "text": "scientific notation",
          "value": "sci"
        },
        {
          "text": "locale format",
          "value": "locale"
        }
      ],
      "text": "none"
    },
    {
      "submenu": [
        {
          "text": "Dollars ($)",
          "value": "currencyUSD"
        },
        {
          "text": "Pounds (ยฃ)",
          "value": "currencyGBP"
        },
        {
          "text": "Euro (โ‚ฌ)",
          "value": "currencyEUR"
        },
        {
          "text": "Yen (ยฅ)",
          "value": "currencyJPY"
        },
        {
          "text": "Rubles (โ‚ฝ)",
          "value": "currencyRUB"
        },
        {
          "text": "Hryvnias (โ‚ด)",
          "value": "currencyUAH"
        },
        {
          "text": "Real (R$)",
          "value": "currencyBRL"
        },
        {
          "text": "Danish Krone (kr)",
          "value": "currencyDKK"
        },
        {
          "text": "Icelandic Krรณna (kr)",
          "value": "currencyISK"
        },
        {
          "text": "Norwegian Krone (kr)",
          "value": "currencyNOK"
        },
        {
          "text": "Swedish Krona (kr)",
          "value": "currencySEK"
        },
        {
          "text": "Czech koruna (czk)",
          "value": "currencyCZK"
        },
        {
          "text": "Swiss franc (CHF)",
          "value": "currencyCHF"
        },
        {
          "text": "Polish Zล‚oty (PLN)",
          "value": "currencyPLN"
        },
        {
          "text": "Bitcoin (เธฟ)",
          "value": "currencyBTC"
        }
      ],
      "text": "currency"
    },
    {
      "submenu": [
        {
          "text": "Hertz (1/s)",
          "value": "hertz"
        },
        {
          "text": "nanoseconds (ns)",
          "value": "ns"
        },
        {
          "text": "microseconds (ยตs)",
          "value": "ยตs"
        },
        {
          "text": "milliseconds (ms)",
          "value": "ms"
        },
        {
          "text": "seconds (s)",
          "value": "s"
        },
        {
          "text": "minutes (m)",
          "value": "m"
        },
        {
          "text": "hours (h)",
          "value": "h"
        },
        {
          "text": "days (d)",
          "value": "d"
        },
        {
          "text": "duration (ms)",
          "value": "dtdurationms"
        },
        {
          "text": "duration (s)",
          "value": "dtdurations"
        },
        {
          "text": "duration (hh:mm:ss)",
          "value": "dthms"
        },
        {
          "text": "Timeticks (s/100)",
          "value": "timeticks"
        }
      ],
      "text": "time"
    },
    {
      "submenu": [
        {
          "text": "YYYY-MM-DD HH:mm:ss",
          "value": "dateTimeAsIso"
        },
        {
          "text": "DD/MM/YYYY h:mm:ss a",
          "value": "dateTimeAsUS"
        },
        {
          "text": "From Now",
          "value": "dateTimeFromNow"
        }
      ],
      "text": "date & time"
    },
    {
      "submenu": [
        {
          "text": "bits",
          "value": "bits"
        },
        {
          "text": "bytes",
          "value": "bytes"
        },
        {
          "text": "kibibytes",
          "value": "kbytes"
        },
        {
          "text": "mebibytes",
          "value": "mbytes"
        },
        {
          "text": "gibibytes",
          "value": "gbytes"
        }
      ],
      "text": "data (IEC)"
    },
    {
      "submenu": [
        {
          "text": "bits",
          "value": "decbits"
        },
        {
          "text": "bytes",
          "value": "decbytes"
        },
        {
          "text": "kilobytes",
          "value": "deckbytes"
        },
        {
          "text": "megabytes",
          "value": "decmbytes"
        },
        {
          "text": "gigabytes",
          "value": "decgbytes"
        }
      ],
      "text": "data (Metric)"
    },
    {
      "submenu": [
        {
          "text": "packets/sec",
          "value": "pps"
        },
        {
          "text": "bits/sec",
          "value": "bps"
        },
        {
          "text": "bytes/sec",
          "value": "Bps"
        },
        {
          "text": "kilobits/sec",
          "value": "Kbits"
        },
        {
          "text": "kilobytes/sec",
          "value": "KBs"
        },
        {
          "text": "megabits/sec",
          "value": "Mbits"
        },
        {
          "text": "megabytes/sec",
          "value": "MBs"
        },
        {
          "text": "gigabytes/sec",
          "value": "GBs"
        },
        {
          "text": "gigabits/sec",
          "value": "Gbits"
        }
      ],
      "text": "data rate"
    },
    {
      "submenu": [
        {
          "text": "hashes/sec",
          "value": "Hs"
        },
        {
          "text": "kilohashes/sec",
          "value": "KHs"
        },
        {
          "text": "megahashes/sec",
          "value": "MHs"
        },
        {
          "text": "gigahashes/sec",
          "value": "GHs"
        },
        {
          "text": "terahashes/sec",
          "value": "THs"
        },
        {
          "text": "petahashes/sec",
          "value": "PHs"
        },
        {
          "text": "exahashes/sec",
          "value": "EHs"
        }
      ],
      "text": "hash rate"
    },
    {
      "submenu": [
        {
          "text": "ops/sec (ops)",
          "value": "ops"
        },
        {
          "text": "requests/sec (rps)",
          "value": "reqps"
        },
        {
          "text": "reads/sec (rps)",
          "value": "rps"
        },
        {
          "text": "writes/sec (wps)",
          "value": "wps"
        },
        {
          "text": "I/O ops/sec (iops)",
          "value": "iops"
        },
        {
          "text": "ops/min (opm)",
          "value": "opm"
        },
        {
          "text": "reads/min (rpm)",
          "value": "rpm"
        },
        {
          "text": "writes/min (wpm)",
          "value": "wpm"
        }
      ],
      "text": "throughput"
    },
    {
      "submenu": [
        {
          "text": "millimetre (mm)",
          "value": "lengthmm"
        },
        {
          "text": "meter (m)",
          "value": "lengthm"
        },
        {
          "text": "feet (ft)",
          "value": "lengthft"
        },
        {
          "text": "kilometer (km)",
          "value": "lengthkm"
        },
        {
          "text": "mile (mi)",
          "value": "lengthmi"
        }
      ],
      "text": "length"
    },
    {
      "submenu": [
        {
          "text": "Square Meters (mยฒ)",
          "value": "areaM2"
        },
        {
          "text": "Square Feet (ftยฒ)",
          "value": "areaF2"
        },
        {
          "text": "Square Miles (miยฒ)",
          "value": "areaMI2"
        }
      ],
      "text": "area"
    },
    {
      "submenu": [
        {
          "text": "milligram (mg)",
          "value": "massmg"
        },
        {
          "text": "gram (g)",
          "value": "massg"
        },
        {
          "text": "kilogram (kg)",
          "value": "masskg"
        },
        {
          "text": "metric ton (t)",
          "value": "masst"
        }
      ],
      "text": "mass"
    },
    {
      "submenu": [
        {
          "text": "metres/second (m/s)",
          "value": "velocityms"
        },
        {
          "text": "kilometers/hour (km/h)",
          "value": "velocitykmh"
        },
        {
          "text": "miles/hour (mph)",
          "value": "velocitymph"
        },
        {
          "text": "knot (kn)",
          "value": "velocityknot"
        }
      ],
      "text": "velocity"
    },
    {
      "submenu": [
        {
          "text": "millilitre (mL)",
          "value": "mlitre"
        },
        {
          "text": "litre (L)",
          "value": "litre"
        },
        {
          "text": "cubic metre",
          "value": "m3"
        },
        {
          "text": "Normal cubic metre",
          "value": "Nm3"
        },
        {
          "text": "cubic decimetre",
          "value": "dm3"
        },
        {
          "text": "gallons",
          "value": "gallons"
        }
      ],
      "text": "volume"
    },
    {
      "submenu": [
        {
          "text": "Watt (W)",
          "value": "watt"
        },
        {
          "text": "Kilowatt (kW)",
          "value": "kwatt"
        },
        {
          "text": "Milliwatt (mW)",
          "value": "mwatt"
        },
        {
          "text": "Watt per square metre (W/mยฒ)",
          "value": "Wm2"
        },
        {
          "text": "Volt-ampere (VA)",
          "value": "voltamp"
        },
        {
          "text": "Kilovolt-ampere (kVA)",
          "value": "kvoltamp"
        },
        {
          "text": "Volt-ampere reactive (var)",
          "value": "voltampreact"
        },
        {
          "text": "Kilovolt-ampere reactive (kvar)",
          "value": "kvoltampreact"
        },
        {
          "text": "Watt-hour (Wh)",
          "value": "watth"
        },
        {
          "text": "Kilowatt-hour (kWh)",
          "value": "kwatth"
        },
        {
          "text": "Kilowatt-min (kWm)",
          "value": "kwattm"
        },
        {
          "text": "Joule (J)",
          "value": "joule"
        },
        {
          "text": "Electron volt (eV)",
          "value": "ev"
        },
        {
          "text": "Ampere (A)",
          "value": "amp"
        },
        {
          "text": "Kiloampere (kA)",
          "value": "kamp"
        },
        {
          "text": "Milliampere (mA)",
          "value": "mamp"
        },
        {
          "text": "Volt (V)",
          "value": "volt"
        },
        {
          "text": "Kilovolt (kV)",
          "value": "kvolt"
        },
        {
          "text": "Millivolt (mV)",
          "value": "mvolt"
        },
        {
          "text": "Decibel-milliwatt (dBm)",
          "value": "dBm"
        },
        {
          "text": "Ohm (ฮฉ)",
          "value": "ohm"
        },
        {
          "text": "Lumens (Lm)",
          "value": "lumens"
        }
      ],
      "text": "energy"
    },
    {
      "submenu": [
        {
          "text": "Celsius (ยฐC)",
          "value": "celsius"
        },
        {
          "text": "Farenheit (ยฐF)",
          "value": "farenheit"
        },
        {
          "text": "Kelvin (K)",
          "value": "kelvin"
        }
      ],
      "text": "temperature"
    },
    {
      "submenu": [
        {
          "text": "Millibars",
          "value": "pressurembar"
        },
        {
          "text": "Bars",
          "value": "pressurebar"
        },
        {
          "text": "Kilobars",
          "value": "pressurekbar"
        },
        {
          "text": "Hectopascals",
          "value": "pressurehpa"
        },
        {
          "text": "Kilopascals",
          "value": "pressurekpa"
        },
        {
          "text": "Inches of mercury",
          "value": "pressurehg"
        },
        {
          "text": "PSI",
          "value": "pressurepsi"
        }
      ],
      "text": "pressure"
    },
    {
      "submenu": [
        {
          "text": "Newton-meters (Nm)",
          "value": "forceNm"
        },
        {
          "text": "Kilonewton-meters (kNm)",
          "value": "forcekNm"
        },
        {
          "text": "Newtons (N)",
          "value": "forceN"
        },
        {
          "text": "Kilonewtons (kN)",
          "value": "forcekN"
        }
      ],
      "text": "force"
    },
    {
      "submenu": [
        {
          "text": "Gallons/min (gpm)",
          "value": "flowgpm"
        },
        {
          "text": "Cubic meters/sec (cms)",
          "value": "flowcms"
        },
        {
          "text": "Cubic feet/sec (cfs)",
          "value": "flowcfs"
        },
        {
          "text": "Cubic feet/min (cfm)",
          "value": "flowcfm"
        },
        {
          "text": "Litre/hour",
          "value": "litreh"
        },
        {
          "text": "Litre/min (l/min)",
          "value": "flowlpm"
        },
        {
          "text": "milliLitre/min (mL/min)",
          "value": "flowmlpm"
        }
      ],
      "text": "flow"
    },
    {
      "submenu": [
        {
          "text": "Degrees (ยฐ)",
          "value": "degree"
        },
        {
          "text": "Radians",
          "value": "radian"
        },
        {
          "text": "Gradian",
          "value": "grad"
        }
      ],
      "text": "angle"
    },
    {
      "submenu": [
        {
          "text": "Meters/secยฒ",
          "value": "accMS2"
        },
        {
          "text": "Feet/secยฒ",
          "value": "accFS2"
        },
        {
          "text": "G unit",
          "value": "accG"
        }
      ],
      "text": "acceleration"
    },
    {
      "submenu": [
        {
          "text": "Becquerel (Bq)",
          "value": "radbq"
        },
        {
          "text": "curie (Ci)",
          "value": "radci"
        },
        {
          "text": "Gray (Gy)",
          "value": "radgy"
        },
        {
          "text": "rad",
          "value": "radrad"
        },
        {
          "text": "Sievert (Sv)",
          "value": "radsv"
        },
        {
          "text": "rem",
          "value": "radrem"
        },
        {
          "text": "Exposure (C/kg)",
          "value": "radexpckg"
        },
        {
          "text": "roentgen (R)",
          "value": "radr"
        },
        {
          "text": "Sievert/hour (Sv/h)",
          "value": "radsvh"
        }
      ],
      "text": "radiation"
    },
    {
      "submenu": [
        {
          "text": "parts-per-million (ppm)",
          "value": "ppm"
        },
        {
          "text": "parts-per-billion (ppb)",
          "value": "conppb"
        },
        {
          "text": "nanogram per cubic metre (ng/mยณ)",
          "value": "conngm3"
        },
        {
          "text": "nanogram per normal cubic metre (ng/Nmยณ)",
          "value": "conngNm3"
        },
        {
          "text": "microgram per cubic metre (ฮผg/mยณ)",
          "value": "conฮผgm3"
        },
        {
          "text": "microgram per normal cubic metre (ฮผg/Nmยณ)",
          "value": "conฮผgNm3"
        },
        {
          "text": "milligram per cubic metre (mg/mยณ)",
          "value": "conmgm3"
        },
        {
          "text": "milligram per normal cubic metre (mg/Nmยณ)",
          "value": "conmgNm3"
        },
        {
          "text": "gram per cubic metre (g/mยณ)",
          "value": "congm3"
        },
        {
          "text": "gram per normal cubic metre (g/Nmยณ)",
          "value": "congNm3"
        }
      ],
      "text": "concentration"
    }
  ],
  "links": []
}

Default to short unit

By default the unit is showing a lot of decimals.
image

Wonder if we can default to the "short" unit. Not finding an option to change unit anywhere, is it only in an override?

Composites UX & Issues

image

Bugs

  • In the state of the screenshot when I add a new metric to the composite (B-series) panel crashes with:
    image

UX

  • Sanitize using old checkbox component.
  • Space to left of Animate Mode label looks off, there should be no space to left of form label.

image

The Add Metric + is very unclear that it is more than a label. Suggest we take a page from graphite query editor and have the label say "Series", and a plus button to the right (will add a series name field to the left).
image

Size of cells change when going from metrics tab to options tab

Setup the dev provisioned dashboards and data sources:
https://github.com/grafana/grafana/tree/master/devenv

Then you get the gdev-testdata data source which the panel below is using.

Switching between metrics and options tab will change size of cells for some reason.

{
  "animationModes": [
    {
      "text": "Show All",
      "value": "all"
    },
    {
      "text": "Show Triggered",
      "value": "triggered"
    }
  ],
  "colors": [
    "#299c46",
    "rgba(237, 129, 40, 0.89)",
    "#d44a3a"
  ],
  "d3DivId": "d3_svg_2",
  "datasource": "gdev-testdata",
  "decimals": 2,
  "displayModes": [
    {
      "text": "Show All",
      "value": "all"
    },
    {
      "text": "Show Triggered",
      "value": "triggered"
    }
  ],
  "fontSizes": [
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    11,
    12,
    13,
    14,
    15,
    16,
    17,
    18,
    19,
    20,
    22,
    24,
    26,
    28,
    30,
    32,
    34,
    36,
    38,
    40,
    42,
    44,
    46,
    48,
    50,
    52,
    54,
    56,
    58,
    60,
    62,
    64,
    66,
    68,
    70
  ],
  "fontTypes": [
    "Open Sans",
    "Arial",
    "Avant Garde",
    "Bookman",
    "Consolas",
    "Courier",
    "Courier New",
    "Futura",
    "Garamond",
    "Helvetica",
    "Palatino",
    "Times",
    "Times New Roman",
    "Verdana"
  ],
  "format": "none",
  "gridPos": {
    "h": 9,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "id": 2,
  "notcolors": [
    "rgba(245, 54, 54, 0.9)",
    "rgba(237, 129, 40, 0.89)",
    "rgba(50, 172, 45, 0.97)"
  ],
  "operatorName": "avg",
  "operatorOptions": [
    {
      "text": "Average",
      "value": "avg"
    },
    {
      "text": "Count",
      "value": "count"
    },
    {
      "text": "Current",
      "value": "current"
    },
    {
      "text": "Delta",
      "value": "delta"
    },
    {
      "text": "Difference",
      "value": "diff"
    },
    {
      "text": "First",
      "value": "first"
    },
    {
      "text": "Log Min",
      "value": "logmin"
    },
    {
      "text": "Max",
      "value": "max"
    },
    {
      "text": "Min",
      "value": "min"
    },
    {
      "text": "Name",
      "value": "name"
    },
    {
      "text": "Time of Last Point",
      "value": "last_time"
    },
    {
      "text": "Time Step",
      "value": "time_step"
    },
    {
      "text": "Total",
      "value": "total"
    }
  ],
  "polystat": {
    "animationSpeed": 2500,
    "columnAutoSize": true,
    "columns": 1,
    "defaultClickThrough": "",
    "defaultClickThroughSanitize": true,
    "displayLimit": 100,
    "fontAutoScale": true,
    "fontSize": 12,
    "globalDisplayMode": "all",
    "globalOperatorName": "avg",
    "gradientEnabled": true,
    "hexagonSortByDirection": "asc",
    "hexagonSortByField": "name",
    "maxMetrics": 0,
    "polygonBorderColor": "black",
    "polygonBorderSize": 2,
    "radius": "",
    "radiusAutoSize": true,
    "rowAutoSize": true,
    "rows": 1,
    "shape": "hexagon_pointed_top",
    "tooltipDisplayMode": "all",
    "tooltipDisplayTextTriggeredEmpty": "OK",
    "tooltipFontSize": 12,
    "tooltipFontType": "Open Sans",
    "tooltipPrimarySortDirection": "desc",
    "tooltipPrimarySortField": "thresholdLevel",
    "tooltipSecondarySortDirection": "desc",
    "tooltipSecondarySortField": "value",
    "tooltipTimestampEnabled": true
  },
  "savedComposites": [],
  "savedOverrides": [],
  "shapes": [
    {
      "text": "Hexagon Pointed Top",
      "value": "hexagon_pointed_top"
    },
    {
      "text": "Hexagon Flat Top",
      "value": "hexagon_flat_top"
    },
    {
      "text": "Circle",
      "value": "circle"
    },
    {
      "text": "Cross",
      "value": "cross"
    },
    {
      "text": "Diamond",
      "value": "diamond"
    },
    {
      "text": "Square",
      "value": "square"
    },
    {
      "text": "Star",
      "value": "star"
    },
    {
      "text": "Triangle",
      "value": "triangle"
    },
    {
      "text": "Wye",
      "value": "wye"
    }
  ],
  "sortDirections": [
    {
      "text": "Ascending",
      "value": "asc"
    },
    {
      "text": "Descending",
      "value": "desc"
    }
  ],
  "sortFields": [
    {
      "text": "Name",
      "value": "name"
    },
    {
      "text": "Threshold Level",
      "value": "thresholdLevel"
    },
    {
      "text": "Value",
      "value": "value"
    }
  ],
  "svgContainer": {},
  "targets": [
    {
      "alias": "Sensor-A",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "A",
      "scenarioId": "csv_metric_values",
      "stringInput": "1,20,90,30,5,0"
    },
    {
      "alias": "Sensor-B",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "B",
      "scenarioId": "csv_metric_values",
      "stringInput": "3433,23432,55"
    },
    {
      "alias": "Sensor-C",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "C",
      "scenarioId": "csv_metric_values",
      "stringInput": "1,2,3,4,5,6"
    },
    {
      "alias": "Sensor-E",
      "expr": "",
      "format": "time_series",
      "intervalFactor": 1,
      "refId": "D",
      "scenarioId": "csv_metric_values",
      "stringInput": "1,20,90,30,5,0"
    }
  ],
  "thresholdStates": [
    {
      "text": "ok",
      "value": 0
    },
    {
      "text": "warning",
      "value": 1
    },
    {
      "text": "critical",
      "value": 2
    },
    {
      "text": "custom",
      "value": 3
    }
  ],
  "title": "Panel Title",
  "type": "grafana-polystat-panel",
  "unitFormats": [
    {
      "submenu": [
        {
          "text": "none",
          "value": "none"
        },
        {
          "text": "short",
          "value": "short"
        },
        {
          "text": "percent (0-100)",
          "value": "percent"
        },
        {
          "text": "percent (0.0-1.0)",
          "value": "percentunit"
        },
        {
          "text": "Humidity (%H)",
          "value": "humidity"
        },
        {
          "text": "decibel",
          "value": "dB"
        },
        {
          "text": "hexadecimal (0x)",
          "value": "hex0x"
        },
        {
          "text": "hexadecimal",
          "value": "hex"
        },
        {
          "text": "scientific notation",
          "value": "sci"
        },
        {
          "text": "locale format",
          "value": "locale"
        }
      ],
      "text": "none"
    },
    {
      "submenu": [
        {
          "text": "Dollars ($)",
          "value": "currencyUSD"
        },
        {
          "text": "Pounds (ยฃ)",
          "value": "currencyGBP"
        },
        {
          "text": "Euro (โ‚ฌ)",
          "value": "currencyEUR"
        },
        {
          "text": "Yen (ยฅ)",
          "value": "currencyJPY"
        },
        {
          "text": "Rubles (โ‚ฝ)",
          "value": "currencyRUB"
        },
        {
          "text": "Hryvnias (โ‚ด)",
          "value": "currencyUAH"
        },
        {
          "text": "Real (R$)",
          "value": "currencyBRL"
        },
        {
          "text": "Danish Krone (kr)",
          "value": "currencyDKK"
        },
        {
          "text": "Icelandic Krรณna (kr)",
          "value": "currencyISK"
        },
        {
          "text": "Norwegian Krone (kr)",
          "value": "currencyNOK"
        },
        {
          "text": "Swedish Krona (kr)",
          "value": "currencySEK"
        },
        {
          "text": "Czech koruna (czk)",
          "value": "currencyCZK"
        },
        {
          "text": "Swiss franc (CHF)",
          "value": "currencyCHF"
        },
        {
          "text": "Polish Zล‚oty (PLN)",
          "value": "currencyPLN"
        },
        {
          "text": "Bitcoin (เธฟ)",
          "value": "currencyBTC"
        }
      ],
      "text": "currency"
    },
    {
      "submenu": [
        {
          "text": "Hertz (1/s)",
          "value": "hertz"
        },
        {
          "text": "nanoseconds (ns)",
          "value": "ns"
        },
        {
          "text": "microseconds (ยตs)",
          "value": "ยตs"
        },
        {
          "text": "milliseconds (ms)",
          "value": "ms"
        },
        {
          "text": "seconds (s)",
          "value": "s"
        },
        {
          "text": "minutes (m)",
          "value": "m"
        },
        {
          "text": "hours (h)",
          "value": "h"
        },
        {
          "text": "days (d)",
          "value": "d"
        },
        {
          "text": "duration (ms)",
          "value": "dtdurationms"
        },
        {
          "text": "duration (s)",
          "value": "dtdurations"
        },
        {
          "text": "duration (hh:mm:ss)",
          "value": "dthms"
        },
        {
          "text": "Timeticks (s/100)",
          "value": "timeticks"
        }
      ],
      "text": "time"
    },
    {
      "submenu": [
        {
          "text": "YYYY-MM-DD HH:mm:ss",
          "value": "dateTimeAsIso"
        },
        {
          "text": "DD/MM/YYYY h:mm:ss a",
          "value": "dateTimeAsUS"
        },
        {
          "text": "From Now",
          "value": "dateTimeFromNow"
        }
      ],
      "text": "date & time"
    },
    {
      "submenu": [
        {
          "text": "bits",
          "value": "bits"
        },
        {
          "text": "bytes",
          "value": "bytes"
        },
        {
          "text": "kibibytes",
          "value": "kbytes"
        },
        {
          "text": "mebibytes",
          "value": "mbytes"
        },
        {
          "text": "gibibytes",
          "value": "gbytes"
        }
      ],
      "text": "data (IEC)"
    },
    {
      "submenu": [
        {
          "text": "bits",
          "value": "decbits"
        },
        {
          "text": "bytes",
          "value": "decbytes"
        },
        {
          "text": "kilobytes",
          "value": "deckbytes"
        },
        {
          "text": "megabytes",
          "value": "decmbytes"
        },
        {
          "text": "gigabytes",
          "value": "decgbytes"
        }
      ],
      "text": "data (Metric)"
    },
    {
      "submenu": [
        {
          "text": "packets/sec",
          "value": "pps"
        },
        {
          "text": "bits/sec",
          "value": "bps"
        },
        {
          "text": "bytes/sec",
          "value": "Bps"
        },
        {
          "text": "kilobits/sec",
          "value": "Kbits"
        },
        {
          "text": "kilobytes/sec",
          "value": "KBs"
        },
        {
          "text": "megabits/sec",
          "value": "Mbits"
        },
        {
          "text": "megabytes/sec",
          "value": "MBs"
        },
        {
          "text": "gigabytes/sec",
          "value": "GBs"
        },
        {
          "text": "gigabits/sec",
          "value": "Gbits"
        }
      ],
      "text": "data rate"
    },
    {
      "submenu": [
        {
          "text": "hashes/sec",
          "value": "Hs"
        },
        {
          "text": "kilohashes/sec",
          "value": "KHs"
        },
        {
          "text": "megahashes/sec",
          "value": "MHs"
        },
        {
          "text": "gigahashes/sec",
          "value": "GHs"
        },
        {
          "text": "terahashes/sec",
          "value": "THs"
        },
        {
          "text": "petahashes/sec",
          "value": "PHs"
        },
        {
          "text": "exahashes/sec",
          "value": "EHs"
        }
      ],
      "text": "hash rate"
    },
    {
      "submenu": [
        {
          "text": "ops/sec (ops)",
          "value": "ops"
        },
        {
          "text": "requests/sec (rps)",
          "value": "reqps"
        },
        {
          "text": "reads/sec (rps)",
          "value": "rps"
        },
        {
          "text": "writes/sec (wps)",
          "value": "wps"
        },
        {
          "text": "I/O ops/sec (iops)",
          "value": "iops"
        },
        {
          "text": "ops/min (opm)",
          "value": "opm"
        },
        {
          "text": "reads/min (rpm)",
          "value": "rpm"
        },
        {
          "text": "writes/min (wpm)",
          "value": "wpm"
        }
      ],
      "text": "throughput"
    },
    {
      "submenu": [
        {
          "text": "millimetre (mm)",
          "value": "lengthmm"
        },
        {
          "text": "meter (m)",
          "value": "lengthm"
        },
        {
          "text": "feet (ft)",
          "value": "lengthft"
        },
        {
          "text": "kilometer (km)",
          "value": "lengthkm"
        },
        {
          "text": "mile (mi)",
          "value": "lengthmi"
        }
      ],
      "text": "length"
    },
    {
      "submenu": [
        {
          "text": "Square Meters (mยฒ)",
          "value": "areaM2"
        },
        {
          "text": "Square Feet (ftยฒ)",
          "value": "areaF2"
        },
        {
          "text": "Square Miles (miยฒ)",
          "value": "areaMI2"
        }
      ],
      "text": "area"
    },
    {
      "submenu": [
        {
          "text": "milligram (mg)",
          "value": "massmg"
        },
        {
          "text": "gram (g)",
          "value": "massg"
        },
        {
          "text": "kilogram (kg)",
          "value": "masskg"
        },
        {
          "text": "metric ton (t)",
          "value": "masst"
        }
      ],
      "text": "mass"
    },
    {
      "submenu": [
        {
          "text": "metres/second (m/s)",
          "value": "velocityms"
        },
        {
          "text": "kilometers/hour (km/h)",
          "value": "velocitykmh"
        },
        {
          "text": "miles/hour (mph)",
          "value": "velocitymph"
        },
        {
          "text": "knot (kn)",
          "value": "velocityknot"
        }
      ],
      "text": "velocity"
    },
    {
      "submenu": [
        {
          "text": "millilitre (mL)",
          "value": "mlitre"
        },
        {
          "text": "litre (L)",
          "value": "litre"
        },
        {
          "text": "cubic metre",
          "value": "m3"
        },
        {
          "text": "Normal cubic metre",
          "value": "Nm3"
        },
        {
          "text": "cubic decimetre",
          "value": "dm3"
        },
        {
          "text": "gallons",
          "value": "gallons"
        }
      ],
      "text": "volume"
    },
    {
      "submenu": [
        {
          "text": "Watt (W)",
          "value": "watt"
        },
        {
          "text": "Kilowatt (kW)",
          "value": "kwatt"
        },
        {
          "text": "Milliwatt (mW)",
          "value": "mwatt"
        },
        {
          "text": "Watt per square metre (W/mยฒ)",
          "value": "Wm2"
        },
        {
          "text": "Volt-ampere (VA)",
          "value": "voltamp"
        },
        {
          "text": "Kilovolt-ampere (kVA)",
          "value": "kvoltamp"
        },
        {
          "text": "Volt-ampere reactive (var)",
          "value": "voltampreact"
        },
        {
          "text": "Kilovolt-ampere reactive (kvar)",
          "value": "kvoltampreact"
        },
        {
          "text": "Watt-hour (Wh)",
          "value": "watth"
        },
        {
          "text": "Kilowatt-hour (kWh)",
          "value": "kwatth"
        },
        {
          "text": "Kilowatt-min (kWm)",
          "value": "kwattm"
        },
        {
          "text": "Joule (J)",
          "value": "joule"
        },
        {
          "text": "Electron volt (eV)",
          "value": "ev"
        },
        {
          "text": "Ampere (A)",
          "value": "amp"
        },
        {
          "text": "Kiloampere (kA)",
          "value": "kamp"
        },
        {
          "text": "Milliampere (mA)",
          "value": "mamp"
        },
        {
          "text": "Volt (V)",
          "value": "volt"
        },
        {
          "text": "Kilovolt (kV)",
          "value": "kvolt"
        },
        {
          "text": "Millivolt (mV)",
          "value": "mvolt"
        },
        {
          "text": "Decibel-milliwatt (dBm)",
          "value": "dBm"
        },
        {
          "text": "Ohm (ฮฉ)",
          "value": "ohm"
        },
        {
          "text": "Lumens (Lm)",
          "value": "lumens"
        }
      ],
      "text": "energy"
    },
    {
      "submenu": [
        {
          "text": "Celsius (ยฐC)",
          "value": "celsius"
        },
        {
          "text": "Farenheit (ยฐF)",
          "value": "farenheit"
        },
        {
          "text": "Kelvin (K)",
          "value": "kelvin"
        }
      ],
      "text": "temperature"
    },
    {
      "submenu": [
        {
          "text": "Millibars",
          "value": "pressurembar"
        },
        {
          "text": "Bars",
          "value": "pressurebar"
        },
        {
          "text": "Kilobars",
          "value": "pressurekbar"
        },
        {
          "text": "Hectopascals",
          "value": "pressurehpa"
        },
        {
          "text": "Kilopascals",
          "value": "pressurekpa"
        },
        {
          "text": "Inches of mercury",
          "value": "pressurehg"
        },
        {
          "text": "PSI",
          "value": "pressurepsi"
        }
      ],
      "text": "pressure"
    },
    {
      "submenu": [
        {
          "text": "Newton-meters (Nm)",
          "value": "forceNm"
        },
        {
          "text": "Kilonewton-meters (kNm)",
          "value": "forcekNm"
        },
        {
          "text": "Newtons (N)",
          "value": "forceN"
        },
        {
          "text": "Kilonewtons (kN)",
          "value": "forcekN"
        }
      ],
      "text": "force"
    },
    {
      "submenu": [
        {
          "text": "Gallons/min (gpm)",
          "value": "flowgpm"
        },
        {
          "text": "Cubic meters/sec (cms)",
          "value": "flowcms"
        },
        {
          "text": "Cubic feet/sec (cfs)",
          "value": "flowcfs"
        },
        {
          "text": "Cubic feet/min (cfm)",
          "value": "flowcfm"
        },
        {
          "text": "Litre/hour",
          "value": "litreh"
        },
        {
          "text": "Litre/min (l/min)",
          "value": "flowlpm"
        },
        {
          "text": "milliLitre/min (mL/min)",
          "value": "flowmlpm"
        }
      ],
      "text": "flow"
    },
    {
      "submenu": [
        {
          "text": "Degrees (ยฐ)",
          "value": "degree"
        },
        {
          "text": "Radians",
          "value": "radian"
        },
        {
          "text": "Gradian",
          "value": "grad"
        }
      ],
      "text": "angle"
    },
    {
      "submenu": [
        {
          "text": "Meters/secยฒ",
          "value": "accMS2"
        },
        {
          "text": "Feet/secยฒ",
          "value": "accFS2"
        },
        {
          "text": "G unit",
          "value": "accG"
        }
      ],
      "text": "acceleration"
    },
    {
      "submenu": [
        {
          "text": "Becquerel (Bq)",
          "value": "radbq"
        },
        {
          "text": "curie (Ci)",
          "value": "radci"
        },
        {
          "text": "Gray (Gy)",
          "value": "radgy"
        },
        {
          "text": "rad",
          "value": "radrad"
        },
        {
          "text": "Sievert (Sv)",
          "value": "radsv"
        },
        {
          "text": "rem",
          "value": "radrem"
        },
        {
          "text": "Exposure (C/kg)",
          "value": "radexpckg"
        },
        {
          "text": "roentgen (R)",
          "value": "radr"
        },
        {
          "text": "Sievert/hour (Sv/h)",
          "value": "radsvh"
        }
      ],
      "text": "radiation"
    },
    {
      "submenu": [
        {
          "text": "parts-per-million (ppm)",
          "value": "ppm"
        },
        {
          "text": "parts-per-billion (ppb)",
          "value": "conppb"
        },
        {
          "text": "nanogram per cubic metre (ng/mยณ)",
          "value": "conngm3"
        },
        {
          "text": "nanogram per normal cubic metre (ng/Nmยณ)",
          "value": "conngNm3"
        },
        {
          "text": "microgram per cubic metre (ฮผg/mยณ)",
          "value": "conฮผgm3"
        },
        {
          "text": "microgram per normal cubic metre (ฮผg/Nmยณ)",
          "value": "conฮผgNm3"
        },
        {
          "text": "milligram per cubic metre (mg/mยณ)",
          "value": "conmgm3"
        },
        {
          "text": "milligram per normal cubic metre (mg/Nmยณ)",
          "value": "conmgNm3"
        },
        {
          "text": "gram per cubic metre (g/mยณ)",
          "value": "congm3"
        },
        {
          "text": "gram per normal cubic metre (g/Nmยณ)",
          "value": "congNm3"
        }
      ],
      "text": "concentration"
    }
  ],
  "links": []
}

Replace item name

Hi,
I'm using Zabbix data source and they repeat part of the metric name in unnecessary way for this panel.

Is there the possible to replace the metric name using regular expression ?
Something like : /^([^:]*) .*/,$1
Where the name : "hostX: % ping lost" become "hostX"

Include X-Frame-Options to prevent Clickjacking

Our internal security tool scan finds below threat in using this plugin.
File : plugins/grafana-polystat-panel/partials/template.html
Threat
The web page can be framed. This means that clickjacking attacks against users are possible.
Impact
With clickjacking, an attacker can trick a victim user into clicking an invisible frame on the web page, thereby causing the victim to take an action they did not intend to take.

Solution
Common clickjacking prevention mechanisms include: X-Frame-Options: This is an HTTP response header that is used to prevent framing of the web page

Can we fix it in the next release ?

Off-by-one error in composites

Appears there is an off-by-one error animating composites.

Only the N+1 composites get animated (the first does not).

Slow performance

Hi,

I have created a Dashboard in Grafana 6.4.3 with just one polystat pannel with three overrides and one composite. In this Dashboard I have just one constant variable. And in the pannel I have 6 querys, I have tested all of them and the slowest takes 100 ms. But for some reason this Dashboard, takes around 20 seconds to start painting anything.

Kind regards

replaced template variable with display vs the value in clickthrough

polystat plugin replaces template variable with their display text and not the value in clickthrough links.

https://github.com/grafana/grafana-polystat-panel/blob/master/src/metric_overrides_manager.ts#L141

let url = this.templateSrv.replaceWithText(anOverride.clickThrough);

I expected it to just do templateSrv.replace. This makes it very hard to use variables in the source page to set variables in the click through page where the display name and value are different

Error when using polystat + Sensu Grafana Datasource

When using the Sensu Go datasource in conjunction w/ the polystat panel, I receive an error:

Screen Shot 2019-11-26 at 3 07 00 PM

With the specfic error in the js console:

react-dom.production.min.js:198 TypeError: Cannot read property 'length' of undefined
    at e.isMsResolutionNeeded (time_series2.ts:343)
    at new e (time_series2.ts:124)
    at D3PolystatPanelCtrl.seriesHandler (ctrl.ts:480)
    at Array.map (<anonymous>)
    at D3PolystatPanelCtrl.onDataReceived (ctrl.ts:468)
    at u.emit (index.js:150)
    at e.emit (emitter.ts:11)
    at QueryEditorRow.tsx:197
    at t.componentDidUpdate (QueryEditorRow.tsx:198)
    at Va (react-dom.production.min.js:216)

I'm currently running Grafana 6.4.3 on Centos 8, fwiw.

allow passing the series name into the clickThrough url

It would be nice to be able to have the clickThrough url link to another dashboard and pass through a template variable value in the url.

eg, have a polystat panel that shows the load of all servers. When clicking on a polygon for a specific server, the user should be redirected to a "server metrics" dashboard that shows detailed stats for the server.

Add support for Numerical Sorting

I want to use the polystat panel to show up / down states of a matrix system.
My problem: The matrix index counts 1-9,10,11 ...

The Polystat Panel shows ...
1,10,11 ... 19,2,20, ....

It would be nice to have the numerical sort option like in Grfana Variables.

[Bug] Legends and Values are not clickable

It's not possible to click on a hexagon if mouse cursor is placed over a legend or value.
Links are only working if a tooltip is shown.

Panel version: 1.0.16
Browser: Google Chrome Version 74.0.3729.169 (Official Build) (64-bit)

Screenshot_20190524_162416

Less Than or Equal threshold triggers

Is it possible to do less-than-equal-to thresholds? For example, available RAM on a server.

I can set up color highlighting with the current method of greater-than-equal-to, but it shows triggered even for the 'good' state since it is the highest numerical value.

Won't show large number of polygons

I'm trying to show 43 polygons to display the AWS monthly budget breakdown using the cloudwatch billing api. Each polygon shows the price paid for a specific AWS service. My target list looks like the following (aliases are numbers for debugging purposes):

[
    {
      "alias": "1",
      "dimensions": {
        "Currency": "USD",
        "ServiceName": "AWSBudgets"
      },
      "expression": "",
      "highResolution": false,
      "id": "",
      "metricName": "EstimatedCharges",
      "namespace": "AWS/Billing",
      "period": "1M",
      "refId": "A",
      "region": "us-east-1",
      "returnData": false,
      "statistics": [
        "Maximum"
      ]
    },
    {
      "alias": "2",
      "dimensions": {
        "Currency": "USD",
        "ServiceName": "AWSCloudTrail"
      },
      "expression": "",
      "highResolution": false,
      "id": "",
      "metricName": "EstimatedCharges",
      "namespace": "AWS/Billing",
      "period": "1M",
      "refId": "B",
      "region": "us-east-1",
      "returnData": false,
      "statistics": [
        "Maximum"
      ]
    },
    
    ...

    {
      "alias": "43",
      "dimensions": {
        "Currency": "USD",
        "ServiceName": "datapipeline"
      },
      "expression": "",
      "highResolution": false,
      "id": "",
      "metricName": "EstimatedCharges",
      "namespace": "AWS/Billing",
      "period": "1M",
      "region": "us-east-1",
      "returnData": false,
      "statistics": [
        "Maximum"
      ]
    }
  ]

My max polygon number is set to 43, but unfortunately, only 26 polygons are shown. I've tried recreating the panel in multiple ways (directly through the Grafana UI, by pasting JSON, etc.). Still can't get all the polygons to show up, and which ones are hidden on a given attempt seems to be non-deterministic.

Add input for display label in override

  • A common pattern to create composites is to give the metric a prefix to make the composite on.

  • Example:
    Metrics SERVER_cpu, SERVER_memory, ... will be put in one composites with a name SERVER and regex SERVER.*. Resulting in a bucket for each server with all their metrics, great!
    Only thing that is bugging me is that the tooltip now consist of SERVER_cpu, SERVER_memory ... , the prefix SERVER is now redundant as it is already in the composite SERVER.

  • Proposed Solution:
    Add a input field for a display label to a override so this can be used as label in the panel.
    Than you could configure the display label for SERVER_cpu as cpu.

Testing issue edits

please ignore this issue, just testing wrike integration

JSON RAW

"storage" : {
"schemas" : "\n[default]\npattern = .\nretentions = 1s:8d:1h:2,1m:60d:6h:2,30m:2y:6h:2\nreorderBuffer = 10\n",
"aggregations" : "\n[default]\npattern = .
\nxFilesFactor = 0.5\naggregationMethod = avg,min,max,sum\n\n"
},

JSON Escaped

"storage" : {
"schemas" : "\n[default]\npattern = .*\nretentions = 1s:8d:1h:2,1m:60d:6h:2,30m:2y:6h:2\nreorderBuffer = 10\n",
"aggregations" : "\n[default]\npattern = .*\nxFilesFactor = 0.5\naggregationMethod = avg,min,max,sum\n\n"
},

Table RAW:
NAME STATUS ROLES AGE VERSION
aks-minion-12939132-0 Ready agent 78d v1.11.2
aks-minion-12939132-1 Ready agent 78d v1.11.2
aks-minion-12939132-10 Ready agent 77d v1.11.2

Table Escaped:

NAME STATUS ROLES AGE VERSION
aks-minion-12939132-0 Ready agent 78d v1.11.2
aks-minion-12939132-1 Ready agent 78d v1.11.2
aks-minion-12939132-10 Ready agent 77d v1.11.2

Global display mode doesn't work

After commit applying of global display mode moved before applying overrides and composites, but apply global display mode relies on isComposite and thresholdLevel.

Overrides UX

image

This page needs a major overhaul in the layout of the options. We do not have any great UX components / classes to handle complex option lists like this. The only solution that I can recommend right now (it is not ideal), is to use the same way we present column styles in Table panel.

image

Also:

  • Checkboxes should use the switch component

Singlestat panel value is shown over Polystat tooltip

What happened:

When combining Singlestat and Polystat panels and the Polystat tooltip overlaps with the Singlesstat text, the SingleStat panel value is shown on top. So not all data of the tooltip can be seen.
E.g.
SingleStatText_over_PolystatTooltip

I already opened this as Grafana issue in grafana/grafana#17610. But it was referred to this polystat repository.

Additionally I have seen that the info triangle (i) of other panels is also shown above the polystat tooltip.

What you expected to happen:

I expect the tooltip to be shown also on top of all other overlapped panels.
This does for example not happen with the Polystat tooltip overlapping panels from the plugins Graph and natel-discrete-panel.

How to reproduce it (as minimally and precisely as possible):

I can produce it with this simple dashboard using a Prometheus datasource with basic metrics:
SingleStatText_over_PolystatTooltip_json.txt

Anything else we need to know?:
None.

Environment:

  • Grafana version: 6.2.2

  • Data source type & version:
    reproduced with Prometheus and InfluxDB (preinstalled plugin from Grafana version )

  • OS Grafana is installed on:
    Grafana docker image grafana/grafana:6.2.2

  • User OS & Browser:
    Firefox 67.0.1
    Windows 10

  • Grafana plugins:
    Polystat 1.0.16
    SingleStat preinstalled from grafana 6.2.2 (no version number shown)

  • Others:
    None.

Add support for Value Mappings

This plugin is almost perfect for displaying the service status of a bunch of systems. Except that it can only display a numeric value.

It would be nice to be able to map values (or value ranges) to textual values, similar to the Singlestat plugin and its Value Mappings options.

For example, a metric that represents service status with a value between 0 and 1, could then be mapped to:
0 = "Down"
.1 - .9 = "Unreliable"
1 = "Up"

Misc questions & bugs

Shape
Switching between The Hexagon Pointed Top and Hexagon Flat Top makes no difference. The other shapes don't make a lot of sense to me. I would prefer if we removed this option and only supported one hexagon shape (and maybe the circle shape).

Stat
Count, Current, Delta, etc not working.

**Animation: **
What does this option do?

Layout:
image

After testing these options I have been unable to remove the 1 (or any value), it always returns to 1 after clearing columns or rows.

What does AutoSize for columns and rows? It has no effect when I try it (tested it with differnet rows and column options and configurations).

Tooltip

  • Do we need a font option?
  • Should use same font as Grafana (Roboto)
  • Can we use the styles from the graph tooltip or copy the look (background)

Font Size

  • Can we hide the font size option when auto font size is enabled? As the auto option is after the font size option, I kept trying to change it without any effect.

Would it be possible to add a threshold to composites to provide more control over color?

I've been playing with using the polystat as a visual representation of overall service status by combining several metrics from several hosts into a single composite. Currently if one of the metrics gets triggered by going below/above thresholds set in an override the whole composite will get colored accordingly.

It would be cool to be able to set thresholds on how many triggers will control the color, eg:

1 metric going to critical it gets colored orange, not red
3 metrics going warning it gets colored red, not orange

etc

Error after upgrading to 6.5

Hi,
I upgraded grafana to 6.5.0, and after that the pannel appears empty with the error:
Cannot read property 'replaceWithText' of undefined

Missing metric name and value in polygon

I am trying to make a panel that shows the Prometheus exporter status with this plugin. The Prometheus metric used would be up. When I create the panel I do not see the metric name and value on the polygon. The tooltip does work:

image

Neither do I see these options anywhere: https://github.com/grafana/grafana-polystat-panel#show-metric-name

The panel JSON data:

{
  "type": "grafana-polystat-panel",
  "title": "Exporter Status",
  "gridPos": {
    "x": 0,
    "y": 0,
    "w": 24,
    "h": 7
  },
  "id": 41,
  "targets": [
    {
      "refId": "A",
      "expr": "up",
      "legendFormat": "{{job}} - {{instance}}",
      "instant": true,
      "hide": false
    }
  ],
  "timeFrom": null,
  "timeShift": null,
  "options": {},
  "savedComposites": [],
  "savedOverrides": [
    {
      "label": "OVERRIDE 1",
      "metricName": ".*",
      "thresholds": [
        {
          "value": 0,
          "state": 2,
          "color": "#bf1b00"
        },
        {
          "value": 1,
          "state": 0,
          "color": "#299c46"
        }
      ],
      "colors": [
        "#299c46",
        "#e5ac0e",
        "#bf1b00",
        "#ffffff"
      ],
      "decimals": 0,
      "enabled": true,
      "unitFormat": "short",
      "clickThrough": "",
      "operatorName": "current",
      "scaledDecimals": null,
      "prefix": "",
      "suffix": "",
      "sanitizeURLEnabled": true
    }
  ],
  "colors": [
    "#299c46",
    "rgba(237, 129, 40, 0.89)",
    "#d44a3a"
  ],
  "polystat": {
    "animationSpeed": 2500,
    "columns": 8,
    "columnAutoSize": false,
    "displayLimit": 100,
    "defaultClickThrough": "",
    "defaultClickThroughSanitize": false,
    "fontAutoScale": true,
    "fontSize": 12,
    "fontType": "Roboto",
    "globalUnitFormat": "short",
    "globalDecimals": 0,
    "globalDisplayMode": "all",
    "globalOperatorName": "current",
    "globalDisplayTextTriggeredEmpty": "OK",
    "gradientEnabled": true,
    "hexagonSortByDirection": "asc",
    "hexagonSortByField": "name",
    "maxMetrics": 0,
    "polygonBorderSize": 2,
    "polygonBorderColor": "black",
    "polygonGlobalFillColor": "#0a50a1",
    "radius": 20,
    "radiusAutoSize": true,
    "rows": 2,
    "rowAutoSize": false,
    "shape": "hexagon_pointed_top",
    "tooltipDisplayMode": "all",
    "tooltipDisplayTextTriggeredEmpty": "OK",
    "tooltipFontSize": 12,
    "tooltipFontType": "Roboto",
    "tooltipPrimarySortDirection": "desc",
    "tooltipPrimarySortField": "thresholdLevel",
    "tooltipSecondarySortDirection": "desc",
    "tooltipSecondarySortField": "value",
    "tooltipTimestampEnabled": false
  }
}

Version information:

  • Grafana v6.3.2 (4832460)
  • Prometheus 2.11.1 (Revision: e5b22494857deca4b806f74f6e3a6ee30c251763)
  • Polystat v1.0.16

Feature Request: allow wildcards in Override section

I am looking to create thresholds for a group of similar metrics and it looks like this is done by creating an override. Unfortunately it does not appear that overrides use wildcards when matching metrics. Creating an override per metric (in this case fan speeds) with identical thresholds is not very salable.

A default set of thresholds might also be nice to have. This way we can override metrics that require a different warm/crit value.

I am currently running Polystat 1.0.16 on Grafana v6.1.1 (commit: eff01d2)

tooltip should contain the name of the Composites

when using composites, the name of the composite should be on the tooltip.
in many cases, the polygon can't show the title of the composite, it will be great to have it at least in the toolip

image
,

Threshold evaluation

Several issues:

  • Thresholds are not being fully evaluated when "ranges" are used.
  • The value should be compared "equal to or greater than" vs just "greater than"
  • Composite threshold evaluation should reflect worst state of all metrics included, when there are no thresholds triggered, the state should be green.

Multiple variables cannot be passed into clickThrough url

I am passing multiple parameters into clickThrough url. Specifically I am trying to pass the variable $service from the dashboard and the cell name that represent name of the specific container.
This is my clickThrough url I defined:

dashboard/db/docker-host-and-container-overview?var-containergroup=${__cell_name}&var-service=$service used for repeating panels

It appears that url string is being passed through $sanitize function which converts "&" symbols into & when sanitize switch is turned on.

The resulting url is:
/d/K5E5flWWz/docker-host-and-container-overview?orgId=1&var-containergroup=apps&var-service=All.

If sanitize switch is turned off, the clickThrough is not working at all.

I am also noticing, that variable $service is not being replaced with the value for the actual panel, but with value "All"

Polygon size & Polygon Border Color

Question:

  • Do we need a polygon size? Should not auto always give you best result?
  • Allowing user to set size should just cause issues for different monitors and a query that returns a variable number of series.

Do we need an option for Polygon Border Color? Can we not set one automatically based on the theme (panel background for example). Right now the black default is not ideal for white theme.

Automatic Composites

Is it possible to automatically create composites with a regex scheme?
In my case I am using InfluxDb and I have three metrics, CPU, available RAM and available DISK space. These metrics are returned for all servers in a data center.

I would like to be able to have the composite be generated for each server in the result set. The data center is a variable, and changes the servers. With 10-20 servers per data center, manually creating composites is very time consuming.

image

image
image
image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.