Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ tests/.cache/
playwright/
playwright-report/
test-results/
.hugo_build.lock
hugo-docs/public/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions docs-hugo/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
109 changes: 109 additions & 0 deletions docs-hugo/content/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
title: Polystat Panel
description: The Polystat panel plugin provides a multi-stat panel for Grafana dashboards.
keywords:
- polystat
labels:
products:
- oss
- enterprise
- cloud
---

## Grafana Polystat Panel

The Polystat panel plugin provides a [D3-based](http://www.d3js.org) multi-stat panel for [Grafana](https://grafana.com/).

This plugin creates an hexagon for each metric received, and allows you to group metrics into a composite metric and display the triggered state of the composite. The 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.

See the following examples:

**All visible**

![polystat-v2-agent-all-visible](/images/overview/polystat-v2-agent-all-visible.png)

**Scaled down**

![polystat-v2-agent-scaled-down](/images/overview/polystat-v2-agent-scaled-down.png)

**Scaled down with tooltip**

![polystat-v2-agent-scaled-down-tooltip](/images/overview/polystat-v2-agent-scaled-down-tooltip.png)

### Settings and options

This panel provides a large number of settings customization options, and are searchable from the menu. For more info, see [Global Settings](/settings) and [Options](/options).

#### Clickthrough URLs

Use this setting to indicate the URL to open when clicking the polygon. Find more information in [Use Clickthrough URLs](/clickthroughurl).

### Set thresholds

This plugin supports "ranged" states. See how to [Set thresholds](/thresholds).

### Overrides

Use overrides to apply additional rendering options for metrics, including custom thresholds and clickthroughs. [Learn more](/overrides).

### Composites

Composites allow you to combine multiple metrics into a single representation that reflects the "worst" state of the metrics combined. See how at [Composites](/composites).

### Value mappings

This is a built-in option in Grafana and behaves as documented in [Configure value mappings](https://grafana.com/docs/grafana/latest/panels/configure-value-mappings/).

Note that color assignments are ignored, and only threshold colors are applied.

## Build the plugin

This plugin relies on the [Plugin Tools](https://github.com/grafana/plugin-tools) typical build sequence:

```BASH
yarn install
yarn build
```

The code is parsed and copied into "dist" if "tslint" passes without errors.

For development, you can run:

```BASH
yarn dev
```

### Docker Support

The plugin includes a `docker-compose.yml` file for development and testing.

To use it run:

```BASH
docker-compose up
```

Then browse to <http://localhost:3000>

### Enable Grafana TestData

`Grafana TestData` is not enabled by default.

To enable it, navigate to the Plugins section in your Grafana main menu. Click the Apps tabs in the Plugins section and select the Grafana TestData App. Alternatively navigate directly to <http://your_grafana_instance/plugins/testdata/edit>. Finally click the enable button to enable.

## Acknowledgements

This panel is based on this D3 example:

* <https://www.visualcinnamon.com/2013/07/self-organizing-maps-creating-hexagonal.html>

Many thanks to contributors:

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

and many others!
109 changes: 109 additions & 0 deletions docs-hugo/content/clickthroughurl/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
params:
menuPre: '<i class="fa fa-link" aria-hidden="true"></i> '
title: Clickthrough URLs
weight: 20
---

## Use Clickthrough URLs

Use this setting to indicate the URL to open when clicking the polygon.

Options include:

- **Sanitize URL**: Usually enabled, it prevents malicious data entry.

- **Open URL In New Tab**: If checked, clicking a polygon will open in a new tab. Disable this option in drill-down dashboards.

- **Enable Custom URL Target**: If checked, you can set a custom value for the `target` attribute of the clickthrough. Note that this is only visible when `Open in New Tab` is disabled.

- **Custom URL Target**: Specifies the content for the `target` attribute of the clickthrough URL. Typical values are `_blank`, `_self`, `_parent`, and `_top`.

### Form clickthrough URLs using regex and template variables

You can form URLs using regular expression capture groups and [template variables](#use-template-variables).

**Example 1**

For example, if you have multiple metrics like this:

```TEXT
hera_memutil
plex_memutil
```

And a regular expression for the override:

```REGEX
/(.*)_mem/
```

You can use the capture group `$1` in the URL:

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

And obtain the final URL `https://myserver/dashboard/detail-dash?var-HOSTNAME=hera`.

**Example 2: Reuse text**

You have a text in your metric legend:

`[email protected] SOME_TEXT`

To parse, it use the expression:

```REGEX
([^+]*)\+([^+]*)\s+(.*)
```

### Use template variables

#### 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:

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

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

For example, to expand the capture named group `A_HOST` and replace the value in the specified URL, use:

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

#### Using Polystat Variables

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

You can specify a drilldown clickthrough URL like this:

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

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.
Loading
Loading