oncall icon indicating copy to clipboard operation
oncall copied to clipboard

PluginAppClientSecret not set in config

Open Rulasmur opened this issue 1 year ago • 12 comments

What went wrong?

What happened:

  • Fresh install of everything, ran the curls per the README.
  • /api/plugins/grafana-oncall-app/resources/plugin/status returns PluginAppClientSecret not set in config

What did you expect to happen:

  • Oncall to create it's Service account

Image

How do we reproduce it?

  1. Fresh install of Grafana and oncall
  2. follow README
  3. Check status api

Grafana OnCall Version

1.11.3

Product Area

Other

Grafana OnCall Platform?

Docker

User's Browser?

No response

Anything else to add?

No response

Rulasmur avatar Oct 23 '24 14:10 Rulasmur

The same issue with standalone grafana latest and oncall plugin latest logger=plugin.grafana-oncall-app t=2024-10-23T19:36:10.084977473Z level=error msg="Error getting settings from context" error="PluginAppClientSecret not set in config"

kosfango avatar Oct 23 '24 19:10 kosfango

I have been able to confirm that downgrading grafana to 11.2.3 fixes the issue

Rulasmur avatar Oct 24 '24 07:10 Rulasmur

This also affects existing Grafana installations recently upgraded to v11.3, rendering OnCall unable to be viewed from Grafana.

daniel-boman avatar Oct 25 '24 06:10 daniel-boman

It looks like if I remove the service account it doesn't create a new one on Grafana v11.3. But if I downgrade to v11.2.3 is does create the service account.

I uninstalled plugin, installed it. That's how I checked this.

VermiumSifell avatar Oct 26 '24 13:10 VermiumSifell

see also #5100

bpedersen2 avatar Oct 31 '24 07:10 bpedersen2

I'm running Grafana 11.4.0 and Grafana Oncall Engine 1.13.11 and Grafana OnCall App Plugin 1.13.11 and I had this same error.

The solution in this comment #3761 worked for me

shawlz avatar Dec 19 '24 11:12 shawlz

I'm running Grafana 11.4.0 and Grafana Oncall Engine 1.13.11 and Grafana OnCall App Plugin 1.13.11 and I had this same error.

The solution in this comment #3761 worked for me

Still experiencing the issue when upgrading. Running in k8s using OSS and 2 replicas

bck01215 avatar Jan 01 '25 14:01 bck01215

I ran into the same problem, and the solution is given here: #5100 Ensuring that in the grafana.ini these feature_toggles are set:

[feature_toggles]
accessControlOnCall = false
enable = externalServiceAccounts

and that the grafana container has the following environment variable:

GF_AUTH_MANAGED_SERVICE_ACCOUNTS_ENABLED=true

fixed it for me.

This is also what has been done in this commit

kko72 avatar Jan 16 '25 09:01 kko72

Why is it always OnCall that requires so many dumb workarounds?...

I use Kubernetes and thus configure Grafana entirely through the environment. Any alternative to putting these settings in place?

Thanks!

senpro-ingwersenk avatar Jan 20 '25 09:01 senpro-ingwersenk

@senpro-ingwersenk frankly speaking I prefer bitnami charts comparing to grafana's, so I managed that. I think the approach might be similar:

  • create the config map, like:
    - apiVersion: v1
      kind: ConfigMap
      metadata:
        name: grafana-oncall-plugin-provisioning
      data:
        # ref.: https://github.com/grafana/oncall/issues/4829#issuecomment-2567046523
        # stackid should be set to 5 and orgid 100 for all self hosted instances
        grafana-oncall-app.yaml: |
          apiVersion: 1
    
          apps:
            - type: grafana-oncall-app
              name: grafana-oncall-app
              disabled: false
              jsonData:
                stackId: 5
                orgId: 100
                onCallApiUrl: http://grafana-oncall-engine:8080
                #grafanaUrl: http://grafana:3000
    
  • then mount that into grafana container to ...conf/provisioning/plugins/grafana-oncall-app.yaml with extravolumes

zentavr avatar Jan 24 '25 10:01 zentavr

Seriously facing this issue. Not being able to setup oncall since 2 months.

weibeu avatar Mar 01 '25 00:03 weibeu

@weibeu After each Grafana restart, OnCall goes goldfish-brain and forgets its whole self, with this very error. What I have done is, after each restart, where this happens, I run this command:

curl -k -X POST 'https://grafana.yourdomain.tld/api/plugins/grafana-oncall-app/settings' \
     -H "Content-Type: application/json" \
     -d '{
           "enabled": true,
           "jsonData": {
             "stackId": 5,
             "orgId": 1,
             "onCallApiUrl": "https://oncall.grafana.youromain.tld/",
             "grafanaUrl": "https://grafana.yourdomain.tld/"
           }
         }' \
     -u '[email protected]:yourpasswordhere'

These are the steps:

  1. After it restarts, I log in and head straight to the OnCall tab in the menu.
  2. Click the blue "Configure now" button
  3. Click the red "Disable" button in the top right
  4. Click the now blue "Enable" button
  5. Refresh the config page once
  6. Run the above command - twice. (sometimes it needs that and idk why...)
  7. Refresh the config page, and click the blue button - now OnCall works.

I have no idea why this extra metadata is needed or what the heck the grand idea with all of this was/is if it can not be set in the GUI. And if we hadn't put a triple-digit amount of hours into our setup here, we'd have switched. This is annoying as fuck.

senpro-ingwersenk avatar Mar 03 '25 05:03 senpro-ingwersenk