Dashboard for Domotz

Hi Grafana community, I would be interested to know if anyone has had any luck getting a Grafana and Domotz dashboard setup to monitor Network devices, like a NOC dashboard, I am able to get everything going but would like to see how others have created it, I have used Grafana Infinity plugin with Domotz API, also just struggling with colour assignments when devices go down. Interested in anyones input. Thanks for reading.

Welcome to forum @itf8aba

Your approach with infinity api is cleanest imo. What does the data look like from rest api (please share obfuscated but with json structure intact)

And what issue are you running to with thr color and is that the only issue

The color assignment issue with Infinity plugin is that to color string values like online or offline coming from the Domotz API


I have have about 31 devices showing online

like this is the table view of all the devices

The solution is to use Value mappings
In your panel go to Value mappings and add
Value online → color Green
Value offline → color Red
In Field overrides select the status field and add these two override properties
Color scheme → From thresholds (by value)
Cell options → Cell type → Colored background
I have disconnected some devices to show you the colored dashboard

Enable Apply to entire row toggle so the entire row turns red when a device goes down This gives you a clean NOC dashboard where every row turns green when the device is online and red when it goes offline
If you want a historical view of when devices went up and down add a State timeline panel which shows one horizontal bar per device with green and red segments over time

Hey Yosiasz,

Thank you for the reply, much appreciated.

That’s basically the data structure I’m working with. The data itself appears correct and the statuses are accurate.

What I’m battling with is getting Grafana display this as a Donut display

I am able to do it perfectly with a table but I want to group my devices into donut charts like below and display the Green - Online and Red - Down

Is there a way to do this?

This is what I have and the reason the one slice is green is that I have the Aruba controller and the main AP named identical so it returns 2

Still waiting on the above to help ushelp you answer your question. But using mock data with infinity JQ query this might work?

Hey Yosia

Sorry man, not sure why I didn’t answer this question, thank you for your response and my data looks like this, is this what you need?

{
“kind”: “Panel”,
“spec”: {
“id”: 6,
“title”: “Access Points”,
“description”: “”,
“links”: ,
“data”: {
“kind”: “QueryGroup”,
“spec”: {
“queries”: [
{
“kind”: “PanelQuery”,
“spec”: {
“query”: {
“kind”: “DataQuery”,
“version”: “v0”,
“group”: “yesoreyeram-infinity-datasource”,
“datasource”: {
“name”: “grafanacloud-infinity”
},
“spec”: {
“columns”: ,
“filters”: ,
“format”: “table”,
“global_query_id”: “”,
“parser”: “backend”,
“root_selector”: “”,
“source”: “url”,
“type”: “json”,
“uql”: “parse-json”,
“url”: “https://api-eu-west-1-cell-1.domotz.com/public-api/v1/agent/303901/device”,
“url_options”: {
“data”: “”,
“headers”: [
{
“key”: “”,
“value”: “”
}
],
“method”: “GET”
}
}
},
“refId”: “A”,
“hidden”: false
}
}
],
“transformations”: [
{
“kind”: “Transformation”,
“group”: “filterFieldsByName”,
“spec”: {
“options”: {
“byVariable”: false,
“include”: {
“names”: [
“display_name”,
“importance”,
“status”,
“type”,
“vendor”
]
}
}
}
},
{
“kind”: “Transformation”,
“group”: “groupBy”,
“spec”: {
“options”: {
“fields”: {
“display_name”: {
“aggregations”: ,
“operation”: “groupby”
},
“name”: {
“aggregations”: ,
“operation”: “aggregate”
},
“status”: {
“aggregations”: [
“count”
],
“operation”: “groupby”
},
“type”: {
“aggregations”: ,
“operation”: “groupby”
},
“vendor”: {
“aggregations”:
}
}
}
}
},
{
“kind”: “Transformation”,
“group”: “filterByValue”,
“spec”: {
“options”: {
“filters”: [
{
“config”: {
“id”: “substring”,
“options”: {
“value”: “Wi-Fi”
}
},
“fieldName”: “type”
}
],
“type”: “include”,
“match”: “any”
}
}
}
],
“queryOptions”: {}
}
},
“vizConfig”: {
“kind”: “VizConfig”,
“group”: “piechart”,
“version”: “13.1.0-27040157436”,
“spec”: {
“options”: {
“reduceOptions”: {
“values”: true,
“calcs”: ,
“fields”: “/^status \(count\)$/”
},
“pieType”: “donut”,
“sort”: “desc”,
“tooltip”: {
“mode”: “single”,
“sort”: “none”,
“hideZeros”: false
},
“legend”: {
“showLegend”: false,
“displayMode”: “list”,
“placement”: “bottom”
},
“displayLabels”:
},
“fieldConfig”: {
“defaults”: {
“custom”: {
“hideFrom”: {
“tooltip”: false,
“viz”: false,
“legend”: false
}
},
“color”: {
“mode”: “palette-classic”,
“fixedColor”: “#73BF69
},
“mappings”: [
{
“type”: “value”,
“options”: {
“Online”: {
“color”: “green”,
“index”: 0
},
“Down”: {
“color”: “red”,
“index”: 1
}
}
}
]
},
“overrides”: [
{
“matcher”: {
“id”: “byName”,
“options”: “status (count)”,
“scope”: “series”
},
“properties”: [
{
“id”: “mappings”,
“value”: [
{
“type”: “regex”,
“options”: {
“pattern”: “\.ONLINE\”,
“result”: {
“color”: “green”,
“index”: 1
}

:laughing: :hot_beverage:

So what I Was asking as you might have missed in my comment is for you to provide sample json data returned from your domotz api