Merge "Add grafana admin password management"
diff --git a/grafana/files/dashboards/edge/edge_main.json b/grafana/files/dashboards/edge/edge_main.json
new file mode 100644
index 0000000..7705816
--- /dev/null
+++ b/grafana/files/dashboards/edge/edge_main.json
@@ -0,0 +1,174 @@
+{% raw %}
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": null,
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "id": null,
+ "iteration": 1538993149250,
+ "links": [],
+ "panels": [
+ {
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 23,
+ "title": "Cloud status",
+ "type": "row"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": true,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "#299c46"
+ ],
+ "datasource": null,
+ "format": "percentunit",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 5,
+ "w": 24,
+ "x": 0,
+ "y": 1
+ },
+ "id": 21,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": " UP",
+ "postfixFontSize": "80%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "repeat": "environment",
+ "repeatDirection": "h",
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "count(procstat_running{environment=~\"$environment\",process_name=~\"hyperkube-kubelet\"} == 1)/count(procstat_running{environment=~\"$environment\",process_name=~\"hyperkube-kubelet\"})",
+ "format": "time_series",
+ "intervalFactor": 2,
+ "refId": "A",
+ "step": 40
+ }
+ ],
+ "thresholds": "0.35,0.70",
+ "title": "Kubernetes node status@$environment",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [],
+ "valueName": "current"
+ }
+ ],
+ "refresh": "1m",
+ "schemaVersion": 16,
+ "style": "dark",
+ "tags": [],
+ "templating": {
+ "list": [
+ {
+ "allValue": null,
+ "current": {},
+ "datasource": null,
+ "hide": 0,
+ "includeAll": true,
+ "label": "environment",
+ "multi": true,
+ "name": "environment",
+ "options": [],
+ "query": "query_result(procstat_running)",
+ "refresh": 1,
+ "regex": ".*environment=\"(.+?.)\".*",
+ "sort": 0,
+ "tagValuesQuery": "",
+ "tags": [],
+ "tagsQuery": "",
+ "type": "query",
+ "useTags": false
+ }
+ ]
+ },
+ "time": {
+ "from": "now-1h",
+ "to": "now"
+ },
+ "timepicker": {
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ],
+ "time_options": [
+ "5m",
+ "15m",
+ "1h",
+ "6h",
+ "12h",
+ "24h",
+ "2d",
+ "7d",
+ "30d"
+ ]
+ },
+ "timezone": "",
+ "title": "Edge Main",
+ "uid": null,
+ "version": 1
+}
+{% endraw %}
\ No newline at end of file
diff --git a/grafana/files/dashboards/kubernetes/kubernetes_cluster_prometheus.json b/grafana/files/dashboards/kubernetes/kubernetes_cluster_prometheus.json
index e31f327..ed12e6a 100644
--- a/grafana/files/dashboards/kubernetes/kubernetes_cluster_prometheus.json
+++ b/grafana/files/dashboards/kubernetes/kubernetes_cluster_prometheus.json
@@ -98,7 +98,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-controller-manager\"})/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-controller-manager\"} == 1)",
+ "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-controller-manager\"} == 1)/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-controller-manager\"})",
"format": "time_series",
"intervalFactor": 2,
"metric": "elasticsearch_cluster_health_status",
@@ -372,7 +372,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-apiserver\"})/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-apiserver\"} == 1)",
+ "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-apiserver\"} == 1)/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-apiserver\"})",
"format": "time_series",
"intervalFactor": 2,
"metric": "elasticsearch_cluster_health_status",
@@ -474,7 +474,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-scheduler\"})/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-scheduler\"} == 1)",
+ "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-scheduler\"} == 1)/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-scheduler\"})",
"format": "time_series",
"intervalFactor": 2,
"metric": "elasticsearch_cluster_health_status",
@@ -576,7 +576,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-proxy\"})/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-proxy\"} == 1)",
+ "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-proxy\"} == 1)/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-proxy\"})",
"format": "time_series",
"intervalFactor": 2,
"metric": "elasticsearch_cluster_health_status",
@@ -678,7 +678,7 @@
"tableColumn": "",
"targets": [
{
- "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-kubelet\"})/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-kubelet\"} == 1)",
+ "expr": "100*count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-kubelet\"} == 1)/count(procstat_running{environment=\"$environment\", process_name=~\"hyperkube-kubelet\"})",
"format": "time_series",
"intervalFactor": 2,
"metric": "elasticsearch_cluster_health_status",
diff --git a/metadata/service/client/dashboards/stacklight/edge_main.yml b/metadata/service/client/dashboards/stacklight/edge_main.yml
new file mode 100644
index 0000000..b2ee128
--- /dev/null
+++ b/metadata/service/client/dashboards/stacklight/edge_main.yml
@@ -0,0 +1,8 @@
+parameters:
+ grafana:
+ client:
+ dashboard:
+ edge_main:
+ datasource: prometheus
+ format: json
+ template: grafana/files/dashboards/edge/edge_main.json