Comments (4)
This is the transformation (outer join + organize fields) that I used to distinguish the different fields:
from mqtt-datasource.
I have noticed the same thing, although I have 20 topics, not 2, and I use gauges instead of timelines.
I assume the topics you subscribe to publish simple numeric values, not json objects.
In that case it is by (lack of) design they are all mapped to the field name "Value".
I tried to solve this by adding field overrides, mapping "Fields returned by query" to "Display name".
That did not work so well in practice, it was very hard to configure it since fields appeared and disappeared in the
"Fields returned by query"-dropdown in a seemingly random manor.
In the end I got all 20 fields configured by manually modifying the panel json.
But even then it did not work very well, metrics would frequently revert back to being displayed as "Value" until the page was reloaded in the browser.
What I did then was to modify the backend code so that when the payload is a single value rather than a json object it will be sent to the frontend using the topic as field name instead of "Value".
In cases where I don't want the MQTT topic as display name I can just add a field override mapping "Fields with name" to "Display name". That seems to be stable unlike the mapping from "Fields returned by query".
Another thing that you might not have noticed with just 2 topics is that you are probably missing every second update to each topic.
I found that when using N topics in the same dashboard, (or rather with the same MQTT data source), for each topic only every 1/N update is sent from backend to frontend. This is more visible when using many topics as I do.
I had to modify the backend code to fix that as well.
from mqtt-datasource.
This still not working for me, I have two topics (light/1 and light/2) and both needs to be separated, I can't mix them.
from mqtt-datasource.
I've found this to be an issue since before the official beta release, but the latest beta release broke all of my dashboards. In my case my topics are comprised of multiple values, e.g.
{
"value1": 1.234
"value2": 5.678
...
}
With the latest beta release my data drops out after only a few seconds (publishing at 5 Hz). Sometimes it's one topic, sometimes it's both. Sometimes I can get one back by changing the time range or refreshing the page, but then it drops out again soon after.
from mqtt-datasource.
Related Issues (20)
- tls ... how to configure to make it working ?
- add datasource with terraform HOT 1
- Data stream stops after a few minutes HOT 2
- MQTT-DataSource - Transform - Extract fields
- Variable Filters while using MQTT Datasource HOT 1
- EMQX HOT 1
- Allow parsing of '+' topic into fields HOT 1
- Multiple Queries in 1 Panel HOT 2
- Official Grafana container: Cannot add data source (An unexpected error happened: Minified React error #130)
- README with working build instruction? HOT 1
- Bug with plugin when mapping docker volume on external drive for /var/lib/grafana
- Topic wildcards ('#' and '+') don't seem to be supported. Are they? HOT 1
- Seems to only get data as integer when it is actually published with decimals.
- Not working HOT 3
- Non ASCII characters in topic names not handled well when creating datasource channel id HOT 1
- MQTT CLIENT ID HOT 1
- Feature Request: Allow uploading CA certificate details
- Support od space characters in topics name
- Build fails / dependency grafana-toolkit HOT 1
- No data in mqtt HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqtt-datasource.