# InfluxDB+Grafana persistence and graphing

**URL:** <https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761>\
**Category:** Tutorials & Examples\
**Tags:** influxdb, graphs, grafana\
**Created:** [September 1, 2016, 5:56pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761 "2016-09-01T17:56:35Z")\
**Posts on this page:** 20\
**Page:** 25

<div class="post-metadata">

**Author:** ![christoph\_wempe](https://community.openhab.org/user_avatar/community.openhab.org/christoph_wempe/32/70848_2.png) [@christoph\_wempe](https://community.openhab.org/u/christoph_wempe)\
**Post date:** [March 12, 2018, 12:19pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/488 "2018-03-12T12:19:42Z")

</div>

You need to replace `my_measurement` with the name if your item.

Like:

```auto
SELECT * FROM Garden_Driveway_MotionSensorLux_MotionSTatus

```

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 12, 2018, 12:30pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/489 "2018-03-12T12:30:26Z")

</div>

Yes of course! Sorry about that!

When testing with that command I get this:

```
name: Garden_Driveway_MotionSensorLux_MotionStatus
time value
---- -----
1520265600159000000 1
1520269200151000000 0
1520272800114000000 0
1520276400025000000 0
1520280000133000000 0
1520283600118000000 0
1520287200077000000 0
1520290800150000000 0
1520294400045000000 0
1520298000075000000 0
1520301600116000000 0
1520305200097000000 0
1520308800102000000 0
1520312400096000000 0
1520316000137000000 0
1520319600091000000 0
1520323200053000000 0
1520326800125000000 0
1520330400115000000 0
1520334000154000000 0
1520337600083000000 0
1520341200057000000 0
1520344800118000000 0
1520348400127000000 0
1520352000090000000 1
1520355600136000000 0
1520359200106000000 0
1520362800123000000 0
1520366400095000000 0
1520370000061000000 0
1520373600064000000 0

```

So as we can see, it stopped after I updated my Groups, but the “item” is still present.  
What will I have to write then to: DELETE Garden\_Driveway\_MotionSensorLux\_MotionStatus ish?

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [March 12, 2018, 12:37pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/490 "2018-03-12T12:37:43Z")

</div>

That sould do the trick

See:

> **[Manage your database using InfluxQL | InfluxDB OSS v1 Documentation](https://docs.influxdata.com/influxdb/v1/query_language/database_management/)**
>
> Use InfluxQL to administer your InfluxDB server and work with InfluxDB databases, retention policies, series, measurements, and shards.

```auto
DROP MEASUREMENT Garden_Driveway_MotionSensorLux_MotionStatus

```

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 12, 2018, 12:55pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/491 "2018-03-12T12:55:11Z")

</div>

Yes exactly…  
That clears up the measurements, but the ITEM is still present:

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/8/4/84351ca9c469089eb00c2273eb053f237809e47c.jpeg)

Isn’t it possible to remove it from the item drop down list somehow?

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [March 12, 2018, 1:44pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/492 "2018-03-12T13:44:30Z")

</div>

Try

```auto
DROP SERIES Garden_Driveway_MotionSensorLux_MotionStatus

```

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 12, 2018, 2:04pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/493 "2018-03-12T14:04:48Z")

</div>

Then it ends up with this error:

> DROP SERIES Garden\_Driveway\_MotionSensorLux\_MotionStatus  
> ERR: error parsing query: found Garden\_Driveway\_MotionSensorLux\_MotionStatus, expected FROM, WHERE at line 1, char 13

---

<div class="post-metadata">

**Author:** ![Udo\_Hartmann](https://community.openhab.org/user_avatar/community.openhab.org/udo_hartmann/32/70871_2.png) [@Udo\_Hartmann](https://community.openhab.org/u/Udo_Hartmann)\
**Post date:** [March 12, 2018, 6:14pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/494 "2018-03-12T18:14:37Z")

</div>

Maybe

```auto
DROP SERIES FROM Garden_Driveway_MotionSensorLux_MotionStatus

```

?

---

<div class="post-metadata">

**Author:** ![Olymp](https://community.openhab.org/user_avatar/community.openhab.org/olymp/32/5553_2.png) [@Olymp](https://community.openhab.org/u/Olymp)\
**Post date:** [March 12, 2018, 11:58pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/495 "2018-03-12T23:58:40Z")

</div>

Have you tried to restart the graphan, the computer?

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [March 13, 2018, 7:04am UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/496 "2018-03-13T07:04:46Z")

</div>

Try:

```auto
DROP SERIES FROM "Garden_Driveway_MotionSensorLux_MotionStatus"

```

Notice the quotes!!

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 13, 2018, 9:53am UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/497 "2018-03-13T09:53:54Z")

</div>

> [@vzorglub](#):
>
> Try:
> 
> DROP SERIES FROM “Garden\_Driveway\_MotionSensorLux\_MotionStatus”
> 
> Notice the quotes!!

Brilliant! This works!

---

<div class="post-metadata">

**Author:** ![Udo\_Hartmann](https://community.openhab.org/user_avatar/community.openhab.org/udo_hartmann/32/70871_2.png) [@Udo\_Hartmann](https://community.openhab.org/u/Udo_Hartmann)\
**Post date:** [March 13, 2018, 1:04pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/498 "2018-03-13T13:04:49Z")

</div>

Finally 🙂

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [March 13, 2018, 1:09pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/499 "2018-03-13T13:09:36Z")

</div>

The quotes are necessary on influxdb 1.5 but not on previous versions

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 13, 2018, 1:34pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/500 "2018-03-13T13:34:29Z")

</div>

> [@Udo\_Hartmann](#):
>
> Finally 🙂

Haha yes -sorry 😉

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 13, 2018, 3:19pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/501 "2018-03-13T15:19:21Z")

</div>

Well, one problem fixed and then a new one arises 😃.

I added a few extra Groups to my persistent file, but for some reason it doesn’t seem to be pushed into my openhab\_db. When I run the show measurement it does not appear.

Can anyone see any problems with this:

```
Strategies {
    everyMinute : "0 * * * * ?"
    everyHour : "0 0 * * * ?"
    everyDay : "0 0 0 * * ?"
}

Items {
        gLux* : strategy = everyChange, everyHour
        gTemp*, gAstroElevation* : strategy = everyChange, everyHour
        gHum* : strategy = everyChange, everyHour, everyMinute
}

```

The other measurements are still running without any problems, still updating the values in my graphs just fine.

EDIT: Fixed! This happens if you haven’t created a Group gHum or gAstroElevation, even though you add the tag under the item.

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [March 13, 2018, 3:47pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/502 "2018-03-13T15:47:21Z")

</div>

I would restart influx AND openHAB  
Reboot time?

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 13, 2018, 4:23pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/503 "2018-03-13T16:23:27Z")

</div>

> [@vzorglub](#):
>
> I would restart influx AND openHAB
> 
> Reboot time?

Hi Vincent,  
Did reboot it - still no luck.

---

<div class="post-metadata">

**Author:** ![Yoinkz](https://community.openhab.org/letter_avatar_proxy/v4/letter/y/958977/32.png) [@Yoinkz](https://community.openhab.org/u/Yoinkz)\
**Post date:** [March 13, 2018, 5:32pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/504 "2018-03-13T17:32:33Z")

</div>

> [@Yoinkz](#):
>
> EDIT: Fixed! This happens if you haven’t created a Group gHum or gAstroElevation, even though you add the tag under the item.

Fixed!

---

<div class="post-metadata">

**Author:** ![apache](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@apache](https://community.openhab.org/u/apache)\
**Post date:** [April 21, 2018, 9:50am UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/505 "2018-04-21T09:50:39Z")

</div>

Hi,  
worth adding that in openhab2 (debian atleast) the html folder is /etc/openhab2/html/. spent sometime getting it right. Now to work on the html files. Great post and fantastic tutorial 😄

Update  
aargh. I just realised you have already thought about it. If i use visual studio with the openhab plugin its already visible…

---

<div class="post-metadata">

**Author:** ![Nognog](https://community.openhab.org/user_avatar/community.openhab.org/nognog/32/43445_2.png) [@Nognog](https://community.openhab.org/u/Nognog)\
**Post date:** [May 4, 2018, 3:35pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/506 "2018-05-04T15:35:51Z")

</div>

Hello together,

how i can delete the border?

```auto
.panel-container iframe {
    border: 0;
    padding: 0;
    background-color: #000000;
    border-color: #000000;
    width: 100%;
    height: 450px;
    overflow: hidden;
    margin: 0;
  }
  
  .panel-container {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-color: #000000;
    background-color: #000000;
  }

```

 ![Screenshot_20180504-172904_openHAB](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/9/3/939cc3abc0d1b23c62498d3c94e709fb6b0d9ebc.jpeg)  
greetings Daniel

---

<div class="post-metadata">

**Author:** ![derhelge](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/ebca7d/32.png) [@derhelge](https://community.openhab.org/u/derhelge)\
**Post date:** [May 31, 2018, 5:02pm UTC](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761/507 "2018-05-31T17:02:38Z")

</div>

Can be delete if found my error.

[Previous page](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761.md?page=24)

[Next page](https://community.openhab.org/t/influxdb-grafana-persistence-and-graphing/13761.md?page=26)
