Provides a base panel to construct the main dashboard
This patch adds a default panel that will be used when another service
will add a new panel into the main dashboard through grains. This is the
common part between all panels of the main dashboard.
It replaces the static main dashboard that has been removed.
diff --git a/_states/grafana3_dashboard.py b/_states/grafana3_dashboard.py
index 63090ab..a4f44ca 100644
--- a/_states/grafana3_dashboard.py
+++ b/_states/grafana3_dashboard.py
@@ -128,7 +128,8 @@
# Build out all dashboard fields
new_dashboard = _inherited_dashboard(
dashboard, base_dashboards_from_pillar, ret)
- new_dashboard['title'] = name
+ if not new_dashboard.get('title'):
+ new_dashboard['title'] = name
rows = new_dashboard.get('rows', [])
for i, row in enumerate(rows):
rows[i] = _inherited_row(row, base_rows_from_pillar, ret)
diff --git a/grafana/client/init.sls b/grafana/client/init.sls
index fc89fb4..0638527 100644
--- a/grafana/client/init.sls
+++ b/grafana/client/init.sls
@@ -76,6 +76,15 @@
- dashboard_format: json
{%- else %}
- dashboard: {{ dashboard }}
+ {%- if dashboard.base_dashboards is defined %}
+ - base_dashboards_from_pillar: {{ dashboard.base_dashboards|yaml }}
+ {%- endif %}
+ {%- if dashboard.base_rows is defined %}
+ - base_rows_from_pillar: {{ dashboard.base_rows|yaml }}
+ {%- endif %}
+ {%- if dashboard.base_panels is defined %}
+ - base_panels_from_pillar: {{ dashboard.base_panels|yaml }}
+ {%- endif %}
{%- endif %}
{%- else %}
grafana_client_dashboard_{{ dashboard_name }}:
diff --git a/grafana/files/grafana_dashboards/main_influxdb.json b/grafana/files/grafana_dashboards/main_influxdb.json
deleted file mode 100644
index fa6c42f..0000000
--- a/grafana/files/grafana_dashboards/main_influxdb.json
+++ /dev/null
@@ -1,2012 +0,0 @@
-{
- "annotations": {
- "list": []
- },
- "editable": true,
- "hideControls": false,
- "id": null,
- "links": [],
- "originalTitle": "Main",
- "refresh": "1m",
- "rows": [
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 2,
- "interval": "> 60s",
- "links": [
- {
- "dashboard": "Keystone",
- "name": "Drilldown dashboard",
- "title": "Keystone",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'keystone' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "keystone"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Keystone",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 3,
- "interval": "> 60s",
- "links": [
- {
- "dashboard": "Glance",
- "name": "Drilldown dashboard",
- "title": "Glance",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'glance' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "glance"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Glance",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 4,
- "interval": "> 60s",
- "links": [
- {
- "dashboard": "Heat",
- "name": "Drilldown dashboard",
- "title": "Heat",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'heat' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "heat"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Heat",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 23,
- "interval": "> 60s",
- "links": [
- {
- "dashboard": "Neutron",
- "name": "Drilldown dashboard",
- "title": "Neutron",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'neutron' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "neutron-control"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Neutron",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 5,
- "interval": "> 60s",
- "links": [
- {
- "dashboard": "Nova",
- "name": "Drilldown dashboard",
- "title": "Nova",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'nova' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "nova-control"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Nova",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 1,
- "interval": "> 60s",
- "links": [
- {
- "dashboard": "Cinder",
- "name": "Drilldown dashboard",
- "title": "Cinder",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'cinder' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "cinder-control"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Cinder",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- }
- ],
- "showTitle": true,
- "title": "OpenStack Control Plane"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 28,
- "interval": "> 60s",
- "links": [
- {
- "dashboard": "Nova",
- "name": "Drilldown dashboard",
- "title": "Nova",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'nova' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "nova-data"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Nova",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 8,
- "interval": ">60s",
- "links": [
- {
- "dashboard": "Ceph",
- "name": "Drilldown dashboard",
- "title": "Ceph",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "measurement": "ceph_health",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"ceph_health\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- }
- ]
- }
- ],
- "thresholds": "2,3",
- "title": "Ceph cluster",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "N/A",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "1"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "2"
- },
- {
- "op": "=",
- "text": "FAIL",
- "value": "3"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "none",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 30,
- "interval": "> 60s",
- "links": [
- {
- "dashUri": "db/cinder",
- "dashboard": "Cinder",
- "name": "Drilldown dashboard",
- "title": "Cinder",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "condition": "",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "groupby_field": "",
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'nova' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "cinder-data"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Cinder",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- }
- ],
- "showTitle": true,
- "title": "OpenStack Data Plane"
- },
- {
- "collapse": false,
- "editable": true,
- "height": "250px",
- "panels": [
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "short",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 16,
- "interval": ">60s",
- "links": [
- {
- "dashboard": "RabbitMQ",
- "name": "Drilldown dashboard",
- "title": "RabbitMQ",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'rabbitmq' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "rabbitmq"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "RabbitMQ",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "short",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 15,
- "interval": ">60s",
- "links": [
- {
- "dashboard": "MySQL",
- "name": "Drilldown dashboard",
- "title": "MySQL",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'mysql' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "mysql"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "MySQL",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "short",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 18,
- "interval": ">60s",
- "links": [
- {
- "dashUri": "db/nginx",
- "dashboard": "Nginx",
- "name": "Drilldown dashboard",
- "title": "Nginx",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'nginx' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "nginx"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "Nginx",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "short",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 10,
- "interval": ">60s",
- "links": [
- {
- "dashUri": "db/haproxy",
- "dashboard": "HAProxy",
- "name": "Drilldown dashboard",
- "title": "HAProxy",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'haproxy-openstack' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "haproxy-openstack"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "haproxy",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- },
- {
- "cacheTimeout": null,
- "colorBackground": true,
- "colorValue": false,
- "colors": [
- "rgba(71, 212, 59, 0.4)",
- "rgba(245, 150, 40, 0.73)",
- "rgba(225, 40, 40, 0.59)"
- ],
- "datasource": null,
- "editable": true,
- "error": false,
- "format": "short",
- "gauge": {
- "maxValue": 100,
- "minValue": 0,
- "show": false,
- "thresholdLabels": false,
- "thresholdMarkers": true
- },
- "id": 17,
- "interval": ">60s",
- "links": [
- {
- "dashUri": "db/memcached",
- "dashboard": "Memcached",
- "name": "Drilldown dashboard",
- "title": "Memcached",
- "type": "dashboard"
- }
- ],
- "maxDataPoints": 100,
- "nullPointMode": "connected",
- "nullText": null,
- "postfix": "",
- "postfixFontSize": "50%",
- "prefix": "",
- "prefixFontSize": "50%",
- "span": 2,
- "sparkline": {
- "fillColor": "rgba(31, 118, 189, 0.18)",
- "full": false,
- "lineColor": "rgb(31, 120, 193)",
- "show": false
- },
- "targets": [
- {
- "column": "value",
- "dsType": "influxdb",
- "fill": "",
- "function": "last",
- "groupBy": [
- {
- "params": [
- "$interval"
- ],
- "type": "time"
- },
- {
- "params": [
- "null"
- ],
- "type": "fill"
- }
- ],
- "groupByTags": [],
- "interval": "",
- "measurement": "cluster_status",
- "policy": "default",
- "query": "SELECT last(\"value\") FROM \"cluster_status\" WHERE \"cluster_name\" = 'memcached' AND $timeFilter GROUP BY time($interval) fill(null)",
- "rawQuery": false,
- "refId": "A",
- "resultFormat": "time_series",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "field"
- },
- {
- "params": [],
- "type": "last"
- }
- ]
- ],
- "tags": [
- {
- "key": "environment_label",
- "operator": "=",
- "value": "$environment"
- },
- {
- "key": "cluster_name",
- "operator": "=",
- "value": "memcached"
- }
- ]
- }
- ],
- "thresholds": "1,3",
- "title": "memcached",
- "type": "singlestat",
- "valueFontSize": "50%",
- "valueMaps": [
- {
- "op": "=",
- "text": "no data",
- "value": "null"
- },
- {
- "op": "=",
- "text": "OKAY",
- "value": "0"
- },
- {
- "op": "=",
- "text": "WARN",
- "value": "1"
- },
- {
- "op": "=",
- "text": "UNKW",
- "value": "2"
- },
- {
- "op": "=",
- "text": "CRIT",
- "value": "3"
- },
- {
- "op": "=",
- "text": "DOWN",
- "value": "4"
- }
- ],
- "valueName": "current"
- }
- ],
- "showTitle": true,
- "title": "Middleware"
- }
- ],
- "schemaVersion": 12,
- "sharedCrosshair": true,
- "style": "dark",
- "tags": [],
- "templating": {
- "enable": true,
- "list": [
- {
- "allFormat": "regex values",
- "current": {},
- "datasource": null,
- "hide": 0,
- "includeAll": false,
- "name": "environment",
- "options": [],
- "query": "show tag values from cpu_idle with key = environment_label",
- "refresh": 1,
- "refresh_on_load": true,
- "regex": "",
- "type": "query"
- }
- ]
- },
- "time": {
- "from": "now-1h",
- "to": "now"
- },
- "timepicker": {
- "collapse": false,
- "enable": true,
- "notice": false,
- "now": true,
- "refresh_intervals": [
- "5s",
- "10s",
- "30s",
- "1m",
- "5m",
- "15m",
- "30m",
- "1h",
- "2h",
- "1d"
- ],
- "status": "Stable",
- "time_options": [
- "5m",
- "15m",
- "1h",
- "6h",
- "12h",
- "24h",
- "2d",
- "7d",
- "30d"
- ],
- "type": "timepicker"
- },
- "timezone": "browser",
- "title": "Main",
- "version": 8
-}
diff --git a/grafana/meta/grafana.yml b/grafana/meta/grafana.yml
index 5cf22ed..0556888 100644
--- a/grafana/meta/grafana.yml
+++ b/grafana/meta/grafana.yml
@@ -3,5 +3,7 @@
format: json
template: grafana/files/grafana_dashboards/grafana_influxdb.json
main:
- format: json
- template: grafana/files/grafana_dashboards/main_influxdb.json
+ format: yaml
+ base_dashboards: ['grafana:client:base_templates:main_dashboard']
+ base_rows: ['grafana:client:base_templates:service_row']
+ base_panels: ['grafana:client:base_templates:cluster_status_singlestat']
diff --git a/metadata/service/client/single.yml b/metadata/service/client/single.yml
index 0f8aef7..62407e0 100644
--- a/metadata/service/client/single.yml
+++ b/metadata/service/client/single.yml
@@ -4,3 +4,65 @@
grafana:
client:
enabled: true
+ base_templates:
+ main_dashboard:
+ title: 'Main'
+ editable: true
+ hideControls: false
+ templating:
+ enable: true
+ list:
+ - allFormat: regex values
+ hide: 0
+ includeAll: false
+ name: environment
+ options: []
+ query: show tag values from cpu_idle with key = environment_label
+ refresh: 1
+ refresh_on_load: true
+ regex: ''
+ type: query
+ sort: 0
+ multi: false
+ service_row:
+ showTitle: true
+ height: 100px
+ cluster_status_singlestat:
+ span: 2
+ editable: false
+ type: singlestat
+ prefixFontSize: "50%"
+ postfixFontSize: "50%"
+ colorBackground: true
+ colors:
+ - "rgba(71, 212, 59, 0.4)"
+ - "rgba(245, 150, 40, 0.73)"
+ - "rgba(225, 40, 40, 0.59)"
+ thresholds: "1,3"
+ interval: "> 60s"
+ sparkline:
+ fillColor: "rgba(31, 118, 189, 0.18)"
+ full: false
+ lineColor: "rgb(31, 120, 193)"
+ show: false
+ valueFontSize: "50%"
+ valueMaps:
+ - op: "="
+ text: "no data"
+ value: "null"
+ - op: "="
+ text: "OKAY"
+ value: "0"
+ - op: "="
+ text: "WARN"
+ value: "1"
+ - op: "="
+ text: "UNKW"
+ value: "2"
+ - op: "="
+ text: "CRIT"
+ value: "3"
+ - op: "="
+ text: "DOWN"
+ value: "4"
+ valueName: current