Grafana-OSS OnCall invalid token for Cloud

  • What Grafana version and what operating system are you using?
    Docker on Debian, Grafana v10.2.2

  • What are you trying to achieve?
    Connect on-prem OnCall engine/plugin to grafana cloud.

  • How are you trying to achieve it?
    All Containers are running inside my docker compose stack. I got a token from Grafana cloud for OnCall. I set the GRAFANA_CLOUD_ONCALL_API_URL env of the oncall-engine container to the URL provided in the cloud interface (eu-west in my case). In the container I can see this worked. The enviroment variable does not show in the OnCall settings in grafana.

  • What happened?
    When entering the Token into the setting in my local Grafana I get an invalid token pop-up.
    Using the provided CURL example when creating a token works fine.

  • What did you expect to happen?
    The token to be accepted

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    See What happened

Any help would be appreciated. Thanks

Hey i had the same problem, i fixed it by adding the env to grafana itself.

Hi could you explain your steps a bit more detailed? I set up my env “long” time ago and I am confused on what to do. Thanks in advance kind stranger.

So for me the problem was that I added the env to oncall-engine and not to grafana, after i added it it worked:

    image: grafana/grafana
    container_name: grafana

mh yeah, I am using a bare metal grafana install and a seperate oncall docker-compose. But I actually set the env variable on the grafana machine but no look sadly.
Still thanks a lot

1 Like

Had the same problem, solved it like this:

  1. Added the URL like the others say
  2. Reboot entire grafana stack
  3. Go to /a/grafana-oncall-app/settings
  4. Env variables → GRAFANA_CLOUD_ONCALL_TOKEN → Click the red “reset to default” button if you see it
  5. Go to the “Cloud” tab, input your grafana cloud oncall api key