diff --git a/kubernetes/README.md b/kubernetes/README.md new file mode 100644 index 0000000..e69de29 diff --git a/kubernetes/configmap.yaml b/kubernetes/configmap.yaml new file mode 100644 index 0000000..a27aa33 --- /dev/null +++ b/kubernetes/configmap.yaml @@ -0,0 +1,133 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: monitoring + name: network-dashboard-provisioner +data: + networking.yaml: |- + apiVersion: 1 + + providers: + - name: 'ISP-Checker' + orgId: 1 + folder: '' + type: file + disableDeletion: true + editable: false + options: + path: /tmp/dashboard/network-dashboard.json + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: monitoring + name: telegraf-config +data: + telegraf.conf: |+ + [global_tags] + [agent] + interval = "10s" + round_interval = true + metric_batch_size = 1000 + metric_buffer_limit = 10000 + collection_jitter = "0s" + flush_interval = "10s" + flush_jitter = "0s" + precision = "" + hostname = "" + omit_hostname = false + debug = false + + [[outputs.influxdb]] + urls = ["http://influxdb:8086"] + database = "$INFLUXDB_DB" + timeout = "60s" + username = "$INFLUXDB_ADMIN_USER" + password = "$INFLUXDB_ADMIN_PASSWORD" + user_agent = "telegraf" + skip_database_creation = false + + [[inputs.cpu]] + percpu = true + totalcpu = true + collect_cpu_time = false + report_active = false + + [[inputs.disk]] + ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] + + [[inputs.diskio]] + + [[inputs.kernel]] + + [[inputs.mem]] + + [[inputs.processes]] + + [[inputs.swap]] + + [[inputs.system]] + + [[inputs.dns_query]] + servers = ["4.2.2.1", "8.8.8.8"] + domains = ["www.google.com", "www.twitter.com", "www.amazon.com", "www.wikipedia.org"] + record_type = "A" + port = 53 + timeout = 3 + + [[inputs.http_response]] + urls = [ + "http://www.google.com", + "http://www.twitter.com", + "http://www.amazon.com", + "http://www.yahoo.com" + ] + response_timeout = "5s" + method = "GET" + follow_redirects = true + + [[inputs.internal]] + collect_memstats = true + + [[inputs.linux_sysctl_fs]] + + [[inputs.net]] + + [[inputs.netstat]] + + [[inputs.ping]] + urls = [ + "google.com", + "twitter.com", + "amazon.com", + "yahoo.com" + ] + method = "exec" + count = 1 + ping_interval = 1.0 + timeout = 5.0 + deadline = 10 + binary = "ping" + ipv6 = false + + [[inputs.exec]] + commands=["mtr -C google.com s3-website.ap-northeast-2.amazonaws.com s3-website.eu-central-1.amazonaws.com s3-website.af-south-1.amazonaws.com"] + timeout = "3m" + interval = "7m" + data_format = "csv" + csv_skip_rows = 1 + csv_column_names=[ "", "", "status","dest","hop","ip","loss","snt","", "","avg","best","worst","stdev"] + name_override = "mtr" + csv_tag_columns = ["dest", "hop", "ip"] + + [[inputs.exec]] + commands = ["/usr/bin/speedtest-cli --csv --bytes"] + name_override = "speedtest" + timeout = "3m" + interval = "15m" + data_format = "csv" + csv_column_names = ['Server ID','Sponsor','Server Name','Timestamp','Distance','Ping','Download','Upload','Share','IP Address'] + csv_timestamp_column = "Timestamp" + csv_timestamp_format = "2006-01-02T15:04:05Z07:00" diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml new file mode 100644 index 0000000..3468989 --- /dev/null +++ b/kubernetes/deployment.yaml @@ -0,0 +1,161 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: monitoring + name: influxdb + labels: + app: influxdb +spec: + replicas: 1 + selector: + matchLabels: + app: influxdb + template: + metadata: + labels: + app: influxdb + spec: + containers: + - name: influxdb + image: influxdb:1.8.3 + imagePullPolicy: IfNotPresent + envFrom: + - secretRef: + name: isp-checker-secrets + ports: + - containerPort: 8086 + readinessProbe: + httpGet: + path: /ping + port: 8086 + volumeMounts: + - mountPath: /var/lib/influxdb + name: var-lib-influxdb + resources: + requests: + memory: "512Mi" + cpu: "250m" + limits: + memory: "1024Mi" + cpu: "500m" + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 + volumes: + - name: var-lib-influxdb + persistentVolumeClaim: + claimName: influxdb-pvc + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: monitoring + name: grafana + labels: + app: grafana +spec: + replicas: 1 + progressDeadlineSeconds: 600 + selector: + matchLabels: + app: grafana + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: grafana + spec: + containers: + - name: grafana + image: grafana/grafana:7.2.1 + imagePullPolicy: IfNotPresent + envFrom: + - secretRef: + name: isp-checker-secrets + volumeMounts: + - name: grafana-datasource-provisioner + mountPath: /etc/grafana/provisioning/datasources/datasource.yaml + subPath: datasource.yaml + readOnly: true + - name: grafana-dashboard-provisioner + mountPath: /etc/grafana/provisioning/dashboards/networking.yaml + subPath: networking.yaml + readOnly: true + - name: grafana-dashboard-data + mountPath: /tmp/dashboard/network-dashboard.json + subPath: network-dashboard.json + ports: + - containerPort: 3000 + env: + - name: GF_INSTALL_PLUGINS + value: https://grafana.com/api/plugins/gowee-traceroutemap-panel/versions/0.2.3/download;gowee-traceroutemap-panel + readinessProbe: + httpGet: + path: / + port: 3000 + resources: + requests: + memory: "512Mi" + cpu: "250m" + limits: + memory: "1024Mi" + cpu: "500m" + volumes: + - name: grafana-datasource-provisioner + secret: + secretName: grafana-datasource + - name: grafana-dashboard-provisioner + configMap: + name: network-dashboard-provisioner + - name: grafana-dashboard-data + configMap: + name: network-dashboard-data +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: monitoring + name: telegraf + labels: + app: telegraf +spec: + replicas: 1 + selector: + matchLabels: + app: telegraf + template: + metadata: + labels: + app: telegraf + spec: + containers: + - name: telegraf + image: tty0/isp_telegraf:1.15.3 + envFrom: + - secretRef: + name: isp-checker-secrets + imagePullPolicy: IfNotPresent + volumeMounts: + - name: telegraf-config-volume + mountPath: /etc/telegraf/telegraf.conf + subPath: telegraf.conf + readOnly: true + resources: + requests: + memory: "512Mi" + cpu: "250m" + limits: + memory: "1024Mi" + cpu: "500m" + volumes: + - name: telegraf-config-volume + configMap: + name: telegraf-config diff --git a/kubernetes/namespace.yaml b/kubernetes/namespace.yaml new file mode 100644 index 0000000..d325236 --- /dev/null +++ b/kubernetes/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: monitoring diff --git a/kubernetes/network-dashboard.yaml b/kubernetes/network-dashboard.yaml new file mode 100644 index 0000000..16d6556 --- /dev/null +++ b/kubernetes/network-dashboard.yaml @@ -0,0 +1,2985 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: monitoring + name: network-dashboard-data +data: + network-dashboard.json: |- + { + "__inputs": [ + { + "name": "InfluxDB", + "label": "InfluxDB", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "panel", + "id": "gowee-traceroutemap-panel", + "name": "Traceroute Map Panel", + "version": "0.2.3" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "7.2.1" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "panel", + "id": "heatmap", + "name": "Heatmap", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Network latencies and availability", + "editable": true, + "gnetId": 13140, + "graphTooltip": 0, + "id": null, + "iteration": 1602558532070, + "links": [], + "panels": [ + { + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "super-light-green", + "value": 0 + }, + { + "color": "light-green", + "value": 10 + }, + { + "color": "semi-dark-green", + "value": 20 + }, + { + "color": "semi-dark-green", + "value": 30 + }, + { + "color": "super-light-orange", + "value": 40 + }, + { + "color": "light-orange", + "value": 50 + }, + { + "color": "semi-dark-orange", + "value": 60 + }, + { + "color": "light-red", + "value": 70 + }, + { + "color": "semi-dark-red", + "value": 80 + }, + { + "color": "dark-red", + "value": 90 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 26, + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "previous" + ], + "type": "fill" + } + ], + "measurement": "speedtest", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Ping" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Speedtest (Ping)", + "type": "gauge" + }, + { + "datasource": "InfluxDB", + "description": "Download bandwidth", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "light-red", + "value": 5 + }, + { + "color": "dark-orange", + "value": 10 + }, + { + "color": "super-light-orange", + "value": 20 + }, + { + "color": "super-light-green", + "value": 30 + }, + { + "color": "light-green", + "value": 40 + }, + { + "color": "semi-dark-green", + "value": 50 + } + ] + }, + "unit": "Mbits" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 5, + "x": 6, + "y": 0 + }, + "id": 20, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "speedtest", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Download" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Bandwidth (Download)", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "description": "", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 2, + "gridPos": { + "h": 11, + "w": 13, + "x": 11, + "y": 0 + }, + "hiddenSeries": false, + "id": 24, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "Download", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "previous" + ], + "type": "fill" + } + ], + "measurement": "speedtest", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Download" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + " / 1000000" + ], + "type": "math" + } + ] + ], + "tags": [] + }, + { + "alias": "Upload", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "previous" + ], + "type": "fill" + } + ], + "measurement": "speedtest", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Upload" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + " / 1000000" + ], + "type": "math" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Speedtest TX/RX", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:401", + "format": "Mbits", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:402", + "decimals": 2, + "format": "MBs", + "label": "Download (MB/s)", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "InfluxDB", + "description": "Uptime bandwidth", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "red", + "value": 0.5 + }, + { + "color": "dark-orange", + "value": 1 + }, + { + "color": "light-yellow", + "value": 2 + }, + { + "color": "super-light-green", + "value": 3 + }, + { + "color": "light-green", + "value": 4 + }, + { + "color": "semi-dark-green", + "value": 5 + }, + { + "color": "dark-green", + "value": 6 + } + ] + }, + "unit": "Mbits" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 6, + "y": 6 + }, + "id": 22, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "speedtest", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "Upload" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Bandwidth (Upload)", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "description": "ICMP echo requests average latency.", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 2, + "gridPos": { + "h": 11, + "w": 18, + "x": 0, + "y": 11 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sideWidth": null, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_url", + "groupBy": [ + { + "params": [ + "url" + ], + "type": "tag" + } + ], + "measurement": "ping", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "average_response_ms" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$PingURL$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [ + { + "$$hashKey": "object:150", + "colorMode": "background6", + "fill": true, + "fillColor": "rgba(234, 112, 112, 0.12)", + "line": false, + "lineColor": "rgba(237, 46, 24, 0.60)", + "op": "time" + } + ], + "timeShift": null, + "title": "ICMP average response", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:100", + "format": "short", + "label": "average (ms)", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:101", + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "InfluxDB", + "description": "Average response time for External Ping in ms.", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "max": 1000, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "super-light-green", + "value": null + }, + { + "color": "light-green", + "value": 10 + }, + { + "color": "semi-dark-green", + "value": 20 + }, + { + "color": "dark-green", + "value": 30 + }, + { + "color": "super-light-orange", + "value": 40 + }, + { + "color": "light-orange", + "value": 50 + }, + { + "color": "semi-dark-orange", + "value": 70 + }, + { + "color": "dark-orange", + "value": 80 + }, + { + "color": "light-red", + "value": 90 + }, + { + "color": "dark-red", + "value": 100 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 6, + "x": 18, + "y": 11 + }, + "id": 4, + "options": { + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^ping\\.average_response_ms$/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "groupBy": [], + "hide": false, + "limit": "", + "measurement": "ping", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"average_response_ms\" FROM \"ping\" ", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "average_response_ms" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$PingURL$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Ping AVG response time", + "type": "gauge" + }, + { + "datasource": "InfluxDB", + "description": "DNS resolution average query time", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "max": 500, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "super-light-yellow", + "value": 200 + }, + { + "color": "semi-dark-orange", + "value": 300 + }, + { + "color": "dark-red", + "value": 400 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 11, + "x": 0, + "y": 22 + }, + "id": 6, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showUnfilled": true + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "alias": "$tag_domain", + "groupBy": [ + { + "params": [ + "domain" + ], + "type": "tag" + } + ], + "measurement": "dns_query", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "query_time_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "DNS AVG Query time", + "type": "bargauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "description": "Percentage of package lost ", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "percent" + }, + "overrides": [] + }, + "fill": 3, + "fillGradient": 2, + "gridPos": { + "h": 9, + "w": 13, + "x": 11, + "y": 22 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:405" + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "measurement": "ping", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "percent_packet_loss" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "$$hashKey": "object:387", + "colorMode": "critical", + "fill": false, + "line": true, + "op": "gt", + "value": 25, + "yaxis": "left" + }, + { + "$$hashKey": "object:393", + "colorMode": "warning", + "fill": false, + "line": true, + "op": "gt", + "value": 2, + "yaxis": "left" + }, + { + "$$hashKey": "object:399", + "colorMode": "ok", + "fill": true, + "line": false, + "op": "lt", + "value": 2, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ICMP Packet loss (%)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:416", + "format": "percent", + "label": "Packet lost %", + "logBase": 1, + "max": "100", + "min": "0", + "show": true + }, + { + "$$hashKey": "object:417", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 31 + }, + "hiddenSeries": false, + "id": 87, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "HTTP", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "measurement": "http_response", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "response_time" + ], + "type": "field" + }, + { + "params": [], + "type": "stddev" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$NetHost$/" + } + ] + }, + { + "alias": "ICMP", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "ping", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "standard_deviation_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$NetHost$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Jitter (ICMP/HTTP)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2579", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:2580", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": "InfluxDB", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 34, + "panels": [], + "title": "Connectivity metrics", + "type": "row" + }, + { + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 2, + "mappings": [], + "min": 0, + "noValue": "N/A", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "super-light-green", + "value": null + }, + { + "color": "semi-dark-green", + "value": 150 + }, + { + "color": "dark-green", + "value": 200 + }, + { + "color": "#EAB839", + "value": 250 + }, + { + "color": "semi-dark-orange", + "value": 300 + }, + { + "color": "dark-red", + "value": 350 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 41 + }, + "id": 42, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.2.1", + "repeat": "PingURL", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"average_response_ms\") FROM \"ping\" WHERE (\"url\" =~ /^$PingURL$/) AND $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$PingURL Ping", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "description": "HTTP GET request response time (ms)", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 47 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_server", + "groupBy": [ + { + "params": [ + "server" + ], + "type": "tag" + } + ], + "measurement": "http_response", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "response_time" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "method", + "operator": "=", + "value": "GET" + } + ] + } + ], + "thresholds": [ + { + "$$hashKey": "object:1216", + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 10, + "yaxis": "left" + }, + { + "$$hashKey": "object:1222", + "colorMode": "warning", + "fill": false, + "line": false, + "op": "gt", + "value": 5, + "yaxis": "left" + }, + { + "$$hashKey": "object:1228", + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 2, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "HTTP GET response time (ms)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:1019", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:1020", + "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": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "gridPos": { + "h": 18, + "w": 12, + "x": 0, + "y": 57 + }, + "hiddenSeries": false, + "id": 85, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "$col", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "netstat", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT mean(\"tcp_close\") AS \"tcp_close\", mean(\"tcp_close_wait\") AS \"tcp_close_wait\", mean(\"tcp_closing\") AS \"tcp_colsing\", mean(\"tcp_fin_wait1\") AS \"tcp_fin_wait1\", mean(\"tcp_fin_wait2\") AS \"tcp_fin_wait2\", mean(\"tcp_last_ack\") AS \"tcp_last_ack\", mean(\"tcp_syn_recv\") AS \"tcp_syn_recv\", mean(\"tcp_syn_sent\") AS \"tcp_syn_sent\", mean(\"tcp_listen\") AS \"tcp_listen\", mean(\"tcp_time_wait\") AS \"tcp_time_wait\", mean(\"udp_socket\") AS \"udp_socket\", mean(\"tcp_established\") AS \"tcp_established\" FROM \"netstat\" WHERE (\"host\" =~ /^$NetHost$/) AND $timeFilter GROUP BY time($interval) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tcp_close" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + }, + { + "params": [ + "tcp_close" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$NetHost$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Netstat", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2208", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:2209", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 18, + "w": 12, + "x": 12, + "y": 57 + }, + "hiddenSeries": false, + "id": 16, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": false + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tx (Bytes)", + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "bytes_sent" + ], + "type": "field" + }, + { + "params": [], + "type": "integral" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + }, + { + "alias": "Rx (Bytes)", + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "bytes_recv" + ], + "type": "field" + }, + { + "params": [], + "type": "integral" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + }, + { + "alias": "Drop In", + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drop_in" + ], + "type": "field" + }, + { + "params": [], + "type": "integral" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + }, + { + "alias": "Drop Out", + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "drop_out" + ], + "type": "field" + }, + { + "params": [], + "type": "integral" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + }, + { + "alias": "Error In", + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "E", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "err_in" + ], + "type": "field" + }, + { + "params": [], + "type": "integral" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + }, + { + "alias": "Error Out", + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "F", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "err_out" + ], + "type": "field" + }, + { + "params": [], + "type": "integral" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + } + ], + "thresholds": [ + { + "$$hashKey": "object:1747", + "colorMode": "warning", + "fill": true, + "line": true, + "op": "lt", + "value": 0, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Interface: $NetInterface (Tx/Rx)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": [ + "total" + ] + }, + "yaxes": [ + { + "$$hashKey": "object:1468", + "format": "bytes", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:1469", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": true, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": 1, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateInferno", + "exponent": 0.5, + "max": null, + "min": null, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": "InfluxDB", + "description": "Standard Deviation (ms) heatmap", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 75 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 10, + "legend": { + "show": true + }, + "pluginVersion": "7.2.0", + "reverseYBuckets": false, + "targets": [ + { + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + } + ], + "measurement": "ping", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "standard_deviation_ms" + ], + "type": "field" + }, + { + "params": [], + "type": "stddev" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$PingURL$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Ping Standard Deviation (ms)", + "tooltip": { + "show": true, + "showHistogram": true + }, + "tooltipDecimals": 3, + "transparent": true, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": "10s", + "yAxis": { + "decimals": null, + "format": "ms", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "max": 500, + "min": 100, + "noValue": "N/A", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "super-light-blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + }, + { + "id": "custom.displayMode", + "value": "color-text" + }, + { + "id": "unit", + "value": "dateTimeAsLocal" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "server" + }, + "properties": [ + { + "id": "custom.width", + "value": 300 + }, + { + "id": "mappings", + "value": [] + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "last" + }, + "properties": [ + { + "id": "custom.width", + "value": 145 + }, + { + "id": "displayName", + "value": "Response code" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "light-red", + "value": null + }, + { + "color": "light-green", + "value": 100 + }, + { + "color": "light-green", + "value": 200 + }, + { + "color": "semi-dark-green", + "value": 300 + }, + { + "color": "super-light-yellow", + "value": 400 + }, + { + "color": "super-light-red", + "value": 500 + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Response code" + }, + "properties": [ + { + "id": "custom.width", + "value": 145 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "method" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Endpoint" + }, + "properties": [ + { + "id": "custom.width", + "value": 514 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "HTTP Method" + }, + "properties": [ + { + "id": "custom.width", + "value": 333 + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 75 + }, + "id": 14, + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "7.2.1", + "repeat": null, + "repeatDirection": "h", + "targets": [ + { + "alias": "$tag_server", + "groupBy": [ + { + "params": [ + "server" + ], + "type": "tag" + }, + { + "params": [ + "method" + ], + "type": "tag" + } + ], + "measurement": "http_response", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "http_response_code" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "HTTP response codes", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "indexByName": { + "Time": 0, + "last": 3, + "method": 2, + "server": 1 + }, + "renameByName": { + "last": "Response code", + "method": "HTTP Method", + "server": "Endpoint" + } + } + } + ], + "transparent": true, + "type": "table" + }, + { + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 81 + }, + "id": 18, + "options": { + "geoIPProviders": { + "active": "ipsb", + "custom-api": { + "kind": "custom-api" + }, + "custom-function": { + "kind": "custom-function" + }, + "ipinfo": { + "kind": "ipinfo" + }, + "ipsb": { + "kind": "ipsb" + } + }, + "hostnameLabelWidth": 8, + "longitude360": false, + "mapClusterRadius": 15, + "simplifyHostname": false + }, + "pluginVersion": "7.2.0", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "select mean(avg) as rtt, mean(loss) as loss from mtr WHERE now() - 5m < time group by hop, ip, host, dest\n", + "rawQuery": true, + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TraceRoute", + "type": "gowee-traceroutemap-panel" + }, + { + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 3, + "mappings": [], + "min": 0, + "noValue": "N/A", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(238, 238, 238)", + "value": null + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 87 + }, + "id": 65, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "bytes_recv" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + }, + { + "params": [ + "MiB Sent" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "MiB Received ($NetInterface)", + "type": "stat" + }, + { + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 3, + "mappings": [], + "min": 0, + "noValue": "N/A", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + } + ] + }, + "unit": "decmbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 6, + "y": 87 + }, + "id": 56, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "groupBy": [ + { + "params": [ + "5m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "net", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "bytes_sent" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "/1048576" + ], + "type": "math" + }, + { + "params": [ + "MiB Sent" + ], + "type": "alias" + } + ] + ], + "tags": [ + { + "key": "interface", + "operator": "=~", + "value": "/^$NetInterface$/" + } + ] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "MiB Sent ($NetInterface)", + "type": "stat" + }, + { + "collapsed": false, + "datasource": "InfluxDB", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 93 + }, + "id": 32, + "panels": [], + "title": "Availability metrics", + "type": "row" + }, + { + "datasource": "InfluxDB", + "fieldConfig": { + "defaults": { + "custom": {}, + "decimals": 4, + "mappings": [ + { + "from": "", + "id": 0, + "text": "N/A", + "to": "", + "type": 1, + "value": "null" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "semi-dark-orange", + "value": 95 + }, + { + "color": "semi-dark-green", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 94 + }, + "id": 36, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.2.1", + "repeat": "PingURL", + "targets": [ + { + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT 100 - mean(\"percent_packet_loss\") FROM \"ping\" WHERE \"url\" =~ /^$PingURL$/ AND $timeFilter GROUP BY time(1m) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$PingURL Ping", + "type": "stat" + } + ], + "refresh": "5s", + "schemaVersion": 26, + "style": "dark", + "tags": [ + "networking", + "monitoring", + "telegraf", + "influxdb", + "isp", + "raspberry" + ], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "InfluxDB", + "definition": "", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "PingURL", + "options": [], + "query": "SHOW TAG VALUES FROM \"ping\" WITH KEY = \"url\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "InfluxDB", + "definition": "", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "NetInterface", + "options": [], + "query": "SHOW TAG VALUES FROM \"net\" WITH KEY = \"interface\" WHERE \"host\" =~ /$NetHost/", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "InfluxDB", + "definition": "", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "NetHost", + "options": [], + "query": "SHOW TAG VALUES FROM \"net\" WITH KEY = \"host\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Network", + "uid": "Is1f1nRgz", + "version": 2 + } diff --git a/kubernetes/pvc.yaml b/kubernetes/pvc.yaml new file mode 100644 index 0000000..3174def --- /dev/null +++ b/kubernetes/pvc.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + namespace: monitoring + labels: + app: influxdb + name: influxdb-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/kubernetes/secrets.yaml b/kubernetes/secrets.yaml new file mode 100644 index 0000000..e55991b --- /dev/null +++ b/kubernetes/secrets.yaml @@ -0,0 +1,32 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + namespace: monitoring + name: isp-checker-secrets +type: Opaque +stringData: + INFLUXDB_DB: telegraf + INFLUXDB_ADMIN_USER: admin + INFLUXDB_ADMIN_PASSWORD: VerySecurePassword + INFLUXDB_READ_USER: grafana + INFLUXDB_READ_PASSWORD: VerySecurePassword + +--- +apiVersion: v1 +kind: Secret +metadata: + namespace: monitoring + name: grafana-datasource +stringData: + datasource.yaml: |- + datasources: + - name: InfluxDB + type: influxdb + access: proxy + orgId: 1 + url: http://influxdb:8086 + user: grafana + database: telegraf + isDefault: true + editable: true