Home Assistant Community Add-on: Grafana

:tada: Release v2.3.0

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v4.0.0
  • :fire: Removes secrets handling, now handled by Hassio
  • :arrow_up: Upgrades memcached to 1.5.6-0ubuntu1.2
  • :arrow_up: Upgrades Grafana to 3.6.3

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v3.0.0

Full Changelog

:warning: This is a major release! Be sure to take a snapshot before upgrading! :warning:

Introducing full-blown Hass.io Ingress support for Grafana :tada:

This means that add-on now works when using Nabu Casaā€™s Remote UI to access your Home Assistant instance. :sunglasses:

Ingress also takes care of authentication (so no need to login anymore) and allows you to add Grafana into your Home Assistant sidebar with a single click. :metal:

:warning: Please note:

  • Create a snapshot/backup before upgrading!
  • If you have configured a panel_iframe for Grafana in your Home Assistant configuration, please remove it and use the ā€œShow in sidebarā€ toggle in the add-on options.
  • Direct access to the add-on has been removed in favor of Ingress support.

:hammer: Changes

  • :arrow_up: Upgrades Grafana to v6.4.2
  • :books: Component > Integration (#50)
  • :sparkles: Adds Ingress support
  • :shirt: Fixes Markdownlint warnings

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

great work. thank you for that
With the new integration I miss the blue header of hass when I open grafana. Is it possible to get this header for this add on as well?

Hi, so far I could integrate graphics from Grafana as ā€œiframeā€ with ā€œurl: http: //192.168.178.55: 3000 / ā€¦ā€. This works since the hass.io v101.1 and Grafana v3.0.0 no longer. Probably because of the Ingress support for Grafana.
What is the current call for the ā€œiframeā€ integration?

It looks like its no longer exposing its default port to the system. So I can no longer reach it remotely by going to (systemip):3000 thats a problem.

Great, I like the new update including Ingress support!

@bussio; I had the same issue with some iframe presentations, but it still works well although the link must be updated. Go to Grafana -> your dashboard -> click share button -> Copy the new link and then use it for your iframe integration. The new address is on same port as hassio instead of 3000, like: https://yourip:8123/api/hassio_ingress/blahblahblah

A hard reload of the page may be necessary, but it works well on my side at least.

2 Likes

Anyone out there got the grafana-image-renderer plugin to work? I get an error saying itā€™s not supported although my hopes were really high with the v3.0.0 release of today. I was kindof hoping it would solve the issue of the deprecated PhantomJS that as far as I understand wasnā€™t supported by the ARM-processorsā€¦(?).

Hi,

in case you are going to run into the following error:

ā€œAnonymous access organization error: ā€˜Main Org.ā€™: Organization not foundā€

you might have changed the Organization name within Configuration / * Organization profile* in the Grafana UI during initial setup or later on. While this usually it not an issue, it is for the anonymous access being used by ingress.

If you reached that error, you might not remember what the name actually was. In case you do not have a recent backup or donā€™t want to go back, you can check on Grafanas sqllite database named grafana.db. In case of a hassio setup, you will find it under :/data/grafana.db to copy it out of the Docker Container to your local machine. Opening it with an approriate tool (e.g. https://sqlitebrowser.org/) will allow you to find the name of the organization on the org table in column name. As soon as you have it, update the Grafana addon configuration to overwrite the settings:

{
  "plugins": [],
  "env_vars": [
    {
      "name": "GF_AUTH_ANONYMOUS_ORG_NAME",
      "value": "<name of your organization>"
    }
  ]
}

Save and restart! If you did it correctly, ingress auth should now work without an issue.

4 Likes

Hi,

Itā€™s possible open port 3000?

Thank you.

Thatā€™s it. Thanks!

No, as per release notes, that is not possible as of v3.0.0 anymore.

Hi,
after the update to v3.0.0 I get a strange behaviour with the iframe card.
Everything works fine when I connect with my laptop (using Chrome), but from any other device (another lapotop, desktop, mobile app, multiple browsers tried) I get the following in the card:
401: Unauthorised

I can access Grafana UI ok from all devices using the sidebar menu link, so it does not seem to be an authentication issue.
I see no nothing in the Grafana log.
Tried to delete cookies and browser cache, with no joy.

Iā€™m out of ideas, donā€™t really know how to troubleshoot thisā€¦

This is my Grafana config:

{
  "plugins": [],
  "env_vars": [
    {
      "name": "GF_AUTH_ANONYMOUS_ORG_NAME",
      "value": "Home Assistant"
    },
    {
      "name": "GF_AUTH_ANONYMOUS_ENABLED",
      "value": "true"
    }
  ],
  "ssl": false,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

This is the normal iframe card on the ā€œworkingā€ browser:

This is what I get on all other devices:

Any suggestion on what I could try?

EDIT: I tried other browsers in the same laptop where things work well with Chrome and it does not work either. Going back to Chrome and still good.
It looks like there is something special that makes it work with that computer/browser combinationā€¦

Exact same issue here after upgrade.

1 Like

@tormagj Iā€™m able to iframe in / present via share->copy address and share->embedd into HA but the the image is frozen and doesnā€™t update when Grafana does. WHere you are to get this working?

Dear all, I have one problem. I have two houses with two hassio servers. Only in one server I have grafana for data visualization. In booth houses I use InfluxDB as a databases. Where the grafana is installed need two DB sources, one for each house. The first is in the same server so no problem (http://a0d7b954-influxdb:8086) the second I try to add a sousce http://secondserver.duckdns.org:8086 but doesnā€™t work. How can I add the second source for the external influxdb in grafana?

@mr-varga, most obvious question before anything else: have you opened port 8086 in your second home router and forwarded it to the server?

@tormagj, you donā€™t give too many details, it seems more of less what I do, but canā€™t be sure.
In grafana I open the chart that I want to ā€œiframeā€ select the share option and then copy the address that gets generated.

My iframe card is very simple, hereā€™s the code:

aspect_ratio: 88%
title: Weekly Temperature
type: iframe
url: >-
  http://HASSIO-IP:8123/api/hassio_ingress/weirdalphanumericcode/d/anotheralphanumericcode/main-dashboard?orgId=1&panelId=6&fullscreen

As said, this works perfectly fine on one laptop/browser, but not at all on all other devices, where I simply get the 401 error in the iframe card.

Dear @braiu , yes this is true. :sunglasses:

Hi guys! Make no mistake, Iā€™m not an expert on this, I just noticed I had the same problem not getting my Grafana iframes working after the upgrade, but fixed it the way I described it. Some days later I noticed that I also got a 401 error when using my tablet, but it dissappeared by itself somehow. Not sure if it was due to some cache stuff on my tablet, if it was refreshed somehow after entering through the Grafana-menu or something else, but at least it works well also on the tablet now.

I can confirm the 401 error goes away if you open grafana through the ingress menu on the device and then afterwards refresh the page with the iframe card.

1 Like