diff options
author | Jose Vargas <jvargas@gitlab.com> | 2019-07-12 16:04:25 -0500 |
---|---|---|
committer | Jose Vargas <jvargas@gitlab.com> | 2019-07-17 09:50:07 -0500 |
commit | d5efb69feaed2db74121d52e2f6ece2c89546140 (patch) | |
tree | 1f71afb277f49b4339b655928ef59f47de163e33 | |
parent | 4e457ebf824603ec2f76523345211360272ff98e (diff) | |
download | gitlab-ce-docs-jivanvl-additional-panel-type-support.tar.gz |
Add documentation for panel typesdocs-jivanvl-additional-panel-type-support
This adds documentation on how to add
area and single stat panel types for the
monitoring dashboards using custom yml
files
-rw-r--r-- | doc/user/project/integrations/img/prometheus_dashboard_area_panel_type.png | bin | 0 -> 65101 bytes | |||
-rw-r--r-- | doc/user/project/integrations/img/prometheus_dashboard_single_stat_panel_type.png | bin | 0 -> 26781 bytes | |||
-rw-r--r-- | doc/user/project/integrations/prometheus.md | 60 |
3 files changed, 58 insertions, 2 deletions
diff --git a/doc/user/project/integrations/img/prometheus_dashboard_area_panel_type.png b/doc/user/project/integrations/img/prometheus_dashboard_area_panel_type.png Binary files differnew file mode 100644 index 00000000000..7260b11f07b --- /dev/null +++ b/doc/user/project/integrations/img/prometheus_dashboard_area_panel_type.png diff --git a/doc/user/project/integrations/img/prometheus_dashboard_single_stat_panel_type.png b/doc/user/project/integrations/img/prometheus_dashboard_single_stat_panel_type.png Binary files differnew file mode 100644 index 00000000000..ce4c54f909d --- /dev/null +++ b/doc/user/project/integrations/img/prometheus_dashboard_single_stat_panel_type.png diff --git a/doc/user/project/integrations/prometheus.md b/doc/user/project/integrations/prometheus.md index 72f12972596..1a8a29937eb 100644 --- a/doc/user/project/integrations/prometheus.md +++ b/doc/user/project/integrations/prometheus.md @@ -191,7 +191,7 @@ The following tables outline the details of expected properties. | Property | Type | Required | Description | | ------ | ------ | ------ | ------- | -| `type` | enum | no, defaults to `area-chart` | Specifies the chart type to use. Only `area-chart` is currently supported. | +| `type` | enum | no, defaults to `area-chart` | Specifies the chart type to use. | | `title` | string | yes | Heading for the panel. | | `y_label` | string | no, but highly encouraged | Y-Axis label for the panel. | | `weight` | number | no, defaults to order in file | Order to appear within the grouping. Lower number means higher priority, which will be higher on the page. Numbers do not need to be consecutive. | @@ -207,7 +207,63 @@ The following tables outline the details of expected properties. | `query` | string | yes if `query_range` is not defined | Defines the Prometheus query to be used to populate the chart/panel. If defined, the `query` endpoint of the [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) will be utilized. | | `query_range` | string | yes if `query` is not defined | Defines the Prometheus query to be used to populate the chart/panel. If defined, the `query_range` endpoint of the [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/) will be utilized. | -### Setting up alerts for Prometheus metrics **(ULTIMATE)** +#### Panel types for dashboards + +The below panel types are supported in monitoring dashboards. + +##### Area + +To add an area panel type to a dashboard, look at the following sample dashboard file: + +```yaml +dashboard: 'Dashboard Title' +panel_groups: + - group: 'Group Title' + panels: + - type: area-chart + title: "Chart Title" + y_label: "Y-Axis" + metrics: + - id: 10 + query_range: 'http_requests_total' + label: "Metric of Ages" + unit: "count" +``` +The properties to take note are the following + +| Property | Type | Required | Description | +| ------ | ------ | ------ | ------ | +| type | string | no | used to determine the type of panel to be rendered, for area panel types, this is an optional property | +| query_range | yes | required | For area panel types, it is necessary to use a [range query](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) | + +![area panel type](img/prometheus_dashboard_area_panel_type.png) + +##### Single Stat + +To add a single stat panel type to a dashboard, look at the following sample dashboard file: + +```yaml +dashboard: 'Dashboard Title' +panel_groups: + - group: 'Group Title' + panels: + - title: "Single Stat" + type: "single-stat" + metrics: + - id: 10 + query: 'max(go_memstats_alloc_bytes{job="prometheus"})' + unit: MB + label: "Total" +``` + +| Property | Type | Required | Description | +| ------ | ------ | ------ | ------ | +| type | string | yes | used to determine the type of panel to be rendered, for single stat panel types, the 'single-stat' needs to be set | +| query | string | yes | For single stat panel types, it is necessary to use an [instant query](https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries) | + +![single stat panel type](img/prometheus_dashboard_single_stat_panel_type.png) + +### Setting up alerts for Prometheus metrics **[ULTIMATE]** #### Managed Prometheus instances |