InfluxDB+Grafana persistence and graphing

influxdb
graphs
grafana
Tags: #<Tag:0x00007fd311b2ba60> #<Tag:0x00007fd311b2b8a8> #<Tag:0x00007fd311b2b628>

(Rich Koshak) #347

That is all it takes. The javascript and css execute in the browser, not the server, so the built in openHAB server is more than adequate.


(marcolino) #348

Hi @rlkoshak,
I give it a quick try today and I get it work internally on my network.
It do not work externally, because OpenHab sitemap try to connect to private address. I hope OpenHab work as a proxy for webview request, but seems not.

I have grafana on an internet address, with a public name, but if called from external, grafana will ask for credential.
Is there a way to pass credential or a token inside a webview request?

Marco


(Rich Koshak) #349

You can provide the username and password as part of the URL, but then your username and password are being passed in the clear.

Beyond that I don’t know how to solve this problem.


(marcolino) #350

Hi @rlkoshak
I do not found docs on how pass username and password into the URL for Grafana.
Do you have some hints?

Thanks


(Rich Koshak) #351

It is a generic HTTP feature called BasicAuth

http://user:password@url

But again, if you are going to do this you may as well not have a password as it will be passed in the clear.


(marcolino) #352

Hi @rlkoshak
I make it work using a Reverse Proxy authentication for OpenHab.
Grafana is published under a folder of OH root using a reverse proxy.
I activate Grafana Reverse Proxy auth, and when I login to OH, also grafana is authenticated, and i can see graph from Browser, but not from OH Android app.
Opening the URL of the chart from chrome mobile from my phone it work. Do OH app support webview?

Thanks

Marco


(Rich Koshak) #353

As far as I have seen back when I used webviews, the Android app only supports webviews when on the LAN. It does not support them when connected through a reverse proxy/myopenhab.org.


(marcolino) #354

hi @rlkoshak
thanks for help.
I’ll make some more testing.

Marco


(joris) #355

When and if you find a way to pass grafana through myopenhab without having to do all kinds of other servers and a public IP then I will buy you a beer should you be so inclined


(marcolino) #356

hi @joriskofman
I do not use myopenhab, I don’t like it and it was too slow. At my house I have 100Mbit connection and I prefer to have openhab hosted in house, on my local server.
I don’t know myopenhab utentication method, but if it support authentication passed by a revese proxy, I think it in possible to integrate. You can also configure grafana to bypass login, using a RP passing fixed credential.

Regards

Marco


(E. Gerland) #357

That’s a massive tutorial.
Thanks for sharing.
Possibly an excellent project for my next vacation :wink:


(dvzkul) #358

I was curious if anyone else has had a problem sense updating to OpenHAB 2.1 (from 2.0). Grafana is not finding any data points since the day I upgraded.

I have verified that Influx is collecting new data via the CLI.
I did the update using openhabian-config.
I have double checked all of the settings and setup as listed in this topic.

Any help would be appreciated.

Thanks,

Dave


(Christoph Wempe) #359

I was wondering if anybody has the same experiance with InfluxDB taking very much memory on my Raspberry Pi 2.

I am running openhab2.1 as a nativ installation and InfluxDB and Grafana as docker containers.
There are about 80 series/items stored in the openhab_db.

As you can see in the following graph, InfluxDB is using about 150-300MB os memory.

This is the overall memory usage of my Pi. :frowning:

The System is working fine, but I don’t think this is “healthy”.

So: Is this normal for InfluxDB?
Does anybody running a similar setup?
Are there usefull parameters to tweak the memory usage of InfluxDB?


OpenHABian - is InfluxDB and Grafana still a separate install?
(Rich Koshak) #360

Databases are memory his as a general rule. 200-300 mg of RAM does not alarm me. I think it is online with what I’m seeing (I’m on my phone and the font on my shoulder client is REALLY small so I’m not sure I added up all the processes). They take up a lot of your available open file handles as well (I discovered this when I tried to put the InfluxDB data on a CIFS mounted volume and ran out.


(dvzkul) #361

In case anyone had the same problem, this topic gave me some hints: MapDB giving weird error. I ended up deleting influxdb.persist and creating a new file. It appears to have solved the problem.


(Angelos) #362

@ThomDietrich 's tutorial is covered by timeShift (Grafana’s blog series with articles from the community) :fireworks:

Summer time reading :parasol_on_ground: :slight_smile:

Implement your own http://play.grafana.org Dashboard with openHAB 2 !


( ) #363

Nice! :slight_smile:


(Christoph Wempe) #364

I don’t know what your experiences are, but I would advice against running openhab2 and influxdb on the same RaspberryPi.

I had it running on a RasPi2 for a few weeks now, but the memory usage is just to heavy.
InfluxDB was using about 300MB and openhab had to reload some rule files with resulted in unexpected behavior.

Maybe there should be a warning here. InfluxDB+Grafana persistence and graphing

Just my 2 cents.
Maybe there is a way to make it work, but I donÄt know it. :wink:


(Angelos) #365

just fyi (a data point):
today all 3 components were upgraded (using apt) in my Debian Jessie main system:
OH 2.2.0 Snapshot from Build # 1003 to 1006
Grafana from 4.4.2 to 4.4.3
InfluxDB from 1.3.1-1 to 1.3.2-1

All work fine :slight_smile:


( ) #366

Thanks for the info! I’ve updated the first post.