Searching for help with grafana with openhabian

so far:
sudo openhabian-config.
go to #24, install influxdb+grafana (it will tell to go to this post: InfluxDB+Grafana persistence and graphing )

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
Resolving repos.influxdata.com (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 (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 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Ign:3 http://repos.azulsystems.com/debian stable InRelease
Hit:4 http://repos.azulsystems.com/debian stable Release
Get:5 https://repos.influxdata.com/debian stretch InRelease [4,732 B]
Ign:6 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Hit:7 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:8 https://dl.bintray.com/openhab/apt-repo2 stable Release
Get:10 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 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
–2018-12-25 22:59:07-- https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.3.4_armhf.deb
Resolving s3-us-west-2.amazonaws.com (s3-us-west-2.amazonaws.com)… 52.218.144.72
Connecting to s3-us-west-2.amazonaws.com (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 http://archive.raspberrypi.org/debian stretch InRelease
Ign:2 http://repos.azulsystems.com/debian stable InRelease
Hit:3 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:4 http://repos.azulsystems.com/debian stable Release
Hit:5 https://repos.influxdata.com/debian stretch InRelease
Hit:6 https://deb.nodesource.com/node_8.x stretch InRelease
Ign:7 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Hit:8 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 usergrafana’ (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”,“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 :wink: