Now I'm collecting some metrics on the dashboard, I had to set the datasource as default
Original Message:
Sent: 10-13-2021 04:11 AM
From: Steve B
Subject: Anyone use grafana?
Can you get to your uimapi url via a browser?
I've got ours set to https://uimhost/uimapi but we have it listening on 443 and have a valid certificate. You might need to drop back to http:// if you dont have it setup properly
Original Message:
Sent: 10-13-2021 03:51 AM
From: Paulo Pires
Subject: Anyone use grafana?
Hi @Steve B,
Thanks for sharing. Check the image :(
The accept header value is this: application/json
???
Original Message:
Sent: 10-12-2021 05:38 PM
From: Steve B
Subject: Anyone use grafana?
Hi @Paulo Pires,
The first thing to check is the Data Source. This is what mine looks like:
The accept header has this: application/json
Then try importing:
{ "__inputs": [ { "name": "DS_UIM", "label": "UIM", "description": "", "type": "datasource", "pluginId": "marcusolsson-json-datasource", "pluginName": "JSON API" } ], "__requires": [ { "type": "panel", "id": "bargauge", "name": "Bar gauge", "version": "" }, { "type": "panel", "id": "gauge", "name": "Gauge", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "8.2.1" }, { "type": "datasource", "id": "marcusolsson-json-datasource", "name": "JSON API", "version": "1.3.0" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "version": "" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "gnetId": null, "graphTooltip": 0, "id": null, "iteration": 1634074558221, "links": [], "liveNow": false, "panels": [ { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "displayMode": "auto" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "IP Address" }, "properties": [ { "id": "custom.width", "value": null } ] } ] }, "gridPos": { "h": 3, "w": 24, "x": 0, "y": 0 }, "id": 7, "options": { "showHeader": true, "sortBy": [] }, "pluginVersion": "8.2.1", "targets": [ { "cacheDurationSeconds": 0, "fields": [ { "jsonPath": "$.[*].robot", "name": "Hostname" }, { "jsonPath": "$.[*].ip", "name": "IP Address" }, { "jsonPath": "$.[*].osMinor", "name": "Operating System" }, { "jsonPath": "$.[*].userTag1", "name": "User Tag 1" }, { "jsonPath": "$.[*].userTag2", "name": "User Tag 2" }, { "jsonPath": "$.[*].origin", "name": "Origin" } ], "headers": [], "method": "GET", "params": [ [ "devid", "$host" ] ], "queryParams": "", "refId": "A", "urlPath": "/robots" } ], "timeFrom": null, "timeShift": null, "title": "Host Details", "type": "table" }, { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 2, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 5, "w": 4, "x": 0, "y": 3 }, "id": 5, "options": { "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true, "text": {} }, "pluginVersion": "8.2.1", "targets": [ { "cacheDurationSeconds": 0, "fields": [ { "jsonPath": "$.[*].sample[0].value", "name": "CPU Utilisation %", "type": "number" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "1.5:1" ], [ "metric_type_lookup", "by_metric_type" ], [ "period", "latest" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "CPU Utilisation %", "type": "gauge" }, { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 5, "w": 4, "x": 4, "y": 3 }, "id": 6, "options": { "orientation": "auto", "reduceOptions": { "calcs": [], "fields": "", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true, "text": {} }, "pluginVersion": "8.2.1", "targets": [ { "cacheDurationSeconds": 0, "fields": [ { "jsonPath": "$.[*].sample[0].value", "name": "Memory Usage", "type": "number" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "QOS_MEMORY_PHYSICAL_PERC" ], [ "metric_type_lookup", "by_metric_name" ], [ "period", "latest" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "Memory Utilisation %", "type": "gauge" }, { "datasource": "-- Mixed --", "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "decmbytes" }, "overrides": [] }, "gridPos": { "h": 5, "w": 4, "x": 8, "y": 3 }, "id": 11, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [], "fields": "/.*/", "values": false }, "text": {}, "textMode": "auto" }, "pluginVersion": "8.2.1", "targets": [ { "cacheDurationSeconds": 0, "datasource": "${DS_UIM}", "fields": [ { "jsonPath": "$.[*].sample[0].value", "name": "Memory Usage", "type": "number" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "QOS_MEMORY_PHYSICAL" ], [ "metric_type_lookup", "by_metric_name" ], [ "period", "latest" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "Memory Utilisation", "transformations": [], "type": "stat" }, { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 2, "displayName": "$__cell_1", "mappings": [], "max": 100, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 90 }, { "color": "red", "value": 98 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 5, "w": 12, "x": 12, "y": 3 }, "id": 4, "options": { "displayMode": "lcd", "orientation": "horizontal", "reduceOptions": { "calcs": [], "fields": "", "values": true }, "showUnfilled": true, "text": {} }, "pluginVersion": "8.2.1", "targets": [ { "cacheDurationSeconds": 0, "fields": [ { "jsonPath": "$.[*].sample[?(@property == 0 && @.value != null)].value", "name": "", "type": "number" }, { "jsonPath": "$.[*].sample[?(@property == 0 && @.value != null)].value^^^^.target", "name": "Disk Utilisation %", "type": "string" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "QOS_DISK_USAGE_PERC" ], [ "metric_type_lookup", "by_metric_name" ], [ "period", "latest" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "Disk Utilisation %", "transformations": [ { "id": "sortBy", "options": { "fields": {}, "sort": [ { "desc": true, "field": "value" } ] } }, { "id": "filterByValue", "options": { "filters": [ { "config": { "id": "equal", "options": { "value": 0 } }, "fieldName": "value" } ], "match": "any", "type": "exclude" } } ], "type": "bargauge" }, { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds", "seriesBy": "last" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "scheme", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "area" } }, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 8 }, "id": 2, "options": { "legend": { "calcs": [], "displayMode": "hidden", "placement": "bottom" }, "tooltip": { "mode": "single" } }, "pluginVersion": "8.1.2", "targets": [ { "cacheDurationSeconds": 0, "fields": [ { "jsonPath": "$.*[sample].[value]", "name": "CPU Utilisation %", "type": "number" }, { "jsonPath": "$.*[sample].[time]", "name": "", "type": "time" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "QOS_CPU_USAGE" ], [ "metric_type_lookup", "by_metric_name" ], [ "period", "${__from:date:iso}|${__to:date:iso}" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "CPU Utilisation History", "type": "timeseries" }, { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "scheme", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "area" } }, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 8 }, "id": 3, "options": { "legend": { "calcs": [], "displayMode": "hidden", "placement": "bottom" }, "tooltip": { "mode": "single" } }, "pluginVersion": "8.1.2", "targets": [ { "cacheDurationSeconds": 0, "fields": [ { "jsonPath": "$.*[sample].[value]", "name": "Memory Utilisation %" }, { "jsonPath": "$.*[sample].[time]", "name": "", "type": "time" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "QOS_MEMORY_PHYSICAL_PERC" ], [ "metric_type_lookup", "by_metric_name" ], [ "period", "${__from:date:iso}|${__to:date:iso}" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "Memory Utilisation History", "type": "timeseries" }, { "collapsed": true, "datasource": null, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 17 }, "id": 15, "panels": [ { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic", "seriesBy": "last" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineStyle": { "fill": "solid" }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "area" } }, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 12, "w": 12, "x": 0, "y": 18 }, "id": 10, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single" } }, "pluginVersion": "8.1.2", "targets": [ { "cacheDurationSeconds": 0, "experimentalGroupByField": "name", "fields": [ { "jsonPath": "$.[*].sample[*].value", "name": " ", "type": "number" }, { "jsonPath": "$.[*].sample[*].time", "language": "jsonpath", "name": "", "type": "time" }, { "jsonPath": "$.[*].sample[*].value^^^^.for_configuration_item.name", "language": "jsonpath", "name": "" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "QOS_CPU_MULTI_USAGE" ], [ "metric_type_lookup", "by_metric_name" ], [ "period", "${__from:date:iso}|${__to:date:iso}" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "CPU Core Utilisation History", "transformations": [], "type": "timeseries" }, { "datasource": null, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "area" } }, "decimals": 2, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 90 }, { "color": "red", "value": 98 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 12, "w": 12, "x": 12, "y": 18 }, "id": 16, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "single" } }, "pluginVersion": "8.1.3", "targets": [ { "cacheDurationSeconds": 0, "experimentalGroupByField": "Disk Utilisation %", "fields": [ { "jsonPath": "$.[*].sample[?(@.value != null)].value", "name": " ", "type": "number" }, { "jsonPath": "$.[*].sample[?(@.value != null)].value^^^^.target", "name": "Disk Utilisation %", "type": "string" }, { "jsonPath": "$.[*].sample[?(@.value != null)].time", "language": "jsonpath", "name": "", "type": "time" } ], "headers": [], "method": "GET", "params": [ [ "id", "$host" ], [ "id_lookup", "by_device_id" ], [ "metricFilter", "QOS_DISK_USAGE_PERC" ], [ "metric_type_lookup", "by_metric_name" ], [ "period", "${__from:date:iso}|${__to:date:iso}" ], [ "showSamples", "true" ] ], "queryParams": "", "refId": "A", "urlPath": "/metrics" } ], "timeFrom": null, "timeShift": null, "title": "Disk Utilisation History", "transformations": [], "type": "timeseries" } ], "title": "Detailed History", "type": "row" } ], "refresh": "5m", "schemaVersion": 31, "style": "dark", "tags": [], "templating": { "list": [ { "allValue": null, "current": {}, "datasource": "${DS_UIM}", "definition": "$.[*].devId", "description": null, "error": null, "hide": 0, "includeAll": false, "label": "Host", "multi": false, "name": "host", "options": [], "query": { "cacheDurationSeconds": 0, "experimentalVariableTextField": "robot", "experimentalVariableValueField": "devId", "fields": [ { "jsonPath": "$.[*].devId", "name": "devId", "type": "string" }, { "jsonPath": "$.[*].robot", "name": "robot", "type": "string" } ], "method": "GET", "queryParams": "", "urlPath": "/robots" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": { "refresh_intervals": [ "5m", "15m", "30m", "1h", "2h", "1d" ] }, "timezone": "", "title": "Host Details v1", "uid": "BKCzKx4nk", "version": 63}
Original Message:
Sent: 10-10-2021 12:32 PM
From: Paulo Pires
Subject: Anyone use grafana?
Dear Steve B
Thanks for sharing this lovely "host metrics" dashboard.
Can you share how you did it? Or is there a way to share your dashboard?
I'm trying to do as Guillaume Briere says, but always with "No data"
Original Message:
Sent: 08-31-2021 11:31 PM
From: Steve B
Subject: Anyone use grafana?
Hi Guillaume,
Happy to share what I've come up with over the past couple of days!
First step was to create a "host metrics" dashboard to get my head around grafana, variables and the UIM API. That was simple enough:
After I was comfortable, I started working on a SQL metrics dashboard (still a work in progress):
Thanks again for your help with it all! The info you provided had all the details required to get anyone started.
Cheers
Original Message:
Sent: 08-31-2021 09:32 AM
From: Guillaume Briere
Subject: Anyone use grafana?
Hey Steve!
Do you want to share your progress?
If you use this as a params
With a variable like this one as the source
And another one that extract the target you can create a generic panel for a probe.
I did this for net_connect and url_resonse
You can create a generic panel for a specific probe.
Original Message:
Sent: 08-23-2021 04:18 PM
From: Guillaume Briere
Subject: Anyone use grafana?
Hello all!
I don't know about you but in our case, the robot cabi dashboard is really slow and painful to load. The "metric" view loads faster but the filter on target acts weird.
So we've decide to use grafana instead. Is there any of you that use grafana? I attached dashboard that we use maybe we could share ideas.
You can also select from the list the probe to show the probe config inside a table.
What do you think?
Thanks