Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with grafana oncall plugin [api doesn't create grafanaToken/onCallAPiToken] #5183

Closed
Mdumala opened this issue Oct 16, 2024 · 3 comments
Labels
bug Something isn't working part:API

Comments

@Mdumala
Copy link

Mdumala commented Oct 16, 2024

What went wrong?

What happened:

  • After install grafana OSS (self-managed on k8s) and grafana oncall OSS (on k8s with external postgres/rabbitmq/redis). I'm trying to configure grafana oncall plugin from inside grafana. Then nexts steps are:
  • installing pluning -> OK
  • enabling plugin -> OK

Configuring plugin by:

  1. curl -X POST -H "X-Grafana-Org-Id: 1" "http://admin:admin@localhost:3000/api/plugins/grafana-oncall-app/settings" -H "Content-Type: application/json" -d '{ "enabled": true, "jsonData": { "stackId": 5, "orgId": 100, "license":"OpenSource", "onCallApiUrl": "http://xxx", "grafanaUrl": "http://xxx" } }'

But before step 2 we can check the plugin status by :

curl -X GET 'http://admin:admin@localhost:3000/api/plugins/grafana-oncall-app/resources/plugin/status'

In summary i got -> Unauthorized/Forbidden while accessing OnCall engine: /api/internal/v1/plugin/v2/status, status code: 403, check token**

2.curl -X POST 'http://admin:admin@localhost:3000/api/plugins/grafana-oncall-app/resources/plugin/install'

So the problem is after complete step1 from configuration plugin it doesn't appear in grafana database :

Image

What did you expect to happen:

  • Configureing plugin ending in succes and both tokens are created and appear in column json_data

How do we reproduce it?

  1. Deploy grafana OSS and grafana oncall OSS (helm charts)
  2. Install and enable plugin from grafana plugins
  3. Conifgure plugin by 2 steps using grafana API

Grafana OnCall Version

1.11.1

Product Area

API

Grafana OnCall Platform?

Kubernetes

User's Browser?

No response

Anything else to add?

No response

@Mdumala
Copy link
Author

Mdumala commented Oct 23, 2024

After update both grafana and grafanap pncall (including plugin) to 1.11.3 i have different problem.

Now the installation of plugin doesn't create service account

level=error msg="Error getting settings from context" error="PluginAppClientSecret not set in config"
grafana logger=plugins.external.registration t=2024-10-23T08:15:34.954477935Z level=warn msg="Skipping External Service Registration. The feature is behind a feature toggle and needs to be enabled." 

But the feature is clearly enabled

Image

@bpedersen2
Copy link

see also #5100

@Mdumala
Copy link
Author

Mdumala commented Oct 31, 2024

After rollout to grafana 11.2.3 it work correctly

So i think i can close the update and wait for 11.3 to be fixed ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working part:API
Projects
None yet
Development

No branches or pull requests

2 participants