diff --git a/src/main/asciidoc/analytics/twitter-analytics/main.adoc b/src/main/asciidoc/analytics/twitter-analytics/main.adoc index 821b2e4..8ef0ff2 100644 --- a/src/main/asciidoc/analytics/twitter-analytics/main.adoc +++ b/src/main/asciidoc/analytics/twitter-analytics/main.adoc @@ -122,7 +122,7 @@ dataflow:>stream list . Notice that `tweetlang.counter`, `tagcount.counter`, `tweets.log` and `tweets.twitterstream` link:https://github.com/spring-cloud-stream-app-starters/[Spring Cloud Stream] applications are running as Spring Boot applications within the `local-server`. + . Go to `Grafana Dashboard` accessible at `http://localhost:3000`, login as `admin`:`admin`. -Import the https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow-samples/master/src/main/asciidoc/micrometer/prometheus/grafana-twitter-scdf-analytics.json[grafana-twitter-scdf-analytics.json] dashboard. +Import the https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow-samples/master/src/main/asciidoc/monitoring/grafana-twitter-scdf-analytics.json[grafana-twitter-scdf-analytics.json] dashboard. You will see a dashboard similar to this: image::twitter_analytics.png[Twitter Analytics Visualization, scaledwidth="50%"] diff --git a/src/main/asciidoc/monitoring/grafana-twitter-scdf-analytics.json b/src/main/asciidoc/monitoring/grafana-twitter-scdf-analytics.json new file mode 100644 index 0000000..d8f9919 --- /dev/null +++ b/src/main/asciidoc/monitoring/grafana-twitter-scdf-analytics.json @@ -0,0 +1,298 @@ +{ + "__inputs": [ + { + "name": "DS_SCDFPROMETHEUS", + "label": "ScdfPrometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "panel", + "id": "digrich-bubblechart-panel", + "name": "Bubble Chart", + "version": "1.1.0" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.3.3" + }, + { + "type": "panel", + "id": "grafana-piechart-panel", + "name": "Pie Chart", + "version": "1.3.9" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "links": [ + { + "icon": "external link", + "tags": [], + "type": "dashboards" + } + ], + "panels": [ + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_SCDFPROMETHEUS}", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 15, + "x": 0, + "y": 0 + }, + "id": 6, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sort_desc(topk(10, sum(language_total) by (lang)))", + "format": "time_series", + "instant": true, + "intervalFactor": 1, + "legendFormat": "{{lang}}", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Top 10 Lang", + "tooltip": { + "shared": false, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "series", + "name": null, + "show": true, + "values": [ + "current" + ] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "cacheTimeout": null, + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": "${DS_SCDFPROMETHEUS}", + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 22, + "w": 9, + "x": 15, + "y": 0 + }, + "id": 4, + "interval": null, + "legend": { + "show": true, + "values": true + }, + "legendType": "Under graph", + "links": [], + "maxDataPoints": 3, + "nullPointMode": "connected", + "options": {}, + "pieType": "donut", + "strokeWidth": 1, + "targets": [ + { + "expr": "sort_desc(topk(50, sum(hashtags_total) by (htag)))", + "format": "time_series", + "instant": true, + "intervalFactor": 1, + "legendFormat": "{{htag}}", + "refId": "A" + } + ], + "title": "Hastags", + "type": "grafana-piechart-panel", + "valueName": "current" + }, + { + "bgColor": null, + "colorScheme": "Unique", + "datasource": "${DS_SCDFPROMETHEUS}", + "decimal": 2, + "displayLabel": true, + "format": "short", + "gradientColors": [ + "red", + "green" + ], + "gradientThresholds": "50,80", + "gridPos": { + "h": 12, + "w": 15, + "x": 0, + "y": 10 + }, + "groupDepthColors": [ + "hsl(152,80%,80%)", + "hsl(228,30%,40%)" + ], + "groupSeperator": ",", + "height": 400, + "id": 2, + "links": [], + "mode": "time", + "nullPointMode": "connected", + "options": {}, + "svgBubbleId": "svg_2", + "svgContainer": {}, + "targets": [ + { + "expr": "sum(language_total) by (lang)", + "format": "time_series", + "instant": true, + "intervalFactor": 1, + "legendFormat": "{{lang}}", + "refId": "A" + } + ], + "thresholdColors": [ + "green", + "yellow", + "red" + ], + "thresholds": "50,80", + "title": "Languages", + "type": "digrich-bubblechart-panel", + "valueName": "current" + } + ], + "refresh": "5s", + "schemaVersion": 19, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "SCDF Analytics", + "uid": "vhHweSriz", + "version": 3 +}