From 777bddca5106f38eba153522d6db84a77d592f59 Mon Sep 17 00:00:00 2001 From: liubo Date: Tue, 6 Aug 2019 15:28:34 +0800 Subject: [PATCH 1/2] Remove grafana collector --- conf/grafana_collector.toml | 47 - deploy.yml | 1 - graceful_stop.yml | 18 - group_vars/grafana_servers.yml | 1 - migrate_monitor.yml | 17 - roles/grafana_collector/defaults/main.yml | 8 - roles/grafana_collector/meta/main.yml | 4 - .../tasks/binary_deployment.yml | 26 - roles/grafana_collector/tasks/main.yml | 15 - .../tasks/supervise_deployment.yml | 8 - .../tasks/systemd_deployment.yml | 8 - .../run_grafana_collector_binary.sh.j2 | 19 - roles/local/tasks/main.yml | 4 - roles/local/templates/common_packages.yml.j2 | 3 - rolling_update_monitor.yml | 47 - scripts/binlog.json | 273 ++-- scripts/blackbox_exporter.json | 895 ++++++------- scripts/disk_performance.json | 20 +- scripts/grafana-config-copy.py | 1 - scripts/kafka.json | 1162 +++++++++-------- scripts/node.json | 21 +- scripts/overview.json | 415 +++--- scripts/pd.json | 31 +- scripts/tidb.json | 14 +- scripts/tidb_summary.json | 18 +- scripts/tikv_details.json | 16 +- scripts/tikv_summary.json | 28 +- scripts/tikv_trouble_shooting.json | 37 +- start.yml | 19 - stop.yml | 18 - unsafe_cleanup.yml | 1 - 31 files changed, 1492 insertions(+), 1703 deletions(-) delete mode 100644 conf/grafana_collector.toml delete mode 100644 roles/grafana_collector/defaults/main.yml delete mode 100644 roles/grafana_collector/meta/main.yml delete mode 100644 roles/grafana_collector/tasks/binary_deployment.yml delete mode 100644 roles/grafana_collector/tasks/main.yml delete mode 100644 roles/grafana_collector/tasks/supervise_deployment.yml delete mode 100644 roles/grafana_collector/tasks/systemd_deployment.yml delete mode 100755 roles/grafana_collector/templates/run_grafana_collector_binary.sh.j2 diff --git a/conf/grafana_collector.toml b/conf/grafana_collector.toml deleted file mode 100644 index c822855de..000000000 --- a/conf/grafana_collector.toml +++ /dev/null @@ -1,47 +0,0 @@ -## grafana_collector Configuration - -[grafana] -# dashboard theme: [dark, light] -theme = "dark" - -# timeout and retry interval of query for rendering panel image, unit: second -client-timeout = 300 -server-timeout = 300 -retry-interval = 10 - -## PDF template varialbes -[font] -family = "opensans" -ttf = "OpenSans-Regular.ttf" -size = 14 - -# rectangle in PDF's page -[rect] -# page: A4 size -[rect.page] -width = 595.28 -height = 841.89 - -# grafana panel type: Graph -[rect.graph] -width = 480.0 -height = 240.0 - -# grafana panel type: Singlestat -[rect.singlestat] -width = 480.0 -height = 93.0 - -[position] -# position x of image -x = 50.0 -# position y of first title on page -title-y1 = 60.0 -# position y of second title on page -title-y2 = 350.0 -# position y of first image on page -image-y1 = 80.0 -# position y of second image on page -image-y2 = 370.0 -# height of new line -br = 20.0 diff --git a/deploy.yml b/deploy.yml index 37383f7cd..b3db9b55b 100644 --- a/deploy.yml +++ b/deploy.yml @@ -86,7 +86,6 @@ - grafana roles: - grafana - - grafana_collector - name: deploying kafka_exporter hosts: kafka_exporter_servers diff --git a/graceful_stop.yml b/graceful_stop.yml index 79c631f6e..7af7af9fe 100644 --- a/graceful_stop.yml +++ b/graceful_stop.yml @@ -343,21 +343,3 @@ port: "{{ grafana_port }}" state: stopped msg: "the grafana port {{ grafana_port }} is not down" - - - name: stop grafana_collector by supervise - shell: cd {{ deploy_dir }}/scripts && ./stop_{{ item }}.sh - when: process_supervision == 'supervise' - with_items: - - grafana_collector - - - name: stop grafana_collector by systemd - systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=stopped - become: true - when: process_supervision == 'systemd' - - - name: wait until the grafana_collector port is down - wait_for: - host: "{{ ansible_host }}" - port: "{{ grafana_collector_port }}" - state: stopped - msg: "the grafana_collector port {{ grafana_collector_port }} is not down" diff --git a/group_vars/grafana_servers.yml b/group_vars/grafana_servers.yml index 03798a86a..a4aacffa3 100644 --- a/group_vars/grafana_servers.yml +++ b/group_vars/grafana_servers.yml @@ -1,6 +1,5 @@ --- grafana_port: 3000 -grafana_collector_port: 8686 grafana_api_keys_dir: "{{ playbook_dir }}/conf/keys" diff --git a/migrate_monitor.yml b/migrate_monitor.yml index 53083a43c..956ea74b9 100644 --- a/migrate_monitor.yml +++ b/migrate_monitor.yml @@ -262,7 +262,6 @@ roles: - grafana - - grafana_collector post_tasks: - name: start grafana by supervise @@ -281,21 +280,6 @@ host={{ ansible_host }} port={{ grafana_port }} state=present send='GET /login HTTP/1.0\r\n\r\n' search_regex='200 OK' - - name: start grafana_collector by supervise - shell: cd {{ deploy_dir }}/scripts && ./start_{{ item }}.sh - when: process_supervision == 'supervise' - with_items: - - grafana_collector - - - name: start grafana_collector by systemd - systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=started enabled=no - when: process_supervision == 'systemd' - become: true - - - name: wait for grafana_collector up - wait_for: | - host={{ ansible_host }} port={{ grafana_collector_port }} state=present - - set_fact: grafana_host: "{{ ansible_host }}" @@ -317,7 +301,6 @@ - grafana_dest_config: name: "{{ cluster_name | title }}" url: "http://{{ grafana_host }}:{{ grafana_port }}/" - report_url: "http://{{ grafana_host }}:{{ grafana_collector_port }}/" user: "{{ grafana_admin_user }}" password: "{{ grafana_admin_password }}" apikey: "{{ lookup('file', grafana_api_keys_dir + '/grafana_apikey.key') }}" diff --git a/roles/grafana_collector/defaults/main.yml b/roles/grafana_collector/defaults/main.yml deleted file mode 100644 index c4981e9db..000000000 --- a/roles/grafana_collector/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -# default configuration for grafana_collector - -grafana_collector_log_level: "info" -grafana_collector_log_dir: "{{ deploy_dir }}/log" -grafana_collector_fonts_dir: "{{ deploy_dir }}/conf/fonts" -grafana_collector_log_filename: "grafana_collector.log" diff --git a/roles/grafana_collector/meta/main.yml b/roles/grafana_collector/meta/main.yml deleted file mode 100644 index beff6a6bf..000000000 --- a/roles/grafana_collector/meta/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -dependencies: - - role: common_dir diff --git a/roles/grafana_collector/tasks/binary_deployment.yml b/roles/grafana_collector/tasks/binary_deployment.yml deleted file mode 100644 index 42c2bc540..000000000 --- a/roles/grafana_collector/tasks/binary_deployment.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- - -- name: create deploy directories - file: path="{{ item }}" state=directory mode=0755 - with_items: - - "{{ grafana_collector_log_dir }}" - - "{{ grafana_collector_fonts_dir }}" - -- name: deploy grafana_collector binary - copy: src="{{ resources_dir }}/bin/grafana_collector" dest="{{ deploy_dir }}/bin/" mode=0755 - -- name: deploy ttf font - copy: src="{{ resources_dir }}/bin/ttf/OpenSans-Regular.ttf" dest="{{ grafana_collector_fonts_dir }}/" mode=0644 - -- name: create run script - template: - src: "{{ item }}_{{ role_name }}_binary.sh.j2" - dest: "{{ deploy_dir }}/scripts/{{ item }}_{{ role_name }}.sh" - mode: "0755" - backup: yes - with_items: - - run - vars: - role_status_dir: status/{{ role_name }} - -- include_tasks: "{{ process_supervision }}_deployment.yml" diff --git a/roles/grafana_collector/tasks/main.yml b/roles/grafana_collector/tasks/main.yml deleted file mode 100644 index 74fd91198..000000000 --- a/roles/grafana_collector/tasks/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- - -- include_tasks: binary_deployment.yml - -- name: create configuration file - copy: src="{{ playbook_dir }}/conf/grafana_collector.toml" dest="{{ deploy_dir }}/conf/grafana_collector.toml" mode=0644 backup=yes - register: grafana_collector_conf_st - -- name: backup conf file - command: mv "{{ grafana_collector_conf_st.backup_file }}" "{{ backup_dir }}" - when: grafana_collector_conf_st.changed and grafana_collector_conf_st.backup_file is defined - -- name: prepare firewalld white list - set_fact: - firewalld_ports: "{{ [grafana_collector_port ~ '/tcp'] + firewalld_ports }}" diff --git a/roles/grafana_collector/tasks/supervise_deployment.yml b/roles/grafana_collector/tasks/supervise_deployment.yml deleted file mode 100644 index 31df9f3c5..000000000 --- a/roles/grafana_collector/tasks/supervise_deployment.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -- name: deploy supervise - include_role: - name: supervise - vars: - this_role_name: grafana_collector - service_name: grafana_collector-{{ grafana_collector_port }} diff --git a/roles/grafana_collector/tasks/systemd_deployment.yml b/roles/grafana_collector/tasks/systemd_deployment.yml deleted file mode 100644 index bed31f8e3..000000000 --- a/roles/grafana_collector/tasks/systemd_deployment.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -- name: deploy systemd - include_role: - name: systemd - vars: - this_role_name: grafana_collector - service_name: grafana_collector-{{ grafana_collector_port }} diff --git a/roles/grafana_collector/templates/run_grafana_collector_binary.sh.j2 b/roles/grafana_collector/templates/run_grafana_collector_binary.sh.j2 deleted file mode 100755 index 3f5288ceb..000000000 --- a/roles/grafana_collector/templates/run_grafana_collector_binary.sh.j2 +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -set -e -ulimit -n 1000000 - -DEPLOY_DIR={{ deploy_dir }} -cd "${DEPLOY_DIR}" || exit 1 - -# WARNING: This file was auto-generated. Do not edit! -# All your edit might be overwritten! - -{% set my_ip = hostvars[inventory_hostname].ansible_host | default(hostvars[inventory_hostname].inventory_hostname) -%} - -exec bin/grafana_collector \ - --ip="{{ my_ip }}:{{ grafana_port }}" \ - --port=":{{ grafana_collector_port}}" \ - --config="conf/grafana_collector.toml" \ - --font-dir="{{ grafana_collector_fonts_dir }}/" \ - --log-file="{{ grafana_collector_log_dir }}/{{ grafana_collector_log_filename }}" \ - --log-level="{{ grafana_collector_log_level }}" diff --git a/roles/local/tasks/main.yml b/roles/local/tasks/main.yml index 848d64084..c7fa0d990 100644 --- a/roles/local/tasks/main.yml +++ b/roles/local/tasks/main.yml @@ -178,10 +178,6 @@ with_items: - fio -- name: cp grafana_collector binary and fonts - shell: > - cp -rv {{ downloads_dir }}/grafana_collector-latest-linux-amd64/* "{{ resources_dir }}/bin/" - - name: cp kafka_exporter binary shell: > cp -v {{ downloads_dir }}/kafka_exporter-*/{{ item }} "{{ resources_dir }}/bin/" diff --git a/roles/local/templates/common_packages.yml.j2 b/roles/local/templates/common_packages.yml.j2 index 15621528c..eb204427a 100644 --- a/roles/local/templates/common_packages.yml.j2 +++ b/roles/local/templates/common_packages.yml.j2 @@ -15,9 +15,6 @@ common_packages: version: 3.8 url: "http://download.pingcap.org/fio-3.8.tar.gz" checksum: "sha256:15739abde7e74b59ac59df57f129b14fc5cd59e1e2eca2ce37b41f8c289c3d58" - - name: grafana_collector - version: latest - url: http://download.pingcap.org/grafana_collector-latest-linux-amd64.tar.gz - name: kafka_exporter version: 1.1.0 url: http://download.pingcap.org/kafka_exporter-1.1.0.linux-amd64.tar.gz diff --git a/rolling_update_monitor.yml b/rolling_update_monitor.yml index 642190cce..eb50df888 100644 --- a/rolling_update_monitor.yml +++ b/rolling_update_monitor.yml @@ -351,36 +351,8 @@ state: stopped msg: "the grafana port {{ grafana_port }} is not down" - - name: check grafana_collector existed - stat: - path: "{{ deploy_dir }}/conf/grafana_collector.toml" - register: grafana_collector_config_file - - - name: stop grafana_collector by supervise - shell: cd {{ deploy_dir }}/scripts && ./stop_{{ item }}.sh - when: - - process_supervision == 'supervise' - - grafana_collector_config_file.stat.exists == True - with_items: - - grafana_collector - - - name: stop grafana_collector by systemd - systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=stopped - become: true - when: - - process_supervision == 'systemd' - - grafana_collector_config_file.stat.exists == True - - - name: wait until the grafana_collector port is down - wait_for: - host: "{{ ansible_host }}" - port: "{{ grafana_collector_port }}" - state: stopped - msg: "the grafana_collector port {{ grafana_collector_port }} is not down" - roles: - grafana - - grafana_collector post_tasks: - name: start grafana by supervise @@ -409,24 +381,6 @@ retries: 12 delay: 5 - - name: start grafana_collector by supervise - shell: cd {{ deploy_dir }}/scripts && ./start_{{ item }}.sh - when: process_supervision == 'supervise' - with_items: - - grafana_collector - - - name: start grafana_collector by systemd - systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=started enabled=no - when: process_supervision == 'systemd' - become: true - - - name: wait until the grafana_collector port is up - wait_for: - host: "{{ ansible_host }}" - port: "{{ grafana_collector_port }}" - state: started - msg: "the grafana_collector port {{ grafana_collector_port }} is not up" - - set_fact: grafana_host: "{{ ansible_host }}" @@ -448,7 +402,6 @@ - grafana_dest_config: name: "{{ cluster_name | title }}" url: "http://{{ grafana_host }}:{{ grafana_port }}/" - report_url: "http://{{ grafana_host }}:{{ grafana_collector_port }}/" user: "{{ grafana_admin_user }}" password: "{{ grafana_admin_password }}" apikey: "{{ lookup('file', grafana_api_keys_dir + '/grafana_apikey.key') }}" diff --git a/scripts/binlog.json b/scripts/binlog.json index 6df81a99f..6f7f7da0d 100644 --- a/scripts/binlog.json +++ b/scripts/binlog.json @@ -1,8 +1,8 @@ { "__inputs": [ { - "name": "DS_TIDB-CLUSTER", - "label": "tidb-cluster", + "name": "DS_TEST-CLUSTER", + "label": "test-cluster", "description": "", "type": "datasource", "pluginId": "prometheus", @@ -14,7 +14,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "4.6.3" + "version": "6.1.6" }, { "type": "panel", @@ -39,7 +39,7 @@ "list": [ { "builtIn": 1, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -51,34 +51,33 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "hideControls": false, "id": null, - "links": [ + "iteration": 1564734492545, + "links": [], + "panels": [ { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], - "refresh": "10s", - "rows": [ - { - "collapse": true, - "height": 269, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 73, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 1 + }, "hideTimeOverride": false, "id": 68, "legend": { @@ -103,7 +102,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -157,8 +155,14 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 1 + }, "id": 63, "legend": { "alignAsTable": true, @@ -183,7 +187,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -243,11 +246,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 8 + }, "id": 7, "legend": { "alignAsTable": true, @@ -270,7 +279,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -326,11 +334,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 8 + }, "id": 3, "legend": { "alignAsTable": true, @@ -353,7 +367,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -414,8 +427,14 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 15 + }, "id": 44, "legend": { "alignAsTable": true, @@ -438,7 +457,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -498,11 +516,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 15 + }, "id": 66, "legend": { "alignAsTable": true, @@ -525,7 +549,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -586,8 +609,14 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 22 + }, "id": 48, "legend": { "alignAsTable": true, @@ -610,7 +639,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -664,8 +692,14 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 22 + }, "id": 67, "legend": { "alignAsTable": true, @@ -688,7 +722,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -738,15 +771,18 @@ } ], "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, "title": "pump", - "titleSize": "h6" + "type": "row" }, { - "collapse": true, - "height": 254, + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 74, "panels": [ { "cacheTimeout": null, @@ -757,7 +793,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "format": "dateTimeAsIso", "gauge": { "maxValue": null, @@ -766,6 +802,12 @@ "thresholdLabels": false, "thresholdMarkers": true }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 23 + }, "hideTimeOverride": false, "id": 70, "interval": null, @@ -796,7 +838,6 @@ } ], "repeat": null, - "span": 4, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, @@ -835,8 +876,14 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "fill": 1, + "gridPos": { + "h": 7, + "w": 16, + "x": 8, + "y": 23 + }, "id": 69, "legend": { "alignAsTable": true, @@ -861,7 +908,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 8, "stack": false, "steppedLine": false, "targets": [ @@ -917,11 +963,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 30 + }, "id": 62, "legend": { "alignAsTable": true, @@ -944,7 +996,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1000,11 +1051,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 30 + }, "id": 53, "legend": { "alignAsTable": true, @@ -1027,7 +1084,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1083,11 +1139,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 37 + }, "id": 58, "legend": { "alignAsTable": true, @@ -1110,7 +1172,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1166,11 +1227,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 37 + }, "id": 6, "legend": { "alignAsTable": true, @@ -1193,7 +1260,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1249,11 +1315,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 44 + }, "id": 15, "legend": { "avg": false, @@ -1274,7 +1346,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1330,11 +1401,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 44 + }, "id": 71, "legend": { "avg": false, @@ -1355,7 +1432,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1411,11 +1487,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 51 + }, "id": 55, "legend": { "alignAsTable": true, @@ -1438,7 +1520,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1494,11 +1575,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 51 + }, "id": 52, "legend": { "alignAsTable": true, @@ -1521,7 +1608,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1578,8 +1664,14 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "fill": 1, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 58 + }, "id": 72, "legend": { "avg": false, @@ -1600,7 +1692,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 12, "stack": false, "steppedLine": false, "targets": [ @@ -1650,26 +1741,35 @@ } ], "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, "title": "drainer", - "titleSize": "h6" + "type": "row" }, { - "collapse": true, - "height": "250px", + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 75, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 59 + }, "id": 9, "legend": { "alignAsTable": true, @@ -1692,7 +1792,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1748,11 +1847,17 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", "editable": true, "error": false, "fill": 1, "grid": {}, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 59 + }, "id": 39, "legend": { "alignAsTable": true, @@ -1775,7 +1880,6 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, "stack": false, "steppedLine": false, "targets": [ @@ -1828,14 +1932,12 @@ } ], "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, "title": "node", - "titleSize": "h6" + "type": "row" } ], - "schemaVersion": 14, + "refresh": "10s", + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { @@ -1843,7 +1945,8 @@ { "allValue": null, "current": {}, - "datasource": "${DS_TIDB-CLUSTER}", + "datasource": "${DS_TEST-CLUSTER}", + "definition": "", "hide": 0, "includeAll": false, "label": null, @@ -1853,6 +1956,7 @@ "query": "label_values(binlog_drainer_ddl_jobs_total, instance)", "refresh": 1, "regex": "", + "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tags": [], @@ -1893,5 +1997,6 @@ }, "timezone": "browser", "title": "Test-Cluster-Binlog", - "version": 75 -} + "uid": "RDdDTFvZz", + "version": 2 +} \ No newline at end of file diff --git a/scripts/blackbox_exporter.json b/scripts/blackbox_exporter.json index 39010158c..514dd140a 100644 --- a/scripts/blackbox_exporter.json +++ b/scripts/blackbox_exporter.json @@ -14,7 +14,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "4.6.3" + "version": "6.1.6" }, { "type": "panel", @@ -51,464 +51,474 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "hideControls": false, "id": null, - "links": [ + "iteration": 1564734554417, + "links": [], + "panels": [ { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], - "rows": [ + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 30, + "panels": [], + "repeat": null, + "title": "Network Status", + "type": "row" + }, { - "collapse": false, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_TEST-CLUSTER}", - "fill": 1, - "id": 1, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "probe_duration_seconds{job=\"$PingJobHost\"}", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "", - "refId": "A", - "step": 20 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Ping Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 1, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "probe_duration_seconds{job=\"$PingJobHost\"}", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 20 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Ping Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true } ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 31, + "panels": [], "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Network Status", - "titleSize": "h6" + "title": "Services Port Status", + "type": "row" }, { - "collapse": false, - "height": 308, - "panels": [ - { - "columns": [ - { - "text": "Current", - "value": "current" - } + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": "${DS_TEST-CLUSTER}", + "fontSize": "100%", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 9 + }, + "hideTimeOverride": true, + "id": 28, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "Service", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_TEST-CLUSTER}", - "fontSize": "100%", - "hideTimeOverride": true, - "id": 28, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": null, - "desc": false - }, - "span": 6, - "styles": [ - { - "alias": "Time", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "Service", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Metric", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "alias": "Up", - "colorMode": "cell", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "pattern": "Current", - "thresholds": [ - "0", - "1" - ], - "type": "number", - "unit": "short" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "Metric", + "thresholds": [], + "type": "string", + "unit": "short" + }, + { + "alias": "Up", + "colorMode": "cell", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "pattern": "Current", + "thresholds": [ + "0", + "1" + ], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" ], - "targets": [ - { - "expr": "count(probe_success{group=\"tidb\"} == 1)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "TiDB", - "refId": "A" - }, - { - "expr": "count(probe_success{group=\"pd\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "PD", - "refId": "B" - }, - { - "expr": "count(probe_success{group=\"tikv\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "TiKV", - "refId": "C" - }, - { - "expr": "count(probe_success{group=\"pump\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Pump", - "refId": "D" - }, - { - "expr": "count(probe_success{group=\"drainer\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Drainer", - "refId": "E" - }, - { - "expr": "count(probe_success{group=\"kafka\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Kafka", - "refId": "F" - }, - { - "expr": "count(probe_success{group=\"zookeeper\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Zookeeper", - "refId": "G" - }, - { - "expr": "count(probe_success{group=\"node_exporter\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Node_exporter", - "refId": "H" - }, - { - "expr": "count(probe_success{group=\"blackbox_exporter\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Blackbox_exporter", - "refId": "I" - }, - { - "expr": "count(probe_success{group=\"grafana\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Grafana", - "refId": "J" - }, - { - "expr": "count(probe_success{job=\"blackbox_exporter_http\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Pushgateway", - "refId": "K" - }, - { - "expr": "count(probe_success{group=\"kafka_exporter\"} == 1)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Kafka_exporter", - "refId": "L" - } + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "count(probe_success{group=\"tidb\"} == 1)", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "TiDB", + "refId": "A" + }, + { + "expr": "count(probe_success{group=\"pd\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "PD", + "refId": "B" + }, + { + "expr": "count(probe_success{group=\"tikv\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "TiKV", + "refId": "C" + }, + { + "expr": "count(probe_success{group=\"pump\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pump", + "refId": "D" + }, + { + "expr": "count(probe_success{group=\"drainer\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Drainer", + "refId": "E" + }, + { + "expr": "count(probe_success{group=\"kafka\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Kafka", + "refId": "F" + }, + { + "expr": "count(probe_success{group=\"zookeeper\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Zookeeper", + "refId": "G" + }, + { + "expr": "count(probe_success{group=\"node_exporter\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Node_exporter", + "refId": "H" + }, + { + "expr": "count(probe_success{group=\"blackbox_exporter\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Blackbox_exporter", + "refId": "I" + }, + { + "expr": "count(probe_success{group=\"grafana\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Grafana", + "refId": "J" + }, + { + "expr": "count(probe_success{job=\"blackbox_exporter_http\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pushgateway", + "refId": "K" + }, + { + "expr": "count(probe_success{group=\"kafka_exporter\"} == 1)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Kafka_exporter", + "refId": "L" + } + ], + "timeFrom": "1s", + "title": "", + "transform": "timeseries_aggregations", + "type": "table" + }, + { + "columns": [ + { + "text": "Current", + "value": "current" + } + ], + "datasource": "${DS_TEST-CLUSTER}", + "fontSize": "100%", + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 9 + }, + "hideTimeOverride": true, + "id": 29, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": null, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "Service", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" ], - "timeFrom": "1s", - "title": "", - "transform": "timeseries_aggregations", - "transparent": false, - "type": "table" + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "Metric", + "thresholds": [], + "type": "string", + "unit": "short" }, { - "columns": [ - { - "text": "Current", - "value": "current" - } + "alias": "Down", + "colorMode": "cell", + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_TEST-CLUSTER}", - "fontSize": "100%", - "hideTimeOverride": true, - "id": 29, - "links": [], - "pageSize": null, - "scroll": true, - "showHeader": true, - "sort": { - "col": null, - "desc": false - }, - "span": 6, - "styles": [ - { - "alias": "Time", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "Service", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Metric", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "alias": "Down", - "colorMode": "cell", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "pattern": "Current", - "thresholds": [ - "100", - "200" - ], - "type": "number", - "unit": "short" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "pattern": "Current", + "thresholds": [ + "100", + "200" ], - "targets": [ - { - "expr": "count(probe_success{group=\"tidb\"} == 0)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "TiDB", - "refId": "A" - }, - { - "expr": "count(probe_success{group=\"pd\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "PD", - "refId": "B" - }, - { - "expr": "count(probe_success{group=\"tikv\"} == 0)", - "format": "time_series", - "hide": false, - "intervalFactor": 2, - "legendFormat": "TiKV", - "refId": "C" - }, - { - "expr": "count(probe_success{group=\"pump\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Pump", - "refId": "D" - }, - { - "expr": "count(probe_success{group=\"drainer\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Drainer", - "refId": "E" - }, - { - "expr": "count(probe_success{group=\"kafka\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Kafka", - "refId": "F" - }, - { - "expr": "count(probe_success{group=\"zookeeper\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Zookeeper", - "refId": "G" - }, - { - "expr": "count(probe_success{group=\"node_exporter\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Node_exporter", - "refId": "H" - }, - { - "expr": "count(probe_success{group=\"blackbox_exporter\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Blackbox_exporter", - "refId": "I" - }, - { - "expr": "count(probe_success{group=\"grafana\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Grafana", - "refId": "J" - }, - { - "expr": "count(probe_success{job=\"blackbox_exporter_http\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Pushgateway", - "refId": "K" - }, - { - "expr": "count(probe_success{group=\"kafka_exporter\"} == 0)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Kafka_exporter", - "refId": "L" - } + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" ], - "timeFrom": "1s", - "title": "", - "transform": "timeseries_aggregations", - "transparent": false, - "type": "table" + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" } ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": true, - "title": "Services Port Status", - "titleSize": "h6" + "targets": [ + { + "expr": "count(probe_success{group=\"tidb\"} == 0)", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "TiDB", + "refId": "A" + }, + { + "expr": "count(probe_success{group=\"pd\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "PD", + "refId": "B" + }, + { + "expr": "count(probe_success{group=\"tikv\"} == 0)", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "TiKV", + "refId": "C" + }, + { + "expr": "count(probe_success{group=\"pump\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pump", + "refId": "D" + }, + { + "expr": "count(probe_success{group=\"drainer\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Drainer", + "refId": "E" + }, + { + "expr": "count(probe_success{group=\"kafka\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Kafka", + "refId": "F" + }, + { + "expr": "count(probe_success{group=\"zookeeper\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Zookeeper", + "refId": "G" + }, + { + "expr": "count(probe_success{group=\"node_exporter\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Node_exporter", + "refId": "H" + }, + { + "expr": "count(probe_success{group=\"blackbox_exporter\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Blackbox_exporter", + "refId": "I" + }, + { + "expr": "count(probe_success{group=\"grafana\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Grafana", + "refId": "J" + }, + { + "expr": "count(probe_success{job=\"blackbox_exporter_http\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Pushgateway", + "refId": "K" + }, + { + "expr": "count(probe_success{group=\"kafka_exporter\"} == 0)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Kafka_exporter", + "refId": "L" + } + ], + "timeFrom": "1s", + "title": "", + "transform": "timeseries_aggregations", + "type": "table" } ], - "schemaVersion": 14, + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { @@ -517,6 +527,7 @@ "allValue": null, "current": {}, "datasource": "${DS_TEST-CLUSTER}", + "definition": "", "hide": 0, "includeAll": false, "label": "PingJobHost", @@ -526,6 +537,7 @@ "query": "label_values(probe_duration_seconds,job)", "refresh": 1, "regex": "/blackbox_exporter.*icmp/", + "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tags": [], @@ -566,5 +578,6 @@ }, "timezone": "", "title": "Test-Cluster-Blackbox_exporter", - "version": 4 -} + "uid": "DaODoKDZk", + "version": 2 +} \ No newline at end of file diff --git a/scripts/disk_performance.json b/scripts/disk_performance.json index 7a9c8d620..6c90b5317 100644 --- a/scripts/disk_performance.json +++ b/scripts/disk_performance.json @@ -46,20 +46,8 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1562916952771, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "iteration": 1564734594079, + "links": [], "panels": [ { "aliasColors": {}, @@ -1031,5 +1019,5 @@ "timezone": "browser", "title": "Test-Cluster-Disk-Performance", "uid": "q2MgvJVWk", - "version": 8 -} + "version": 2 +} \ No newline at end of file diff --git a/scripts/grafana-config-copy.py b/scripts/grafana-config-copy.py index 20c386168..3306a7cc0 100755 --- a/scripts/grafana-config-copy.py +++ b/scripts/grafana-config-copy.py @@ -89,7 +89,6 @@ def fill_dashboard_with_dest_config(dashboard, dest, type_='node'): link['targetBlank'] = True link['tooltip'] = "Open a pdf report for the current dashboard" link['type'] = "link" - link['url'] = "{0}api/report/{1}?apitoken={2}".format(dest['report_url'], dest['titles'][type_].lower(), dest['apikey']) return dashboard diff --git a/scripts/kafka.json b/scripts/kafka.json index f1f61c1a5..33425d554 100644 --- a/scripts/kafka.json +++ b/scripts/kafka.json @@ -14,7 +14,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "4.6.3" + "version": "6.1.6" }, { "type": "panel", @@ -39,7 +39,7 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": "${DS_TEST-CLUSTER}", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -51,605 +51,612 @@ "editable": true, "gnetId": null, "graphTooltip": 0, - "hideControls": false, "id": null, - "links": [ + "iteration": 1564734780838, + "links": [], + "panels": [ { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], - "refresh": false, - "rows": [ + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "${DS_TEST-CLUSTER}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 0 + }, + "id": 7, + "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": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "kafka_brokers", + "format": "time_series", + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "", + "title": "Kafka Brokers", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, { - "collapse": false, - "height": 250, - "panels": [ + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "${DS_TEST-CLUSTER}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 0 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "${DS_TEST-CLUSTER}", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 7, - "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": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "kafka_brokers", - "format": "time_series", - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "", - "title": "Kafka Brokers", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" + "name": "value to text", + "value": 1 }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "${DS_TEST-CLUSTER}", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 8, - "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": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "kafka_topic_partition_oldest_offset{topic=\"$topic\"}", - "format": "time_series", - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "", - "title": "Topic Partition Oldest Offset", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "kafka_topic_partition_oldest_offset{topic=\"$topic\"}", + "format": "time_series", + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "", + "title": "Topic Partition Oldest Offset", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "${DS_TEST-CLUSTER}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 0 + }, + "id": 9, + "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": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(kafka_topic_partition_current_offset{topic=\"$topic\"})", + "format": "time_series", + "intervalFactor": 2, + "refId": "A" + } + ], + "thresholds": "", + "title": "Topic Partition Current Offset", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "decimals": 0, + "description": "Number of partitions for this Topic", + "fill": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 1, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sideWidth": null, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum (kafka_topic_partitions) by (topic)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Topic Partitions Count", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#299c46", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "${DS_TEST-CLUSTER}", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "id": 9, - "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": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(kafka_topic_partition_current_offset{topic=\"$topic\"})", - "format": "time_series", - "intervalFactor": 2, - "refId": "A" - } - ], - "thresholds": "", - "title": "Topic Partition Current Offset", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true } ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6" + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "collapse": false, - "height": "250px", - "panels": [ + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "decimals": 0, + "description": "Leader Broker ID of Topic/Partition", + "fill": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(kafka_topic_partition_leader) by (topic, partition)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{topic=\"{{ topic }}\", partition=\"{{ partition}}\"}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Leader Broker ID", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_TEST-CLUSTER}", "decimals": 0, - "description": "Number of partitions for this Topic", - "fill": 0, - "id": 1, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (kafka_topic_partitions) by (topic)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Topic Partitions Count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_TEST-CLUSTER}", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "description": "Number of Replicas for this Topic/Partition", + "fill": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 5, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum (kafka_topic_partition_replicas) by (topic, partition)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{topic=\"{{ topic }}\", partition=\"{{ partition}}\"}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Replicas", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { "decimals": 0, - "description": "Leader Broker ID of Topic/Partition", - "fill": 0, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(kafka_topic_partition_leader) by (topic, partition)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{topic=\"{{ topic }}\", partition=\"{{ partition}}\"}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Leader Broker ID", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true } ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6" + "yaxis": { + "align": false, + "alignLevel": null + } }, { - "collapse": false, - "height": 250, - "panels": [ + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "description": "Number of In-Sync Replicas for this Topic/Partition", + "fill": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 6, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_TEST-CLUSTER}", - "description": "Number of Replicas for this Topic/Partition", - "fill": 0, - "id": 5, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (kafka_topic_partition_replicas) by (topic, partition)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{topic=\"{{ topic }}\", partition=\"{{ partition}}\"}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Replicas", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] + "expr": "sum(kafka_topic_partition_in_sync_replica) by (topic, partition)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{topic=\"{{ topic }}\", partition=\"{{ partition}}\"}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "In Sync Replica", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_TEST-CLUSTER}", - "description": "Number of In-Sync Replicas for this Topic/Partition", - "fill": 0, - "id": 6, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "span": 6, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(kafka_topic_partition_in_sync_replica) by (topic, partition)", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{topic=\"{{ topic }}\", partition=\"{{ partition}}\"}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "In Sync Replica", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ] + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true } ], - "repeat": null, - "repeatIteration": null, - "repeatRowId": null, - "showTitle": false, - "title": "Dashboard Row", - "titleSize": "h6" + "yaxis": { + "align": false, + "alignLevel": null + } } ], - "schemaVersion": 14, + "refresh": false, + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { @@ -658,6 +665,7 @@ "allValue": null, "current": {}, "datasource": "${DS_TEST-CLUSTER}", + "definition": "", "hide": 0, "includeAll": false, "label": "", @@ -667,6 +675,7 @@ "query": "label_values(kafka_topic_partition_leader, topic)", "refresh": 1, "regex": "", + "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tags": [], @@ -706,6 +715,7 @@ ] }, "timezone": "", - "title": "Kafka Overview", - "version": 73 -} + "title": "Test-Cluster-Kafka-Overview", + "uid": "hydvTFDWk", + "version": 2 +} \ No newline at end of file diff --git a/scripts/node.json b/scripts/node.json index cd6d7720b..357e6a907 100644 --- a/scripts/node.json +++ b/scripts/node.json @@ -65,21 +65,8 @@ "gnetId": 159, "graphTooltip": 1, "id": null, - "iteration": 1561348732020, - "links": [ - { - "asDropdown": false, - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "iteration": 1564734813830, + "links": [], "panels": [ { "collapsed": true, @@ -5581,5 +5568,5 @@ "timezone": "browser", "title": "Test-Cluster-Node_exporter", "uid": "000000001", - "version": 3 -} + "version": 2 +} \ No newline at end of file diff --git a/scripts/overview.json b/scripts/overview.json index db6cfa82b..ac13731da 100644 --- a/scripts/overview.json +++ b/scripts/overview.json @@ -56,22 +56,10 @@ }, "editable": true, "gnetId": null, - "graphTooltip": 0, + "graphTooltip": 1, "id": null, - "iteration": 1560503743039, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "iteration": 1564756163207, + "links": [], "panels": [ { "collapsed": true, @@ -467,7 +455,7 @@ "id": 29, "interval": null, "links": [], - "mappingType": 2, + "mappingType": 1, "mappingTypes": [ { "name": "value to text", @@ -485,25 +473,7 @@ "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "1", - "text": "Leader", - "to": "100000" - }, - { - "from": "0", - "text": "Follower", - "to": "1" - } - ], - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, + "rangeMaps": [], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, @@ -513,7 +483,7 @@ "tableColumn": "", "targets": [ { - "expr": "delta(pd_server_tso{type=\"save\",instance=\"$instance\"}[1m])", + "expr": "count(delta(pd_tso_events{type=\"save\",instance=\"$instance\"}[1m]))", "format": "time_series", "interval": "", "intervalFactor": 2, @@ -523,20 +493,20 @@ "step": 60 } ], - "thresholds": "", + "thresholds": "0,2", "title": "PD Role", "type": "singlestat", "valueFontSize": "50%", "valueMaps": [ { "op": "=", - "text": "N/A", + "text": "Leader", "value": "1" }, { "op": "=", - "text": "", - "value": "" + "text": "Follower", + "value": "null" } ], "valueName": "current" @@ -596,13 +566,6 @@ "to": "null" } ], - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "sparkline": { "fillColor": "rgba(77, 135, 25, 0.18)", "full": true, @@ -613,6 +576,7 @@ "targets": [ { "expr": "pd_cluster_status{instance=\"$instance\",type=\"storage_capacity\"}", + "format": "time_series", "intervalFactor": 2, "refId": "A", "step": 60 @@ -687,13 +651,6 @@ "to": "null" } ], - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": true, @@ -774,13 +731,6 @@ "to": "null" } ], - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": true, @@ -861,13 +811,6 @@ "to": "null" } ], - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": true, @@ -949,13 +892,6 @@ "to": "null" } ], - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": true, @@ -1007,13 +943,6 @@ "links": [], "pageSize": null, "repeat": null, - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "scroll": false, "showHeader": true, "sort": { @@ -1144,13 +1073,6 @@ "pointradius": 5, "points": false, "renderer": "flot", - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "seriesOverrides": [], "spaceLength": 10, "stack": false, @@ -1244,13 +1166,6 @@ "pointradius": 5, "points": false, "renderer": "flot", - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "seriesOverrides": [], "spaceLength": 10, "stack": false, @@ -1347,13 +1262,6 @@ "pointradius": 5, "points": false, "renderer": "flot", - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "seriesOverrides": [], "spaceLength": 10, "stack": false, @@ -1451,13 +1359,6 @@ "pointradius": 5, "points": false, "renderer": "flot", - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "seriesOverrides": [], "spaceLength": 10, "stack": false, @@ -1548,13 +1449,6 @@ "pointradius": 5, "points": false, "renderer": "flot", - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "seriesOverrides": [], "spaceLength": 10, "stack": false, @@ -1644,13 +1538,6 @@ "pointradius": 5, "points": false, "renderer": "flot", - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "seriesOverrides": [], "spaceLength": 10, "stack": false, @@ -1742,13 +1629,6 @@ "pointradius": 5, "points": false, "renderer": "flot", - "scopedVars": { - "instance": { - "selected": true, - "text": "10.0.1.4:32379", - "value": "10.0.1.4:32379" - } - }, "seriesOverrides": [], "spaceLength": 10, "stack": false, @@ -1804,7 +1684,7 @@ } } ], - "repeat": "instance", + "repeat": null, "title": "PD", "type": "row" }, @@ -1814,7 +1694,7 @@ "h": 1, "w": 24, "x": 0, - "y": 3 + "y": 2 }, "id": 82, "panels": [ @@ -1832,7 +1712,7 @@ "h": 7, "w": 12, "x": 0, - "y": 39 + "y": 3 }, "id": 2, "legend": { @@ -1876,6 +1756,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Statement OPS", "tooltip": { @@ -1909,7 +1790,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1922,7 +1807,7 @@ "h": 7, "w": 12, "x": 12, - "y": 39 + "y": 3 }, "id": 34, "legend": { @@ -1982,6 +1867,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Duration", "tooltip": { @@ -2014,7 +1900,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2027,7 +1917,7 @@ "h": 7, "w": 12, "x": 0, - "y": 46 + "y": 10 }, "id": 35, "legend": { @@ -2067,6 +1957,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "QPS By Instance", "tooltip": { @@ -2099,7 +1990,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2112,7 +2007,7 @@ "h": 7, "w": 12, "x": 12, - "y": 46 + "y": 10 }, "id": 72, "legend": { @@ -2151,6 +2046,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Failed Query OPM", "tooltip": { @@ -2183,7 +2079,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2199,7 +2099,7 @@ "h": 7, "w": 12, "x": 0, - "y": 53 + "y": 17 }, "id": 4, "legend": { @@ -2251,6 +2151,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Connection Count", "tooltip": { @@ -2284,7 +2185,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2297,7 +2202,7 @@ "h": 7, "w": 12, "x": 12, - "y": 53 + "y": 17 }, "id": 36, "legend": { @@ -2337,6 +2242,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Heap Memory Usage", "tooltip": { @@ -2369,7 +2275,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2382,7 +2292,7 @@ "h": 7, "w": 12, "x": 0, - "y": 60 + "y": 24 }, "id": 70, "legend": { @@ -2417,6 +2327,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Transaction OPS", "tooltip": { @@ -2449,7 +2360,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2462,7 +2377,7 @@ "h": 7, "w": 12, "x": 12, - "y": 60 + "y": 24 }, "id": 71, "legend": { @@ -2511,6 +2426,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Transaction Duration", "tooltip": { @@ -2543,7 +2459,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2556,7 +2476,7 @@ "h": 7, "w": 12, "x": 0, - "y": 67 + "y": 31 }, "id": 37, "legend": { @@ -2596,6 +2516,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "KV Cmd OPS", "tooltip": { @@ -2628,7 +2549,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2641,7 +2566,7 @@ "h": 7, "w": 12, "x": 12, - "y": 67 + "y": 31 }, "id": 38, "legend": { @@ -2682,6 +2607,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "KV Cmd Duration 99", "tooltip": { @@ -2714,7 +2640,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2727,7 +2657,7 @@ "h": 7, "w": 12, "x": 0, - "y": 74 + "y": 38 }, "id": 39, "legend": { @@ -2772,6 +2702,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "PD TSO OPS", "tooltip": { @@ -2804,7 +2735,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2817,7 +2752,7 @@ "h": 7, "w": 12, "x": 12, - "y": 74 + "y": 38 }, "id": 40, "legend": { @@ -2871,6 +2806,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "PD TSO Wait Duration", "tooltip": { @@ -2903,7 +2839,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2917,7 +2857,7 @@ "h": 7, "w": 12, "x": 0, - "y": 81 + "y": 45 }, "id": 41, "legend": { @@ -2958,6 +2898,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "TiClient Region Error OPS", "tooltip": { @@ -2990,7 +2931,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3003,7 +2948,7 @@ "h": 7, "w": 12, "x": 12, - "y": 81 + "y": 45 }, "id": 42, "legend": { @@ -3044,6 +2989,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Lock Resolve OPS", "tooltip": { @@ -3076,7 +3022,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3093,7 +3043,7 @@ "h": 7, "w": 12, "x": 0, - "y": 88 + "y": 52 }, "id": 6, "legend": { @@ -3134,6 +3084,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Load Schema Duration", "tooltip": { @@ -3167,7 +3118,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3180,7 +3135,7 @@ "h": 7, "w": 12, "x": 12, - "y": 88 + "y": 52 }, "id": 43, "legend": { @@ -3220,6 +3175,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "KV Backoff OPS", "tooltip": { @@ -3252,7 +3208,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "repeat": null, @@ -3265,7 +3225,7 @@ "h": 1, "w": 24, "x": 0, - "y": 4 + "y": 3 }, "id": 83, "panels": [ @@ -3284,7 +3244,7 @@ "h": 8, "w": 12, "x": 0, - "y": 89 + "y": 4 }, "id": 20, "legend": { @@ -3337,6 +3297,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "leader", "tooltip": { @@ -3370,7 +3331,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3387,7 +3352,7 @@ "h": 8, "w": 12, "x": 12, - "y": 89 + "y": 4 }, "id": 21, "legend": { @@ -3425,6 +3390,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "region", "tooltip": { @@ -3458,7 +3424,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3472,7 +3442,7 @@ "h": 8, "w": 12, "x": 0, - "y": 97 + "y": 12 }, "id": 75, "legend": { @@ -3509,6 +3479,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "CPU", "tooltip": { @@ -3541,7 +3512,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3554,7 +3529,7 @@ "h": 8, "w": 12, "x": 12, - "y": 97 + "y": 12 }, "id": 74, "legend": { @@ -3591,6 +3566,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Memory", "tooltip": { @@ -3623,7 +3599,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3637,7 +3617,7 @@ "h": 8, "w": 12, "x": 0, - "y": 105 + "y": 20 }, "id": 44, "legend": { @@ -3676,6 +3656,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "store size", "tooltip": { @@ -3708,7 +3689,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3722,7 +3707,7 @@ "h": 8, "w": 12, "x": 12, - "y": 105 + "y": 20 }, "id": 73, "legend": { @@ -3759,6 +3744,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "cf size", "tooltip": { @@ -3791,7 +3777,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3808,7 +3798,7 @@ "h": 8, "w": 12, "x": 0, - "y": 113 + "y": 28 }, "id": 17, "legend": { @@ -3850,6 +3840,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "channel full", "tooltip": { @@ -3883,7 +3874,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3900,7 +3895,7 @@ "h": 8, "w": 12, "x": 12, - "y": 113 + "y": 28 }, "id": 11, "legend": { @@ -3944,6 +3939,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "server report failures", "tooltip": { @@ -3977,7 +3973,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -3991,7 +3991,7 @@ "h": 8, "w": 12, "x": 0, - "y": 121 + "y": 36 }, "id": 46, "legend": { @@ -4029,6 +4029,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "scheduler pending commands", "tooltip": { @@ -4061,7 +4062,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -4075,7 +4080,7 @@ "h": 8, "w": 12, "x": 12, - "y": 121 + "y": 36 }, "id": 51, "legend": { @@ -4115,6 +4120,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "coprocessor executor count", "tooltip": { @@ -4147,7 +4153,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -4161,7 +4171,7 @@ "h": 8, "w": 12, "x": 0, - "y": 129 + "y": 44 }, "id": 47, "legend": { @@ -4223,6 +4233,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "coprocessor request duration", "tooltip": { @@ -4255,7 +4266,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -4269,7 +4284,7 @@ "h": 8, "w": 12, "x": 12, - "y": 129 + "y": 44 }, "id": 48, "legend": { @@ -4308,6 +4323,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "raft store CPU", "tooltip": { @@ -4340,7 +4356,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -4354,7 +4374,7 @@ "h": 8, "w": 12, "x": 0, - "y": 137 + "y": 52 }, "id": 49, "legend": { @@ -4394,6 +4414,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Coprocessor CPU", "tooltip": { @@ -4426,7 +4447,11 @@ "min": null, "show": true } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "repeat": null, @@ -4439,7 +4464,7 @@ "h": 1, "w": 24, "x": 0, - "y": 5 + "y": 4 }, "id": 84, "panels": [ @@ -5273,5 +5298,5 @@ "timezone": "browser", "title": "Test-Cluster-Overview", "uid": "eDbRZpnWk", - "version": 2 -} + "version": 11 +} \ No newline at end of file diff --git a/scripts/pd.json b/scripts/pd.json index ceaee7fdb..444afcf59 100644 --- a/scripts/pd.json +++ b/scripts/pd.json @@ -58,20 +58,8 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1562917071041, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "iteration": 1564738811479, + "links": [], "panels": [ { "collapsed": true, @@ -110,7 +98,7 @@ "id": 55, "interval": null, "links": [], - "mappingType": 2, + "mappingType": 1, "mappingTypes": [ { "name": "value to text", @@ -149,7 +137,7 @@ "tableColumn": "", "targets": [ { - "expr": "delta(pd_server_tso{type=\"save\",instance=\"$instance\"}[1m])", + "expr": "count(delta(pd_tso_events{type=\"save\",instance=\"$instance\"}[1m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "", @@ -165,8 +153,13 @@ "valueMaps": [ { "op": "=", - "text": "N/A", + "text": "Follower", "value": "null" + }, + { + "op": "=", + "text": "Leader", + "value": "1" } ], "valueName": "current" @@ -7249,5 +7242,5 @@ "timezone": "browser", "title": "Test-Cluster-PD", "uid": "Q6RuHYIWk", - "version": 4 -} + "version": 5 +} \ No newline at end of file diff --git a/scripts/tidb.json b/scripts/tidb.json index b28114366..ce9dbc351 100644 --- a/scripts/tidb.json +++ b/scripts/tidb.json @@ -46,19 +46,7 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "links": [], "panels": [ { "collapsed": true, diff --git a/scripts/tidb_summary.json b/scripts/tidb_summary.json index bde871747..346c5f4e7 100644 --- a/scripts/tidb_summary.json +++ b/scripts/tidb_summary.json @@ -46,19 +46,7 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "links": [], "panels": [ { "collapsed": true, @@ -3059,5 +3047,5 @@ "timezone": "browser", "title": "Test-Cluster-TiDB-Summary", "uid": "000000012", - "version": 1 -} + "version": 2 +} \ No newline at end of file diff --git a/scripts/tikv_details.json b/scripts/tikv_details.json index f79ca8def..0aeee2488 100644 --- a/scripts/tikv_details.json +++ b/scripts/tikv_details.json @@ -58,20 +58,8 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1562921521045, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "iteration": 1564734962292, + "links": [], "panels": [ { "collapsed": true, diff --git a/scripts/tikv_summary.json b/scripts/tikv_summary.json index e057acddd..4347c376a 100644 --- a/scripts/tikv_summary.json +++ b/scripts/tikv_summary.json @@ -14,19 +14,19 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "5.4.3" + "version": "6.1.6" }, { "type": "panel", "id": "graph", "name": "Graph", - "version": "5.0.0" + "version": "" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", - "version": "5.0.0" + "version": "1.0.0" } ], "annotations": { @@ -46,20 +46,8 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1556505632746, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "iteration": 1564734986769, + "links": [], "panels": [ { "collapsed": true, @@ -4511,7 +4499,7 @@ } ], "refresh": "1m", - "schemaVersion": 16, + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { @@ -4616,5 +4604,5 @@ "timezone": "browser", "title": "Test-Cluster-TiKV-Summary", "uid": "X7VQmEzZk", - "version": 1 -} + "version": 2 +} \ No newline at end of file diff --git a/scripts/tikv_trouble_shooting.json b/scripts/tikv_trouble_shooting.json index ebb9d0a5c..d6f024575 100644 --- a/scripts/tikv_trouble_shooting.json +++ b/scripts/tikv_trouble_shooting.json @@ -14,19 +14,19 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "5.4.3" + "version": "6.1.6" }, { "type": "panel", "id": "graph", "name": "Graph", - "version": "5.0.0" + "version": "" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", - "version": "5.0.0" + "version": "1.0.0" } ], "annotations": { @@ -46,20 +46,8 @@ "gnetId": null, "graphTooltip": 1, "id": null, - "iteration": 1556501107870, - "links": [ - { - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": true, - "title": "Report", - "tooltip": "Open a pdf report for the current dashboard", - "type": "link", - "url": "grafana token" - } - ], + "iteration": 1564735010640, + "links": [], "panels": [ { "collapsed": true, @@ -1602,7 +1590,6 @@ "lines": true, "linewidth": 1, "links": [], - "minSpan": null, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -2260,7 +2247,7 @@ "lines": true, "linewidth": 2, "links": [], - "minSpan": 12, + "maxPerRow": 2, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -3400,7 +3387,6 @@ "lines": true, "linewidth": 1, "links": [], - "minSpan": null, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -3515,7 +3501,6 @@ "lines": true, "linewidth": 1, "links": [], - "minSpan": null, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -3856,7 +3841,6 @@ "lines": true, "linewidth": 2, "links": [], - "minSpan": null, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -3972,7 +3956,6 @@ "lines": true, "linewidth": 2, "links": [], - "minSpan": null, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -4703,7 +4686,6 @@ "lines": true, "linewidth": 1, "links": [], - "minSpan": null, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -4818,7 +4800,6 @@ "lines": true, "linewidth": 1, "links": [], - "minSpan": null, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -5029,7 +5010,7 @@ "lines": true, "linewidth": 1, "links": [], - "minSpan": 12, + "maxPerRow": 2, "nullPointMode": "null", "percentage": false, "pointradius": 5, @@ -6191,7 +6172,7 @@ } ], "refresh": "1m", - "schemaVersion": 16, + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { @@ -6297,4 +6278,4 @@ "title": "Test-Cluster-TiKV-Trouble-Shooting", "uid": "Lg4wiEkZz", "version": 2 -} +} \ No newline at end of file diff --git a/start.yml b/start.yml index e2d41fed9..0b58ab116 100644 --- a/start.yml +++ b/start.yml @@ -440,24 +440,6 @@ retries: 12 delay: 5 - - name: start grafana_collector by supervise - shell: cd {{ deploy_dir }}/scripts && ./start_{{ item }}.sh - when: process_supervision == 'supervise' - with_items: - - grafana_collector - - - name: start grafana_collector by systemd - systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=started enabled=no - when: process_supervision == 'systemd' - become: true - - - name: wait until the grafana_collector port is up - wait_for: - host: "{{ ansible_host }}" - port: "{{ grafana_collector_port }}" - state: started - msg: "the grafana_collector port {{ grafana_collector_port }} is not up" - - set_fact: grafana_host: "{{ ansible_host }}" @@ -479,7 +461,6 @@ - grafana_dest_config: name: "{{ cluster_name | title }}" url: "http://{{ grafana_host }}:{{ grafana_port }}/" - report_url: "http://{{ grafana_host }}:{{ grafana_collector_port }}/" user: "{{ grafana_admin_user }}" password: "{{ grafana_admin_password }}" apikey: "{{ lookup('file', grafana_api_keys_dir + '/grafana_apikey.key') }}" diff --git a/stop.yml b/stop.yml index 01e209d57..860ae7bdc 100644 --- a/stop.yml +++ b/stop.yml @@ -305,21 +305,3 @@ port: "{{ grafana_port }}" state: stopped msg: "the grafana port {{ grafana_port }} is not down" - - - name: stop grafana_collector by supervise - shell: cd {{ deploy_dir }}/scripts && ./stop_{{ item }}.sh - when: process_supervision == 'supervise' - with_items: - - grafana_collector - - - name: stop grafana_collector by systemd - systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=stopped - become: true - when: process_supervision == 'systemd' - - - name: wait until the grafana_collector port is down - wait_for: - host: "{{ ansible_host }}" - port: "{{ grafana_collector_port }}" - state: stopped - msg: "the grafana_collector port {{ grafana_collector_port }} is not down" diff --git a/unsafe_cleanup.yml b/unsafe_cleanup.yml index 9768bf31d..1a1f3d864 100644 --- a/unsafe_cleanup.yml +++ b/unsafe_cleanup.yml @@ -111,7 +111,6 @@ when: process_supervision == 'systemd' with_items: - grafana-{{ grafana_port }}.service - - grafana_collector-{{ grafana_collector_port }}.service - hosts: all tasks: From 244094fa267db16e3eae03bad84035592e5370e4 Mon Sep 17 00:00:00 2001 From: liubo0127 Date: Tue, 13 Aug 2019 17:44:22 +0800 Subject: [PATCH 2/2] Remove extra file --- scripts/grafana_pdf.py | 115 ----------------------------------------- 1 file changed, 115 deletions(-) delete mode 100755 scripts/grafana_pdf.py diff --git a/scripts/grafana_pdf.py b/scripts/grafana_pdf.py deleted file mode 100755 index 843e348ba..000000000 --- a/scripts/grafana_pdf.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function, \ - unicode_literals - -import argparse -import os -import time -import json -import tarfile -import shutil - -try: - # For Python 2 - import urllib2 as urlreq - from urllib2 import HTTPError, URLError -except ImportError: - # For Python 3 - import urllib.request as urlreq - from urllib.error import HTTPError, URLError - -dests = [] -download_dir = "grafana_pdf" - -if not dests: - with open("./dests.json") as fp: - dests = json.load(fp) - - -def make_tarfile(output_filename, source_dir): - with tarfile.open(output_filename, "w:gz") as tar: - tar.add(source_dir, arcname=os.path.basename(source_dir)) - - -def read_url(url): - try: - f = urlreq.urlopen(url) - return f.read() - except HTTPError as e: - print("HTTP Error: %s" % e.getcode()) - return e.read() - except URLError as e: - print("Reading URL %s error: %s" % (url, e)) - return None - - -def parse_opts(): - parser = argparse.ArgumentParser( - description="Export Grafana charts to PDF") - parser.add_argument("-t", "--time", action="store", default=None, - help="Relative time to now, supported format is like: 2h, 4h. If not set, assume 3h by default.") - parser.add_argument("--time-from", action="store", default=None, - help="Start timestamp of time range, format: '%%Y-%%m-%%d %%H:%%M:%%S'.") - parser.add_argument("--time-to", action="store", default=None, - help="End timestamp of time range, format: '%%Y-%%m-%%d %%H:%%M:%%S'.") - return parser.parse_args() - - -def parse_timestamp(time_string): - format_guess = [ - "%Y-%m-%d %H:%M:%S", - "%Y-%m-%d %H:%M", - "%Y-%m-%d %H", - "%Y-%m-%d", - "%m-%d", - "%H:%M:%S", - "%H:%M", - "%H" - ] - for time_format in format_guess: - try: - # Grafana API's timestamp is in ms - return time.mktime(time.strptime(time_string, time_format)) * 1000 - except ValueError: - pass - raise ValueError( - "time data '%s' does not match any supported format." % time_string) - - -if __name__ == '__main__': - args = parse_opts() - if not os.path.isdir(download_dir): - os.makedirs(download_dir) - - if args.time: - time_args = "&from=now-{0}&to=now".format(args.time) - elif args.time_from: - start_time = int(parse_timestamp(args.time_from)) - end_time = "now" - if args.time_to: - end_time = int(parse_timestamp(args.time_to)) - time_args = "&from={0}&to={1}".format(start_time, end_time) - else: - time_args = "&from=now-3h&to=now" - - for dest in dests: - report_url = dest['report_url'] - apikey = dest['apikey'] - - for dashboard in dest['titles']: - url = "{0}api/report/{1}?apitoken={2}{3}".format( - report_url, dest['titles'][dashboard].lower(), apikey, time_args) - filename = "{0}.pdf".format(dest['titles'][dashboard]) - - print("Downloading: ", filename) - data = read_url(url) - with open(os.path.join(download_dir, filename), "wb") as pdf: - pdf.write(data) - - tar_filename = "{0}.tar.gz".format(download_dir) - print("Compressing: ", tar_filename) - make_tarfile(tar_filename, download_dir) - - print("Clean up download directory") - shutil.rmtree(download_dir)