natelenergy / grafana-discrete-panel Goto Github PK
View Code? Open in Web Editor NEWShow discrete events in grafana
License: MIT License
Show discrete events in grafana
License: MIT License
I just generating a snapshot on grafana 4, but it just showed an empty panel.
Has this feature been added?
also , does it work on grafana 5?
Hi,
With v0.0.5, I have the following error in the console:
module.js:596 Uncaught TypeError: Cannot read property 'changes' of undefined
at DiscretePanelCtrl.onGraphHover (module.js:596)
at f.eval (canvas-metric.js:270)
at f.emit (boot.d709d8d5.js:61)
at a.emit (boot.d709d8d5.js:61)
at HTMLCanvasElement.eval (canvas-metric.js:172)
In that dashboard, I have a few discrete panels that are empty : no data in the selected time window.
If I collapse the rows with the empty panel, the tooltips can appear on some rows, but it's not predictable...
With v0.0.4, it did not work either.
Let me know if you need more info !
Thank you very much for this panel, it is very useful.
I would like to request you if it is possible to show the time directly on the X-axis as for the typical Grafana graphs.
And again, great job!
Hi,
Currently after enabling a legend we are getting a list of keys that occur in a selected time perspective for every metric. This makes legend quite unreadable:
Would it be possible to include an option for a legend to display only a distinct list of values ? The goal is to have a smaller but usable legend.
Kind Regards
Thanks for this panel, it's something Grafana has been sorely lacking for a very long time! :)
As title says, I would like to be able to display a count of transitions.
Even better would be some kind of histogram of transition count (e.g. number of transitions per hour, with hourly buckets).
I have a line graph showing the voltage of a particular lithium battery consisting of 16 separate cells (3 V each, in series, to form a 48 V battery). The image below shows the information correctly depicted. A line graph above showing the cell voltage minima and maxima, the difference between the two and a discrete panel (v0.5) showing the cell balancing activity (depicted by either a 0 or 1 in the InfluxDB database).
Sometimes, however the discrete panel doesn't function correctly. As you can see in the image below there is no data for the time period shown (i.e. the blank line graph), however the discrete panel tells me balancing is occurring 100% of the time.
This issue also comes up in other circumstances. Take a look at the image below and notice the balancing state at this particular cursor position (i.e. no balancing):
Now if I take the exact same graphs and just zoom in a little bit, notice what the balancing state is at the exact same timestamp as the image above (i.e. balancing):
I'm really not sure what is going on here but it is fairly critical to the usefulness of this panel. Just for reference purposes, here is the InfluxDB query I'm using:
SELECT distinct("balancing_state") FROM "bms_balancer_status" WHERE "bms_balancer_id" =~ /^$bms_balancer_1$/ AND $timeFilter GROUP BY time($interval) fill(none)
Just let me know if I can be of any further help to sort this issue out.
Hi to all.
First if all thanks for your work. Panel is good.
I have string data in my DB and can`t display them in panel. When i use 'format as table', panel showed "Request Error" (but don't write any errors) if i change format to time all is good.
But, if it's timeserias format all data is null, not string...
My SQL:
SELECT
UNIX_TIMESTAMP(OpenHAB.Item8.Time) as time_sec,
OpenHAB.Item8.Value as value
FROM OpenHAB.Item8
WHERE $__timeFilter(OpenHAB.Item8.Time)
Hi
I get the following error on immediately after adding the panel
TypeError: Cannot read property 'to' of undefined
at DiscretePanelCtrl.issueQueries (https://grafana.lightricks.com/public/plugins/natel-discrete-panel/module.js?bust=1505394229707:425:34)
at i (https://grafana.lightricks.com/public/app/boot.4aeac494.js:61:3972)
at https://grafana.lightricks.com/public/app/boot.4aeac494.js:61:4394
at o.$eval (https://grafana.lightricks.com/public/app/boot.4aeac494.js:61:11549)
at o.$digest (https://grafana.lightricks.com/public/app/boot.4aeac494.js:61:10022)
at o.$apply (https://grafana.lightricks.com/public/app/boot.4aeac494.js:61:11832)
at https://grafana.lightricks.com/public/app/boot.4aeac494.js:61:7882
at f (https://grafana.lightricks.com/public/app/boot.4aeac494.js:59:22132)
at https://grafana.lightricks.com/public/app/boot.4aeac494.js:59:23593
Hello, great job with the panel and thank you a lot. Would it be possible to be able to add annotations to the panel?
thanks for the great panel...
not that important to me, but the panel doesnt seem to look at any define 'Override Relative time'
it just uses the dashboard time spans
I'm trying to group my metrics in three states RED, YELLOW & GREEN, them, are stored in InfluxDB as a string, the query is : SELECT "YYYY" FROM "XXXX" WHERE $timeFilter
but the results are always the same, sorted by tiemestamp and not grouped by value like in the screenshots provided in the readme.
(Legend works correctly)
Is there any kind of bug or am I doing something wrong?
By the way, great job with the panel!
Looks that a new internal change has broken the plugin again:
Message:
Cannot read property 'from' of undefined
Stack trace:
TypeError: Cannot read property 'from' of undefined
at t.getTimeFilter (http://178.32.76.254:3001/public/build/0.be20b78823b4c9d93a84.js:7:113735)
at t.query (http://178.32.76.254:3001/public/build/0.be20b78823b4c9d93a84.js:7:110134)
at DiscretePanelCtrl.issueQueries (http://178.32.76.254:3001/public/plugins/natel-discrete-panel/module.js:442:31)
at u (http://178.32.76.254:3001/public/build/vendor.2305a8e1d478628b1297.js:43:68722)
at http://178.32.76.254:3001/public/build/vendor.2305a8e1d478628b1297.js:43:69127
at f.$digest (http://178.32.76.254:3001/public/build/vendor.2305a8e1d478628b1297.js:43:74824)
at f.$apply (http://178.32.76.254:3001/public/build/vendor.2305a8e1d478628b1297.js:43:76638)
at http://178.32.76.254:3001/public/build/vendor.2305a8e1d478628b1297.js:43:72697
at i (http://178.32.76.254:3001/public/build/vendor.2305a8e1d478628b1297.js:43:21870)
at http://178.32.76.254:3001/public/build/vendor.2305a8e1d478628b1297.js:43:23332
Hi,
I am currently facing some issues with my prometheus query inside the discrete panel. I have added my queries to the discrete panel and set the time range to "previous month".
With this big time range I am trying to calculate the server uptime in % and how long a server wasn't available. Because of this i have to set the "min step" option in Grafana to "60s". But somehow grafana won't add this value to the prometheus query. Inside the query the "step=" Option stays the same no matter what option I am choosing for "min step".
Furthermore I noticed that this "step=" option is diffrent from the Browser I am using.
I have tested it with Firefox and Chrome. In Firefox the step value inside the query is "900" and for Chrome it is "1200".
I don't know if this is actually a problem from the plugin or Grafana itself. Currently i couldn't verify this behaviour with the bultin Graph Panel from Grafana.
I just upgraded discrete panel to 0.0.7 from 0.0.6 and Grafana from 4.6.3 to 5.0.4 and the "Expand 'from' query" option is no longer working as it used to. When I enter some number of seconds, Grafana expands both the the query and the displayed graph by that amount instead of just the query. So if my time range in Grafana is set to 'now-24h' and I enter Expand 'from' query: 86400, then the displayed graph is 2 days long instead of 1 day.
Hi, when I hover over a row to see some details, the metric name at the left side of the row disappears while hovering. Is there any way to prevent that from happening? I have enough rows that it's confusing if those labels go away.
Thanks!
This is how my rendering looks like:
onRender() {
if(this.data == null || !(this.context)) {
return;
}
this._updateRenderDimensions();
this._updateSelectionMatrix();
this._updateCanvasSize();
this._renderRects();
this._renderLabels();
this._renderSelection();
this._renderCrosshair();
}
I render everything by layers, keeping selectionMatrix
- matrix bitmap of selected rects and additional info: https://github.com/CorpGlory/grafana-discrete-panel/blob/master/src/module.js#L175
It is remade rendering which allows me to make many new features on top of it and makes code mush cleaner.
This rendering also makes appearance different: different labels positions, styles of rects, selection, and crosshair.
With the "Write Metric Names" option selected one ends up with the first value in the discrete series overlapping the metric name, as shown in the image below
However when one hovers the mouse over the metric name it then disappears, clearly showing what the first value is (see image below):
It would be super if, when the first value is to be shown, it would always cause the metric name to fade away, thereby making it clearly visible.
The screenshots here https://github.com/NatelEnergy/grafana-discrete-panel/blob/master/README.md are "blured". Need to do something with it.
I've just updated to Grafana 4.6.2, and now all my Discrete panels won't show, and give the following error:
undefined is not an object (evaluating 't.rangeRaw.from')
Does anyone have a suggestion for showing a time range on the x axis somewhere? This would help eyeballing when events happened.
Hey. Not sure if this will be fixed with the recent commits but after the upgrade to Grafana v5.0.0 the panel lost it's scrollbar when it's embedded in an iframe.
This means if the panel is bigger than the iframe area it just gets cut off.
Hi,
First of all, nice plugin. Now, the use case I have.
I need to show a lot of different rows in the panel, but having the legend only at the end makes it very hard to get useful information out of it.
I have been playing a little bit with the code to get something I could use and I was wondering if you think it might be useful in general, and in case it is, do you accept contributions to the plugin?
In this case I added a new option to show the legend interpolated, which created an extra row per data point and adds the metric name (alias) + the legend information for the specific point.
As you can see in the image is not overwriting the legend functionality at all, rather adding some extra one.
Thanks.
With the new pipeline, render all values
stacks up so everything is illegible:
Previously the text that fell in the next slot was covered by the next box, but now we need to do that artificially.
It looks like there was some code trying to do something like this, but I can't understand it:
https://github.com/NatelEnergy/grafana-discrete-panel/blob/master/src/module.ts#L669
this panel uses some lodash functions that are only supported in 4.x. These functions may be easy to replace with versions that don't require the recent lodash.
See #17
If anyone has the time and attention to port this to functions that are supported in 3.x, that would be great
I'm not sure whether this is a bug or whether I've incorrectly constructed my query. The custom zoom shown in the image below spans a few days into the past and a few into the future. The discrete panel doesn't stop showing state at the point where data is no longer available
Just to put this into context, below is a screenshot showing this compared to some of our other data.
Before the new pipeline, everything was middle aligned. The new pipeline made some stuff top and other things bottom. This is better sometimes, but by default everything in the middle is nice.
I put back middle align, and we can look at other options in follow on issue
It'd be useful if you could use the github releases (https://help.github.com/articles/about-releases/) to match the tagged versions shown in https://grafana.com/plugins/natel-discrete-panel/installation
First, awesome panel! I approximated something like this before with the built in panels, but your panel is way easier.
Enhancement request: I plot 7 days worth of 1s and 0s of service availability. It would be great if I could have percentages shown with more significant digits. ie, to try and show five 9s of availability. It looks like it's rounded up currently to 99% or 100%. Nothing in between.
Thanks!
I'm trying to render the discrete panel as an image via the "Direct link rendered image" Button inside the share panel option.
The Website which will open then just loads and after about 1 minute I'm getting an error page.
Inside the Grafana Logs I found this:
lvl=info msg=Rendering logger=png-renderer path="d-solo/XGWXldimz/reporting?orgId=1&panelId=6&from=1519858800000&to=1522533599999&width=1000&height=500&tz=UTC%2B02%3A00"
lvl=eror msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/render/d-solo/XGWXldimz/reporting status=500 remote_addr=192.168.1.141 time_ms=60003 size=1763 referer="http://grafana:3000/d/XGWXldimz/reporting?orgId=1"
lvl=eror msg="failed to render an image" logger=png-renderer error="signal: killed"
I have also tried to set the log level from grafana to debug, but nothing more is displayed here.
On the error site I am getting I see the following message: Timeout error. You can set timeout in seconds with &timeout url parameter"
. Unfortunately setting the timeout parameter to a very high number doesnt help aswell here.
Hi!
When overriding relative time in the "Time Range" tab of the panel, that setting is not respected. It only reacts to changes in the time range set for the whole dashboard (top right).
Greetings,
Valen
It's not really clear which different Grafana datasources that this plugin will work with. Any datasource that would return a value shows the error _.isNil is not a function
.
I'm assuming I can use value and range mappings to convert values to text, or be able to use a metrics that only contains 0 or 1 values such as an AWS CloudWastch HealthStatus cluster metric, but they all end up showing this error: https://dl.dropboxusercontent.com/s/kx4bik0mmc6ir5g/2017-06-13%20at%201.05%20PM.png
What data sources does this panel actually support?
Very nice plugin. Would be great if a timeline could be implemented to see better when the discrete value have changed.
Sorry to open an issue but the discrete is a revelation of occupancy monitoring. In one use case Desks in offices. And soon to replace Motioning of Elderly.
A big thanks & keep up the great work.
Hi,
if used with many different values, assigning colors is much work. Therefore, could you please add an option to set colors automatically? Each color could be assigned somewhat like this:
color = hash(value name) [use first 6 byte as rgb value]
Thank you!
Just upgraded to 0.0.7 and the value mappings no longer apply. 0.0.6 works fine. No changes to config; I can replicate just by switching between versions.
Grafana v4.4.1, running in official grafana/grafana docker image.
Hi,
This looks like a great plugin, but I'm having an issue where I need to plot string values. If I choose a field where they are numeric, I get that data plotted. However, selecting a field that contains two string - I get nothing displayed.
Thanks.
I've tried to share a local snapshot of a dashboard with the discrete panel used. When checking the snapshot however it seems all data for the discrete panel is lost, and nothing is shown.
Error:
Plugin Error
HTTP Error (404) Not Found
I have two metrics in a single discrete panel. When mousing over I see the following:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.