# Searching for help with grafana with openhabian

**URL:** <https://community.openhab.org/t/searching-for-help-with-grafana-with-openhabian/61084>\
**Category:** Beginners\
**Tags:** openhab2\
**Created:** [December 25, 2018, 6:57pm UTC](https://community.openhab.org/t/searching-for-help-with-grafana-with-openhabian/61084 "2018-12-25T18:57:57Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Dajazzz](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/3e96dc/32.png) [@Dajazzz](https://community.openhab.org/u/Dajazzz)\
**Post date:** [December 25, 2018, 9:01pm UTC](https://community.openhab.org/t/searching-for-help-with-grafana-with-openhabian/61084/7 "2018-12-25T21:01:03Z")

</div>

so far:  
sudo openhabian-config.  
go to #24, install influxdb+grafana (it will tell to go to this post: [InfluxDB+Grafana persistence and graphing](https://community.openhab.org/t/13761/1) )

its asking me to install locally or use existing instance.  
no idea what to pick so i try the first one. Install locally.

enter passwords for a few times. I enter all the same password for each of them.

Shall influxDB be configured with Openhab? I select Yes  
downloading…

Operation Succesful!  
OK.

If this is all correct, how can we add this into the tutorial so that others can benefit from this as well?,

[22:52:12] openhabian@openHABianPi:~$ sudo openhabian-config  
2018-12-25\_22:53:17\_EET [openHABian] Checking for root privileges… OK  
2018-12-25\_22:53:17\_EET [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK  
2018-12-25\_22:53:18\_EET [openHABian] openHABian configuration tool version: [master]v1.4.1-430(67ea550)  
2018-12-25\_22:53:18\_EET [openHABian] Checking for changes in origin… OK  
2018-12-25\_22:53:23\_EET [openHABian] Setting up InfluxDB and Grafana…

Installing InfluxDB…

$ apt -y install apt-transport-https  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
apt-transport-https is already the newest version (1.4.8).  
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
–2018-12-25 22:57:34-- [https://repos.influxdata.com/influxdb.key](https://repos.influxdata.com/influxdb.key)  
Resolving [repos.influxdata.com](http://repos.influxdata.com) ([repos.influxdata.com](http://repos.influxdata.com))… 2600:9000:2074:1200:7:7790:e740:93a1, 2600:9000:2074:7800:7:779 0:e740:93a1, 2600:9000:2074:ca00:7:7790:e740:93a1, …  
Connecting to [repos.influxdata.com](http://repos.influxdata.com) ([repos.influxdata.com](http://repos.influxdata.com))|2600:9000:2074:1200:7:7790:e740:93a1|:443… connected.  
HTTP request sent, awaiting response… 200 OK  
Length: 3108 (3.0K) [application/pgp-keys]  
Saving to: ‘STDOUT’

- 

```
                        100%[=================================================>] 3.04K --.-KB/s in 0s

```

2018-12-25 22:57:34 (76.7 MB/s) - written to stdout [3108/3108]

OK

$ apt update  
Hit:1 [Index of /debian](http://archive.raspberrypi.org/debian) stretch InRelease  
Hit:2 [Index of /raspbian](http://raspbian.raspberrypi.org/raspbian) stretch InRelease  
Ign:3 [http://repos.azulsystems.com/debian](http://repos.azulsystems.com/debian) stable InRelease  
Hit:4 [http://repos.azulsystems.com/debian](http://repos.azulsystems.com/debian) stable Release  
Get:5 [InfluxData - Package Repository](https://repos.influxdata.com/debian) stretch InRelease [4,732 B]  
Ign:6 [https://dl.bintray.com/openhab/apt-repo2](https://dl.bintray.com/openhab/apt-repo2) stable InRelease  
Hit:7 [https://deb.nodesource.com/node\_8.x](https://deb.nodesource.com/node_8.x) stretch InRelease  
Hit:8 [https://dl.bintray.com/openhab/apt-repo2](https://dl.bintray.com/openhab/apt-repo2) stable Release  
Get:10 [InfluxData - Package Repository](https://repos.influxdata.com/debian) stretch/stable armhf Packages [918 B]  
Fetched 5,650 B in 2s (1,928 B/s)  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
All packages are up to date.

$ apt -y install influxdb  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
The following NEW packages will be installed:  
influxdb  
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.  
Need to get 43.0 MB of archives.  
After this operation, 93.2 MB of additional disk space will be used.  
Get:1 [InfluxData - Package Repository](https://repos.influxdata.com/debian) stretch/stable armhf influxdb armhf 1.7.2-1 [43.0 MB]  
Fetched 43.0 MB in 39s (1,101 kB/s)  
Selecting previously unselected package influxdb.  
(Reading database … 46236 files and directories currently installed.)  
Preparing to unpack …/influxdb\_1.7.2-1\_armhf.deb …  
Unpacking influxdb (1.7.2-1) …  
Setting up influxdb (1.7.2-1) …  
Created symlink /etc/systemd/system/influxd.service → /lib/systemd/system/influxdb.service.  
Created symlink /etc/systemd/system/multi-user.target.wants/influxdb.service → /lib/systemd/system/influxdb.service.  
Processing triggers for man-db (2.7.6.1-2) …  
Updating FireMotD available updates count … 2018-12-25 22:58:40,519: FireMotD: Error: Template folder doesn’t exist. U pgrading from an older version? Please run make again or run the install function “FireMotD -I -v”.

$ systemctl daemon-reload

$ systemctl enable influxdb.service

$ systemctl restart influxdb.service  
OK Configure InfluxDB admin account… {“results”:[{“statement\_id”:0}]}  
OK Configure listen on localhost only…  
$ sed -i -e /^# Determines whether HTTP endpoint is enabled./ { n ; s/^# enabled = true/enabled = true/ } /etc/influxdb/ influxdb.conf

$ sed -i s/# bind-address = “:8086”/bind-address = “localhost:8086”/g /etc/influxdb/influxdb.conf

$ sed -i s/# auth-enabled = false/auth-enabled = true/g /etc/influxdb/influxdb.conf

$ systemctl restart influxdb.service  
OK  
Setup of inital influxdb database and InfluxDB users… {“results”:[{“statement\_id”:0}]}  
{“results”:[{“statement\_id”:0}]}  
{“results”:[{“statement\_id”:0}]}  
{“results”:[{“statement\_id”:0}]}  
{“results”:[{“statement\_id”:0}]}  
OK Installing Grafana…  
$ wget [https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana\_5.3.4\_armhf.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.3.4_armhf.deb)  
–2018-12-25 22:59:07-- [https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana\_5.3.4\_armhf.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.3.4_armhf.deb)  
Resolving [s3-us-west-2.amazonaws.com](http://s3-us-west-2.amazonaws.com) ([s3-us-west-2.amazonaws.com](http://s3-us-west-2.amazonaws.com))… 52.218.144.72  
Connecting to [s3-us-west-2.amazonaws.com](http://s3-us-west-2.amazonaws.com) ([s3-us-west-2.amazonaws.com](http://s3-us-west-2.amazonaws.com))|52.218.144.72|:443… connected.  
HTTP request sent, awaiting response… 200 OK  
Length: 27059330 (26M) [application/x-debian-package]  
Saving to: ‘grafana\_5.3.4\_armhf.deb’

grafana\_5.3.4\_armhf.deb 100%[========================================================================================================================================\>] 25.81M 393KB/s in 42s

2018-12-25 22:59:50 (633 KB/s) - ‘grafana\_5.3.4\_armhf.deb’ saved [27059330/27059330]

$ apt update  
Hit:1 [Index of /debian](http://archive.raspberrypi.org/debian) stretch InRelease  
Ign:2 [http://repos.azulsystems.com/debian](http://repos.azulsystems.com/debian) stable InRelease  
Hit:3 [Index of /raspbian](http://raspbian.raspberrypi.org/raspbian) stretch InRelease  
Hit:4 [http://repos.azulsystems.com/debian](http://repos.azulsystems.com/debian) stable Release  
Hit:5 [InfluxData - Package Repository](https://repos.influxdata.com/debian) stretch InRelease  
Hit:6 [https://deb.nodesource.com/node\_8.x](https://deb.nodesource.com/node_8.x) stretch InRelease  
Ign:7 [https://dl.bintray.com/openhab/apt-repo2](https://dl.bintray.com/openhab/apt-repo2) stable InRelease  
Hit:8 [https://dl.bintray.com/openhab/apt-repo2](https://dl.bintray.com/openhab/apt-repo2) stable Release  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
All packages are up to date.

$ apt-get install -y adduser libfontconfig  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
Note, selecting ‘libfontconfig1’ instead of ‘libfontconfig’  
adduser is already the newest version (3.115).  
libfontconfig1 is already the newest version (2.11.0-6.7).  
libfontconfig1 set to manually installed.  
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ dpkg -i grafana\_5.3.4\_armhf.deb  
Selecting previously unselected package grafana.  
(Reading database … 46262 files and directories currently installed.)  
Preparing to unpack grafana\_5.3.4\_armhf.deb …  
Unpacking grafana (5.3.4) …  
Setting up grafana (5.3.4) …  
Adding system user `grafana' (UID 112) ... Adding new user `grafana’ (UID 112) with group `grafana' ... Not creating home directory `/usr/share/grafana’.

### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd

sudo /bin/systemctl daemon-reload  
sudo /bin/systemctl enable grafana-server

### You can start grafana-server by executing

sudo /bin/systemctl start grafana-server  
Processing triggers for systemd (232-25+deb9u6) …

$ systemctl daemon-reload

$ systemctl enable grafana-server.service  
Synchronizing state of grafana-server.service with SysV service script with /lib/systemd/systemd-sysv-install.  
Executing: /lib/systemd/systemd-sysv-install enable grafana-server  
Created symlink /etc/systemd/system/multi-user.target.wants/grafana-server.service → /usr/lib/systemd/system/grafana-server.service.

$ systemctl start grafana-server.service  
OK  
Updating Grafana admin password…{“message”:“User password updated”}OK Updating Grafan configuration…  
$ sed -i -e /^# disable user signup / registration/ { n ; s/^;allow\_sign\_up = true/allow\_sign\_up = false/ } /etc/grafana/grafana.ini

$ sed -i -e /^# enable anonymous access/ { n ; s/^;enabled = false/enabled = true/ } /etc/grafana/grafana.ini

$ systemctl restart grafana-server.service  
Connection Grafana to InfluxDB…{“datasource”:{“id”:1,“orgId”:1,“name”:“openhab\_home”,“type”:“influxdb”,“typeLogoUrl”:“”,“access”:“proxy”,“url”:“[http://localhost:8086](http://localhost:8086)”,“password”:“xxxx”,“user”:“”,“database”:“openhab\_db”,“basicAuth”:true,“basicAuthUser”:“”,“basicAuthPassword”:“xxxxx”,“withCredentials”:false,“isDefault”:false,“secureJsonFields”:{},“version”:1,“readOnly”:false},“id”:1,“message”:“Datasource added”,“name”:“openhab\_home”}Adding openHAB dashboard tile for Grafana… 2018-12-25\_23:00:33\_EET [openHABian] Adding an openHAB dashboard tile for ‘grafana’… OK  
Adding install InfluxDB with database configuration to OpenHAB  
$ touch /etc/openhab2/services/influxdb.cfg  
2018-12-25\_23:01:55\_EET [openHABian] Checking for default openHABian username:password combination… FAILED  
2018-12-25\_23:01:56\_EET [openHABian] We hope you got what you came for! See you again soon 😉

---

_[View the full topic](https://community.openhab.org/t/searching-for-help-with-grafana-with-openhabian/61084)._
