Grafana vs rrd4j & GUI

Since long time an user of rrd4j.
But lately I started using also Grafana.

But now I´m wondering about sitemaps, specially in the app vs webbrowser.

With rrd4j, you can click on the graph in the app, and have time period selection.
In the browser, i´m missing this option. So i´ve add some extra lines for time selection.

With grafana, not much possible in the app. Or you should add the grafana buttons. Which is not very userfriendly.
In a browser, you can nicely zoom in (and out) with the mouse.

Is this correct? Or am I missing something?
Or better, how do you guys use graphs?

I use static images for my charts which get rendered from Grafana by a rule that changes how frequently it generates a new render based on the time period of the chat (e.g. if looking at a full year range only update every day, if looking at the last hour update every five seconds).

You can also embed a Grafana chart in your sitemap using a Webview and then you can get the full Grafana experience with the ability to change the range, see the value of Items at any point in time, etc.

I’ve tested this, but I find it not so userfriendly as the RRD4J solution in the app.

  • With RRD4j, you can select the graph in the app and put in your timeperiod.
  • With Grafana, very difficult to select the timeframe in the app. Or you must make your graph very long.

Is it important to have the influxdb or rrd4j select in the paperui settings? Or will this have no impact on the views?


ps I’m using today your solution with the switch for time selection in the browser. But I’m looking to have a solution for a smaller sitemap. Today, my sitemap is 2178 lines long, and 510 are for building the charts. :blush:

If you are talking about the Default persistence , this setting tells openHAB, whenever data from a persistence service gets called without specifying the service, which service to use. For example, if your chart lines for the sitemap do not specify the persistence service, openHAB will use the Default persistence.

Concerning the “smaller sitemap”, are worried about the size of the file? I would be worried if my sitemap would SHOW to much.
For example: Do you have a separate time selection for each chart? I use a shared selection for charts visible on the same subpage.

I’m using the same button serie for each chart, fe:

Text item=na_Indoor_Humidity {
   Switch item=chart_period  mappings=[0="8u", 1="Dag", 2="Week", 3="Maand", 4="Jaar"]
   Chart item=NaGrHumidity period=8h refresh=30000 visibility=[chart_period==0, chart_period=="Uninitialized"]
   Chart item=NaGrHumidity period=D refresh=30000 visibility=[chart_period==1]
   Chart item=NaGrHumidity period=W refresh=30000 visibility=[chart_period==2]
   Chart item=NaGrHumidity period=M refresh=30000 visibility=[chart_period==3]
   Chart item=NaGrHumidity period=Y refresh=30000 visibility=[chart_period==4]
   }

But these ‘time switches’ are only needed for a standard webbrowser. The OH app has a nice feature to scale it.

So if I could replace all above lines with 1 line grafana, I would gain 400 lines. :blush:


Grafana with ‘tools’:
Problem I’m having with this, is that the scale selection can’t go lower in the app. So a bit pointless then.

Text item=fluksoWaterAM {
   Webview icon=none height=12 url="https://XXX:YYY/d/d/1Z5Qq8tGk/algemeen?orgId=1&from=now-12h&to=now&viewPanel=14&theme=light"
   }

Grafana without ‘tools’:
In the browser, you can select a timezone on the graph and zoom-IN. With double click of the mouse, you can zoom-OUT.
But I can’t find any way to zoom IN/OUT in the app. Or I should implement back the above buttons. Before I do this, just want to be sure that I’m not missing something.

Text item=fluksoWaterAM {
   Webview icon=none height=12 url="https://XXX:YYY/d-solo/1Z5Pq7tGk/algemeen?orgId=1&from=now-12h&to=now&panelId=14&theme=light"
   }

In other words, you do need those lines because you use the app and a webbrowser as UI.
Do you really need both, getting away with the browser would “gain 400 lines”.
Additionally you want a rather big selecting of possible timeframes.
My system is running on a Raspi3B, in order to keep the load and used disk space low. I deliberately stay with the standard charts ( no Grafana) and use rrd4j because it stores only the wanted data. Consequently I do show only those timeframes that are really needed, for example data that is looked on for a year will not be shown in timeframes <8 houres and data that is looked at by houres is never shown for a complete year.

I’d second opus’s suggestion. BasicUI is a really poor analysis UI. If you need to be zooming in and out and otherwise manipulating the chart I’d recommend doing that on Grafana itself. Then you have full control over everything, even more so than what the Android app provides with charts (note that the nice features you see are only available in the Android app, I don’t think even the iOS app provides that). So if you use anything but the Android app, you have to keep those 400 lines of code or reduce the number of time ranges you want to display.

1 Like

Do you guys see an issue on using both? I mean that RRD4J and grafana are running? A bad idea on fe performance or so?

I was thinking about migrating from RRD4J to grafana. But since RRD4J gives nice graph layouts in the app. :blush:

Then my graphs in openHAB could be used/seen as:

  1. RRD4J for the basicUI
    So used for small screens / app.
    And remove all ‘time button’ lines…

  2. Grafana for habpanel
    So uesd for bigger screens.
    And of course also direct analysis (debug)…




ps thanks for your time to help thinking about this!

rrd4j is a database, grafana a visualisation tool.
openHAB has a built-in chart so that you can use any of the persistence services to show the data.

Grafana as an (openHAB) external visualisation tool needs a persistence service as well, if rrd4j would work with it I can’t say. If not, you would need to install another (openHAB external or internal) persistence service.