Update/upgrade grafana

Hello guys,
I use on my rpi3 openhabian and I updated, upgraded my system and i installed the last stable release of openhabian (2.5.3-1).
On my rpi I use grafana. I noted that for example the software it wasn’t updated automatically and so I have allways the version 6.6.1.
Someone know how can I update/upgrade grafana? Can I simple use this instruction:

Ubuntu and Debian(ARMv7)SHA256: df2f817f861789d280c927da6b59f8e6521570806158dde294bfa2e11d1b6f73

sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/oss/release/grafana_6.7.1_armhf.deb
sudo dpkg -i grafana_6.7.1_armhf.deb

Thank you for our support!

that’s what I did two day ago. Works without issues. You just have to configure grafana.ini so that the panels can be embedded again.

in grafana.ini, go to [security] section and add

allow_embedding = true

save and restart grafana and you’re finished

@Sascha_Billian:
Thank you for your fast anwser.
I have just configured the grafana.ini file like your post but grafana wasn’t updated updated…

No, that was a misunderstanding. after updating grafana (using the deb package), you will need to add this line into the configuration, otherwise you cannot embed your charts into the BasicUI or HabPanel

@Sascha_Billian:
Oh sorry.
For understanding:

  1. So can I use this instruction for my rpi3:

Ubuntu and Debian(ARMv7)SHA256: df2f817f861789d280c927da6b59f8e6521570806158dde294bfa2e11d1b6f73

sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/oss/release/grafana_6.7.1_armhf.deb
sudo dpkg -i grafana_6.7.1_armhf.deb

  1. configure the grafana.ini so that the panels can be embedded again: in grafana.ini, go to [security] section and add

allow_embedding = true

save and restart grafana and you’re finished.
3. The new version of Grafana work like the old version on my openhabian distribution and the old projects of grafana (dashboards) exists.

It is correct? :thinking:

1 Like

Yes, that’s what I did. And it worked

@Sascha_Billian:
perfect. I will try it.
Thank you for our support!!! :wink:

Once you have it working, don’t forget to click the square box on the post that provided the solution to mark topic as solved. :wink:

@Sascha_Billian:
I have done this:

[15:32:05] openhabian@openhab:~$ sudo apt-get install -y adduser libfontconfig1

Reading package lists… Done

Building dependency tree

Reading state information… Done

adduser is already the newest version (3.118).

libfontconfig1 is already the newest version (2.13.1-2).

The following packages were automatically installed and are no longer required:

rpi.gpio-common triggerhappy

Use ‘sudo apt autoremove’ to remove them.

0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

[15:33:05] openhabian@openhab:~$ sudo apt autoremove

Reading package lists… Done

Building dependency tree

Reading state information… Done

The following packages will be REMOVED:

rpi.gpio-common triggerhappy

0 upgraded, 0 newly installed, 2 to remove and 5 not upgraded.

After this operation, 115 kB disk space will be freed.

Do you want to continue? [Y/n] y

(Reading database … 50545 files and directories currently installed.)

Removing rpi.gpio-common:armhf (0.6.5-1) …

Removing triggerhappy (0.5.0-1) …

Warning: Stopping triggerhappy.service, but it can still be activated by:

triggerhappy.socket

Processing triggers for man-db (2.8.5-2) …

Updating FireMotD available updates count …

[15:34:38] openhabian@openhab:~$ wget https://dl.grafana.com/oss/release/grafana_6.7.1_armhf.deb

–2020-03-26 15:34:51-- https://dl.grafana.com/oss/release/grafana_6.7.1_armhf.deb

Resolving dl.grafana.com (dl.grafana.com)… 151.101.242.217, 2a04:4e42:3::729

Connecting to dl.grafana.com (dl.grafana.com)|151.101.242.217|:443… failed: Connection timed out.

Connecting to dl.grafana.com (dl.grafana.com)|2a04:4e42:3::729|:443… failed: Network is unreachable.

[15:35:23] openhabian@openhab:~$ wget https://dl.grafana.com/oss/release/grafana_6.7.1_armhf.deb

–2020-03-26 15:36:50-- https://dl.grafana.com/oss/release/grafana_6.7.1_armhf.deb

Resolving dl.grafana.com (dl.grafana.com)… 151.101.14.217, 2a04:4e42:39::729

Connecting to dl.grafana.com (dl.grafana.com)|151.101.14.217|:443… connected.

HTTP request sent, awaiting response… 200 OK

Length: 35583874 (34M) [application/x-debian-package]

Saving to: ‘grafana_6.7.1_armhf.deb.1’

grafana_6.7.1_armhf.deb.1 100%[====================================================================================================>] 33.93M 1.66MB/s in 30s

2020-03-26 15:37:20 (1.15 MB/s) - ‘grafana_6.7.1_armhf.deb.1’ saved [35583874/35583874]

Than I have rebooted my rpi but when I insert in my browser IP-ADRESS:3000/login I allways say the old version of grafana.
What I have done wrong?

@H102:
I have just clicked the square box on the post that provided the solution to mark topic as solved. It isn’t visible?

Yes, it’s visible, :+1: but IMHO you gave credit to the wrong person. :face_with_raised_eyebrow: @Sascha_Billian provided the solution you just retyped it. :shushing_face:

Sorry, in all cases @Sascha_Billian has earned the credit!!! I chanched it immediately.
I didn’t know about the credits, sorry. :pensive:
Thanky ou for the info.

Not a big deal, you can change the check mark to a different post if you like. Giving the credit to the proper post is just a way to, well give credit to the person that took the time to help with an issue. :wink:

Erm, so you just downloaded the new grafana setup, but missed the part to install it:

sudo dpkg -i grafana_6.7.1_armhf.deb

you might want to rename the file first, since it was downloaded as

grafana_6.7.1_armhf.deb.1

So:

mv grafana_6.7.1_armhf.deb.1 grafana_6.7.1_armhf.deb
sudo dpkg -i grafana_6.7.1_armhf.deb

after that, make the changes in grafana.ini and then you just need to reboot grafana

Just curious, but why wouldn’t you set up the repo as directed in the Grafana install instructions? Then you can upgrade easily in the future. They have ARM instructions now (which they didn’t have in the past).

1 Like

@Sascha_Billian:
Thank you for your helpfulness.
Now I have done this:

[16:11:14] openhabian@openhab:~$ mv grafana_6.7.1_armhf.deb.1 grafana_6.7.1_armhf.deb

[16:18:09] openhabian@openhab:~$ sudo dpkg -i grafana_6.7.1_armhf.de

dpkg: error: cannot access archive ‘grafana_6.7.1_armhf.de’: No such file or directory

[16:18:19] openhabian@openhab:~$ sudo dpkg -i grafana_6.7.1_armhf.deb

(Reading database … 50524 files and directories currently installed.)

Preparing to unpack grafana_6.7.1_armhf.deb …

Unpacking grafana (6.7.1) over (6.7.1) …

Replaced by files in installed package grafana-rpi (6.6.1) …

Setting up grafana (6.7.1) …

Restarting grafana-server service… OK

Processing triggers for systemd (241-7~deb10u3+rpi1) …

[16:18:42] openhabian@openhab:~$ sudo nano /etc/grafana/grafana.ini

[16:19:25] openhabian@openhab:~$ sudo reboot

but still it doesn’t work.

When I open the grafana.ini file i see “allow_embedding = true”.
After a reboot I insert on my browser “IP-ADRESS:3000/login”. I allways see the old version of grafana :woozy_face:
What am I doing wrong or have I misunderstood something? :thinking:

@jswim788:
Thank you for your input. Good to know!
Can I use this way even to update grafana (when I just installed it)?

Maybe only the cache of your browser needs to be cleared. It clearly says that Grafana 6.7.1 is installed.

As per @jswim788 if you

echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list 

and then

sudo apt-get update

you can update just Grafana any time a new version is available with

sudo apt-get --only-upgrade install grafana

@Sascha_Billian, @robb01:
Thank you for our inputs.
I dont’ know why my update/upgrade don’t work or I don’t see the new version of grafana. :rage:
On my rpi i get this messages:

and

[10:56:28] openhabian@openhab:~$ sudo apt-get --only-upgrade install grafana
Reading package lists… Done
Building dependency tree
Reading state information… Done
grafana is already the newest version (6.7.1).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

→ It clearly says that Grafana 6.7.1 is installed, too.

I reboot the rpi and my windows pc. But when I insert on my browser “IP-ADRESS:3000/login” and I click than on the question mark I allways see the old version (Grafana v6.6.1 (21bf8b71bc)) of grafana :sob:

Did you do a refresh in your browser? On Chrome that’s a control-shift-R. What browser are you using?

Try from a different PC or tablet. I suspect 6.7.1 is indeed installed, but your browser is using cached content as @Sascha_Billian says above.

@jswim788:
I use chrome and firefox.
Both browsers always show the old version. Even after a reboot.
Even a refresh in chrome with your key combination has brought no change.
On my tablet with chrome I only see the old version.

It may be that I have to delete something from the “old version”.
It’s funny that on one side it is installed the new version and on the other side I only see the old one.

For me not understandable… :sweat:

When I would update my system with your instructions I get this message:

[18:59:13] openhabian@openhab:~$ sudo apt-get update
Hit:1 Index of /debian buster InRelease
Hit:2 Index of /raspbian buster InRelease
Hit:3 InfluxData - Package Repository buster InRelease
Ign:4 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:5 https://packages.grafana.com/oss/deb stable InRelease [12.1 kB]
Get:6 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Err:5 https://packages.grafana.com/oss/deb stable InRelease
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 8C8C34C524098CB6
Reading package lists… Done
W: GPG error: https://packages.grafana.com/oss/deb stable InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 8C8C34C524098CB6
E: The repository ‘https://packages.grafana.com/oss/deb stable InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.