From 61225124b95b0f8e024605e3919c53b126f4b915 Mon Sep 17 00:00:00 2001 From: Rafal Szypulka Date: Mon, 12 Mar 2018 10:59:52 +0100 Subject: [PATCH] update to version 0.8 --- ...ng on IBM Cloud Private-1520848617557.json | 603 ++++++++++++++++++ README.md | 11 +- 2 files changed, 612 insertions(+), 2 deletions(-) create mode 100644 Example_dashboards/Node.js Sample Application running on IBM Cloud Private-1520848617557.json diff --git a/Example_dashboards/Node.js Sample Application running on IBM Cloud Private-1520848617557.json b/Example_dashboards/Node.js Sample Application running on IBM Cloud Private-1520848617557.json new file mode 100644 index 0000000..8f0815b --- /dev/null +++ b/Example_dashboards/Node.js Sample Application running on IBM Cloud Private-1520848617557.json @@ -0,0 +1,603 @@ +{ + "__inputs": [ + { + "name": "DS_APM813", + "label": "APM813", + "description": "", + "type": "datasource", + "pluginId": "ibm-apm-datasource", + "pluginName": "IBM APM" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "5.0.1" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "5.0.0" + }, + { + "type": "datasource", + "id": "ibm-apm-datasource", + "name": "IBM APM", + "version": "0.7" + } + ], + "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, + "iteration": 1520848593574, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_APM813}", + "fill": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "RESP_TIME:nodejs-sample", + "bars": false, + "color": "#70dbed", + "fill": 2, + "yaxis": 2 + }, + { + "alias": "HIT_COUNT:nodejs-sample", + "color": "#508642", + "fill": 1, + "yaxis": 1 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "AgentInstance": "$AgentName", + "Attribute": "RESP_TIME", + "AttributeGroup": "MetricGroup.KBIHTTPREQ", + "PrimaryKey": "APPL_NAME", + "refId": "A", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + }, + { + "AgentInstance": "$AgentName", + "Attribute": "HIT_COUNT", + "AttributeGroup": "MetricGroup.KBIHTTPREQ", + "PrimaryKey": "APPL_NAME", + "refId": "B", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Thoughput and Response Time", + "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": "Requests per minute", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "ms", + "label": "Response Time", + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_APM813}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "AgentInstance": "$AgentName", + "Attribute": "CPU_P", + "AttributeGroup": "MetricGroup.KBIAPPINFO", + "PrimaryKey": "APPL_NAME", + "refId": "A", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "CPU Percentage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "percent", + "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_APM813}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "AgentInstance": "$AgentName", + "Attribute": "MEM_RSS", + "AttributeGroup": "MetricGroup.KBIAPPINFO", + "PrimaryKey": "APPL_NAME", + "alias": "Total Memory Allocated", + "refId": "A", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Total Memory Allocated (Resident Set Size)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decmbytes", + "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_APM813}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "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": [ + { + "AgentInstance": "BI:nodeapmibmnodejssampl59c9:BNJ", + "Attribute": "HEAPSIZE", + "AttributeGroup": "MetricGroup.KBINJGC", + "PrimaryKey": "APPL_NAME", + "alias": "Heap Size", + "refId": "A", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + }, + { + "AgentInstance": "$AgentName", + "Attribute": "HEAPUSED", + "AttributeGroup": "MetricGroup.KBINJGC", + "PrimaryKey": "APPL_NAME", + "alias": "Heap Used", + "refId": "B", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Heap Size vs Heap Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decmbytes", + "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_APM813}", + "fill": 1, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 5, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Maximum Latency:nodejs-sample", + "color": "#f29191" + }, + { + "alias": "Average Latency:nodejs-sample", + "fill": 3 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "AgentInstance": "$AgentName", + "Attribute": "LATENCYAVG", + "AttributeGroup": "MetricGroup.KBINJELOOP", + "PrimaryKey": "APPL_NAME", + "alias": "Average Latency", + "refId": "A", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + }, + { + "AgentInstance": "$AgentName", + "Attribute": "LATENCYMAX", + "AttributeGroup": "MetricGroup.KBINJELOOP", + "PrimaryKey": "APPL_NAME", + "alias": "Maximum Latency", + "refId": "B", + "target": "TMSAgent.%IBM.KBIBNJ", + "timeAttribute": "WRITETIME", + "timeRangeAttribute": "dashboard", + "valueAttribute": "displayValue" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Event Loop Latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "ms", + "label": "Latency", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "refresh": "1m", + "schemaVersion": 16, + "style": "dark", + "tags": [ + "APM8", + "ICP" + ], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_APM813}", + "hide": 0, + "includeAll": false, + "label": "Node.js application", + "multi": false, + "name": "AgentName", + "options": [], + "query": "TMSAgent.%IBM.KBIBNJ", + "refresh": 1, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "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": "Node.js Sample Application running on IBM Cloud Private", + "uid": "000000024", + "version": 8 +} \ No newline at end of file diff --git a/README.md b/README.md index 63548f7..3c84c00 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,16 @@ Author: Rafal Szypulka Contact: rafal.szypulka@pl.ibm.com -Revision: 0.7 +Revision: 0.8 **What's new:** +- 0.8 + - Added support for string metrics, thx [@lcollin](https://github.com/lcollin) + - Added example dashboard for Node.js application running in IBM Cloud Private. + - Simplified installation for Grafana 5. Plugin works correctly without any modifications in Grafana 5 backend. See updated installation instructions and datasource configuration for details. + - 0.7 - Fixed compatibility issue with Grafana 4.6 - More readible dropdown lists in panel query editor. @@ -233,7 +238,9 @@ c.) Install the plugin using the Grafana CLI: grafana-cli plugins install ibm-apm-datasource ``` -2). Plugin requires slight modification of the Grafana server backend to properly deallocate datasets on the APM or ITM server after every metric query. For Grafana 4.5 installed on Linux, replace **grafana-server** binary with the one downladed from here: +2). If you are using Grafana 5.x, skip this step - Grafana 5.x allows to define a whitelist of cookies that can pass the datasource proxy and IBM APM Grafana plugin utilize this feature to deallocate datasets on ITM or APM server. + +If you are using Grafana 4.x, phe plugin requires slight modification of the Grafana 4.x server backend to properly deallocate datasets on the APM or ITM server after every metric query. For Grafana 4.x installed on Linux, replace **grafana-server** binary with the one downladed from here: - [RHEL 7 / CentOS 7](https://ibm.box.com/s/6sflz4wyru71vh645h311oarygwnztxc) - [RHEL 6 / CentOS 6](https://ibm.box.com/s/356e0vsslso171qwmsoy2fylhjfhpxkk)