Giter VIP home page Giter VIP logo

Comments (6)

jetxr avatar jetxr commented on June 30, 2024

I was just trying to get it working, and using Service Account Tokens worked for me.

This is what I used:
./bin/grafana-kiosk -URL=https://myinstance.grafana.net/playlists/play/a979f316-4d58-4689-a510-2e6ef824a416 -login-method=apikey -apikey=<service_account_token> -kiosk-mode=full -playlists -autofit=true


In your config file, could you try removing the username field under target, and passing the Service Account's token in the apikey field.

Also:

  • I'm using Grafana Cloud
  • Using a Service Account with the "Viewer" permission
  • Created a Service Account Token (this value gets passed instead of the API key)
  • You can test if your credentials work with curl -H "Authorization: Bearer <service_account_token>" -X GET '<grafana_url>/api/access-control/user/permissions'

If that doesn't work, post the error message, the issue you notice.. someone else could have a solution.

from grafana-kiosk.

nickjmv avatar nickjmv commented on June 30, 2024

I tried executing your command on our server, but unfortunately, I got the following error.

root@01624:/opt/grafana-kiosk# /usr/local/bin/grafana-kiosk --URL=https://grafana.domain.com/playlists/play/1 --login-method=apikey --apikey=xxxxxxx --kiosk-mode=full --playlists -autofit=false
GrafanaKiosk Version: v1.0.6
2023/06/09 14:24:38 No config specified, using environment and args
2023/06/09 14:24:38 AutoFit: false
2023/06/09 14:24:38 LXDEEnabled: false
2023/06/09 14:24:38 LXDEHome: /home/pi
2023/06/09 14:24:38 Mode: full
2023/06/09 14:24:38 WindowPosition: 0,0
2023/06/09 14:24:38 WindowSize: 
2023/06/09 14:24:38 URL: https://grafana.domain.com/playlists/play/1
2023/06/09 14:24:38 LoginMethod: apikey
2023/06/09 14:24:38 Username: guest
2023/06/09 14:24:38 Password: *redacted*
2023/06/09 14:24:38 IgnoreCertificateErrors: false
2023/06/09 14:24:38 IsPlayList: true
2023/06/09 14:24:38 UseMFA: false
2023/06/09 14:24:38 Fieldname AutoLogin: false
2023/06/09 14:24:38 Fieldname Username: username
2023/06/09 14:24:38 Fieldname Password: password
2023/06/09 14:24:38 DISPLAY not set, autosetting to :0.0
2023/06/09 14:24:38 DISPLAY= :0.0
2023/06/09 14:24:38 XAUTHORITY not set, autosetting
2023/06/09 14:24:38 XAUTHORITY= /root/.Xauthority
2023/06/09 14:24:38 method  apikey
2023/06/09 14:24:38 Launching apikey kiosk
2023/06/09 14:24:38 Using temp dir: /tmp/chromedp-kiosk1346209397
panic: chrome failed to start:
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
BlueALSA detected - Disabling audio sandbox
No protocol specified
[0609/142440.029695:ERROR:elf_dynamic_array_reader.h(61)] tag not found


goroutine 1 [running]:
github.com/grafana/grafana-kiosk/pkg/kiosk.GrafanaKioskApikey(0x2532400, 0x242ed40)
        /home/runner/work/grafana-kiosk/grafana-kiosk/pkg/kiosk/apikey_login.go:36 +0x7b8
main.main()
        /home/runner/work/grafana-kiosk/grafana-kiosk/pkg/cmd/grafana-kiosk/main.go:232 +0xa74

OR via my config file:

general:
  kiosk-mode: full
  autofit: false
  lxde: false
  lxde-home: /home/pi

target:
  login-method: apikey
  apikey: "xxx"
  playlists: true
  URL: https://grafana.domain.com/playlists/play/1
  ignore-certificate-errors: false

I still get the same error when the kiosk opens: Invalid basic auth header

from grafana-kiosk.

toddwh50 avatar toddwh50 commented on June 30, 2024

I get the same thing: Invalid Basic Auth Header

Configured very similar to nickjmv above, except I'm hitting AWS Managed Grafana. I've tried with API keys and Service Account tokens. Same result.

from grafana-kiosk.

jetxr avatar jetxr commented on June 30, 2024

Not that I have a solution, but tried searching for the above error (elf_dynamic_array_reader.h(61)] tag not found), and the only other places I found it were #50 and some issues in other projects dealing with Chromium.

What OS, browser, etc. are you'll using?

from grafana-kiosk.

nickjmv avatar nickjmv commented on June 30, 2024

@jetxr I'm using:

No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

And for the browser:

Chromium 116.0.5845.102 Built on Raspbian, running on Raspbian 11

from grafana-kiosk.

wizpresso-steve-cy-fan avatar wizpresso-steve-cy-fan commented on June 30, 2024

Actually...the API key field is in its own YAML key:

APIKEY struct {
Apikey string `yaml:"apikey" env:"KIOSK_APIKEY_APIKEY" env-description:"APIKEY"`
} `yaml:"apikey"`

So do this:

general:
  kiosk-mode: full
  autofit: true

target:
  login-method: apikey
  playlist: false
  URL: https://grafana.foo.com
  ignore-certificate-errors: false

apikey:
  apikey: glsa_foobarbaz

from grafana-kiosk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.