Hello @Foxejoe, that’s not possible directly as these are specific queries generated by grafana to display your desired value.
However, you are free to query whatever you want to from InfluxDB yourself. Check out the InfluxDB documentaiton on how to retrieve such measures, then build a corresponding rule.
Hi, I tried to use this tutorial to get the grafana+influxDB combo running on my raspberry pi together with openhab 2. I am struggling with grafana though.
I have set up influxDB and added a grafana and an openhab user. It is already connected to openhab and data is written to the openhab_db database. I also installed grafana and changed the settings .ini file according to this tutorial. Then I logged in with the grafana admin account to the server:3000 grafana website.
Now my problem is creating the influxdb datasource. I selected influxdb and added the url. I also checked the basic auth option and that is where the problems start: which user do I have to enter here? The influxDB grafana user? The grafana admin user? I tried both and get the same problem.
In the influxDB Details part I added the database and grafana user for the influxDB. Clicking save & test shortly displays a progressbar but then keeps spamming me with a “authentification needed” popup.
Why is that? I am already logged in.
Can anyone help solving this or had similar problems? Thank you!
Ok I fixed the problem… turns out I somehow made an error while creating the grafana user in the influxDB. I set the password a second time and now everything is working just fine. If someone has similar problems I recommend testing the users ability to request data via curl commands (there are explanations on how to do this in the influx manual).
# The database URL, e.g. http://127.0.0.1:8086 or https://127.0.0.1:8084 .
# Defaults to: http://127.0.0.1:8086
# The name of the database user, e.g. openhab.
# Defaults to: openhab
# The password of the database user.
# The name of the database, e.g. openhab.
# Defaults to: openhab
# The retention policy to be used, needs to configured in InfluxDB
# Till v0.13: 'default', since v1.0: 'autogen'
// persistence strategies have a name and a definition and are referred to in the "Items" section
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
everyMinute:"0 * * * * ?"
// if no strategy is specified for an item entry below, the default list will be used
default = everyChange
* Each line in this section defines for which item(s) which strategy(ies) should be applied.
* You can list single items, use "*" for all items or "groupitem*" for all members of a group
* item (excl. the group item itself).
// persist all items once a day and on every change and restore them from the db at startup
g_INFLUX* : strategy = everyChange, everyDay, restoreOnStartup
Item101 : strategy = everyChange, everyDay, restoreOnStartup
take out all comments (stuff starting with // and/or /* + */) from /etc/openhab2/persistence/influxdb.persist
By the way use: influxdb.persist (not influx.persist)
edit the file with a linux editor (like vim) and make sure that there is no crap lying around in the contents of the file (strange characters or line feeds, etc)
Of course. I checked it with show measurements and show series
Connected to http://localhost:8086 version 1.3.3
InfluxDB shell version: 1.3.4
> use openhab_db
Using database openhab_db
> show series
> show measurements